Skip to content

Commit

Permalink
Video CI test on iOS device (#3868)
Browse files Browse the repository at this point in the history
  • Loading branch information
sauwming authored Feb 27, 2024
1 parent 2d6a9d4 commit 5ef8463
Show file tree
Hide file tree
Showing 8 changed files with 422 additions and 13 deletions.
168 changes: 163 additions & 5 deletions pjsip-apps/src/pjsua/ios-swift/ipjsua-swift.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
/* Begin PBXBuildFile section */
3A4E3B582B62025C0016735C /* MetalKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3A4E3B562B62025B0016735C /* MetalKit.framework */; };
3A4E3B592B62025C0016735C /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3A4E3B572B62025B0016735C /* Metal.framework */; };
3A4E3BA52B734E9A0016735C /* Network.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3A4E3BA42B734E9A0016735C /* Network.framework */; };
3A6FC61C25CBD4540065F472 /* ipjsua_swiftApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A6FC61B25CBD4540065F472 /* ipjsua_swiftApp.swift */; };
3A6FC61E25CBD4540065F472 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A6FC61D25CBD4540065F472 /* ContentView.swift */; };
3A6FC62025CBD4550065F472 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3A6FC61F25CBD4550065F472 /* Assets.xcassets */; };
Expand Down Expand Up @@ -51,11 +52,24 @@
3A6FC7F225CD1A3E0065F472 /* libwebrtc.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3A6FC7DE25CD1A3D0065F472 /* libwebrtc.a */; };
3A6FC7F325CD1A3E0065F472 /* libpjmedia-codec.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3A6FC7DF25CD1A3D0065F472 /* libpjmedia-codec.a */; };
3A6FC7F425CD1A3E0065F472 /* libpjmedia-audiodev.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3A6FC7E025CD1A3D0065F472 /* libpjmedia-audiodev.a */; };
3AF9B5372B7B454D0043987D /* ipjsua_swiftVidTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AF9B5362B7B454D0043987D /* ipjsua_swiftVidTest.swift */; };
3AF9B5392B7B454D0043987D /* ipjsua_swiftVidTestLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AF9B5382B7B454D0043987D /* ipjsua_swiftVidTestLaunchTests.swift */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
3AF9B53A2B7B454D0043987D /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 3A6FC61025CBD4540065F472 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 3A6FC61725CBD4540065F472;
remoteInfo = "ipjsua-swift";
};
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
3A4E3B562B62025B0016735C /* MetalKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MetalKit.framework; path = System/Library/Frameworks/MetalKit.framework; sourceTree = SDKROOT; };
3A4E3B572B62025B0016735C /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = System/Library/Frameworks/Metal.framework; sourceTree = SDKROOT; };
3A4E3BA42B734E9A0016735C /* Network.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Network.framework; path = System/Library/Frameworks/Network.framework; sourceTree = SDKROOT; };
3A6FC61825CBD4540065F472 /* ipjsua-swift.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "ipjsua-swift.app"; sourceTree = BUILT_PRODUCTS_DIR; };
3A6FC61B25CBD4540065F472 /* ipjsua_swiftApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ipjsua_swiftApp.swift; sourceTree = "<group>"; };
3A6FC61D25CBD4540065F472 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -101,6 +115,10 @@
3A6FC7DE25CD1A3D0065F472 /* libwebrtc.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libwebrtc.a; sourceTree = "<group>"; };
3A6FC7DF25CD1A3D0065F472 /* libpjmedia-codec.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libpjmedia-codec.a"; sourceTree = "<group>"; };
3A6FC7E025CD1A3D0065F472 /* libpjmedia-audiodev.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libpjmedia-audiodev.a"; sourceTree = "<group>"; };
3AF9B5342B7B454D0043987D /* ipjsua-swiftVidTest.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "ipjsua-swiftVidTest.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
3AF9B5362B7B454D0043987D /* ipjsua_swiftVidTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ipjsua_swiftVidTest.swift; sourceTree = "<group>"; };
3AF9B5382B7B454D0043987D /* ipjsua_swiftVidTestLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ipjsua_swiftVidTestLaunchTests.swift; sourceTree = "<group>"; };
3AF9B53F2B7B583C0043987D /* ipjsua-swift.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = "ipjsua-swift.xctestplan"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -147,6 +165,14 @@
3A6FC7F325CD1A3E0065F472 /* libpjmedia-codec.a in Frameworks */,
3A6FC78525CBE3700065F472 /* UIKit.framework in Frameworks */,
3A6FC78625CBE3700065F472 /* VideoToolbox.framework in Frameworks */,
3A4E3BA52B734E9A0016735C /* Network.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
3AF9B5312B7B454D0043987D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -156,6 +182,8 @@
3A6FC60F25CBD4540065F472 = {
isa = PBXGroup;
children = (
3AF9B53F2B7B583C0043987D /* ipjsua-swift.xctestplan */,
3AF9B5352B7B454D0043987D /* ipjsua-swiftVidTest */,
3A6FC75A25CBD6CF0065F472 /* Frameworks */,
3A6FC6AF25CBD5790065F472 /* Libraries */,
3A6FC61A25CBD4540065F472 /* ipjsua-swift */,
Expand All @@ -167,6 +195,7 @@
isa = PBXGroup;
children = (
3A6FC61825CBD4540065F472 /* ipjsua-swift.app */,
3AF9B5342B7B454D0043987D /* ipjsua-swiftVidTest.xctest */,
);
name = Products;
sourceTree = "<group>";
Expand Down Expand Up @@ -223,6 +252,7 @@
3A6FC75A25CBD6CF0065F472 /* Frameworks */ = {
isa = PBXGroup;
children = (
3A4E3BA42B734E9A0016735C /* Network.framework */,
3A4E3B572B62025B0016735C /* Metal.framework */,
3A4E3B562B62025B0016735C /* MetalKit.framework */,
3A6FC75B25CBD6E10065F472 /* AudioToolbox.framework */,
Expand All @@ -246,6 +276,15 @@
name = Frameworks;
sourceTree = "<group>";
};
3AF9B5352B7B454D0043987D /* ipjsua-swiftVidTest */ = {
isa = PBXGroup;
children = (
3AF9B5362B7B454D0043987D /* ipjsua_swiftVidTest.swift */,
3AF9B5382B7B454D0043987D /* ipjsua_swiftVidTestLaunchTests.swift */,
);
path = "ipjsua-swiftVidTest";
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand All @@ -266,19 +305,41 @@
productReference = 3A6FC61825CBD4540065F472 /* ipjsua-swift.app */;
productType = "com.apple.product-type.application";
};
3AF9B5332B7B454D0043987D /* ipjsua-swiftVidTest */ = {
isa = PBXNativeTarget;
buildConfigurationList = 3AF9B53E2B7B454D0043987D /* Build configuration list for PBXNativeTarget "ipjsua-swiftVidTest" */;
buildPhases = (
3AF9B5302B7B454D0043987D /* Sources */,
3AF9B5312B7B454D0043987D /* Frameworks */,
3AF9B5322B7B454D0043987D /* Resources */,
);
buildRules = (
);
dependencies = (
3AF9B53B2B7B454D0043987D /* PBXTargetDependency */,
);
name = "ipjsua-swiftVidTest";
productName = "ipjsua-swiftVidTest";
productReference = 3AF9B5342B7B454D0043987D /* ipjsua-swiftVidTest.xctest */;
productType = "com.apple.product-type.bundle.ui-testing";
};
/* End PBXNativeTarget section */

/* Begin PBXProject section */
3A6FC61025CBD4540065F472 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1240;
LastSwiftUpdateCheck = 1520;
LastUpgradeCheck = 1240;
TargetAttributes = {
3A6FC61725CBD4540065F472 = {
CreatedOnToolsVersion = 12.4;
LastSwiftMigration = 1240;
};
3AF9B5332B7B454D0043987D = {
CreatedOnToolsVersion = 15.2;
TestTargetID = 3A6FC61725CBD4540065F472;
};
};
};
buildConfigurationList = 3A6FC61325CBD4540065F472 /* Build configuration list for PBXProject "ipjsua-swift" */;
Expand All @@ -295,6 +356,7 @@
projectRoot = "";
targets = (
3A6FC61725CBD4540065F472 /* ipjsua-swift */,
3AF9B5332B7B454D0043987D /* ipjsua-swiftVidTest */,
);
};
/* End PBXProject section */
Expand All @@ -309,6 +371,13 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
3AF9B5322B7B454D0043987D /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
Expand All @@ -322,8 +391,25 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
3AF9B5302B7B454D0043987D /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
3AF9B5392B7B454D0043987D /* ipjsua_swiftVidTestLaunchTests.swift in Sources */,
3AF9B5372B7B454D0043987D /* ipjsua_swiftVidTest.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */

/* Begin PBXTargetDependency section */
3AF9B53B2B7B454D0043987D /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 3A6FC61725CBD4540065F472 /* ipjsua-swift */;
targetProxy = 3AF9B53A2B7B454D0043987D /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */

/* Begin XCBuildConfiguration section */
3A6FC62525CBD4550065F472 /* Debug */ = {
isa = XCBuildConfiguration;
Expand Down Expand Up @@ -463,9 +549,11 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_STYLE = Automatic;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
DEVELOPMENT_ASSET_PATHS = "\"ipjsua-swift/Preview Content\"";
DEVELOPMENT_TEAM = 93NHJQ455P;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 93NHJQ455P;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = "ipjsua-swift/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
Expand All @@ -488,6 +576,8 @@
);
PRODUCT_BUNDLE_IDENTIFIER = "com.teluu.ipjsua-swift";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "Teluu Profile";
SWIFT_OBJC_BRIDGING_HEADER = "ipjsua-swift/ipjsua-swift-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
Expand All @@ -501,9 +591,11 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_STYLE = Automatic;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
DEVELOPMENT_ASSET_PATHS = "\"ipjsua-swift/Preview Content\"";
DEVELOPMENT_TEAM = 93NHJQ455P;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 93NHJQ455P;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = "ipjsua-swift/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
Expand All @@ -526,12 +618,69 @@
);
PRODUCT_BUNDLE_IDENTIFIER = "com.teluu.ipjsua-swift";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "Teluu Profile";
SWIFT_OBJC_BRIDGING_HEADER = "ipjsua-swift/ipjsua-swift-Bridging-Header.h";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
};
3AF9B53C2B7B454D0043987D /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 93NHJQ455P;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu17;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = "com.teluu.ipjsua-swiftVidTest";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "Teluu Profile";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)";
SWIFT_EMIT_LOC_STRINGS = NO;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
TEST_TARGET_NAME = "ipjsua-swift";
};
name = Debug;
};
3AF9B53D2B7B454D0043987D /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 93NHJQ455P;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu17;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = "com.teluu.ipjsua-swiftVidTest";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "Teluu Profile";
SWIFT_EMIT_LOC_STRINGS = NO;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
TEST_TARGET_NAME = "ipjsua-swift";
};
name = Release;
};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
Expand All @@ -553,6 +702,15 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
3AF9B53E2B7B454D0043987D /* Build configuration list for PBXNativeTarget "ipjsua-swiftVidTest" */ = {
isa = XCConfigurationList;
buildConfigurations = (
3AF9B53C2B7B454D0043987D /* Debug */,
3AF9B53D2B7B454D0043987D /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 3A6FC61025CBD4540065F472 /* Project object */;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1420"
version = "1.3">
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
Expand All @@ -27,7 +27,24 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<TestPlans>
<TestPlanReference
reference = "container:ipjsua-swift.xctestplan"
default = "YES">
</TestPlanReference>
</TestPlans>
<Testables>
<TestableReference
skipped = "NO"
parallelizable = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3AF9B5332B7B454D0043987D"
BuildableName = "ipjsua-swiftVidTest.xctest"
BlueprintName = "ipjsua-swiftVidTest"
ReferencedContainer = "container:ipjsua-swift.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
Expand Down
30 changes: 30 additions & 0 deletions pjsip-apps/src/pjsua/ios-swift/ipjsua-swift.xctestplan
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"configurations" : [
{
"id" : "A0480BD1-665B-4D82-9F04-A4890A775321",
"name" : "Configuration 1",
"options" : {

}
}
],
"defaultOptions" : {
"codeCoverage" : false,
"targetForVariableExpansion" : {
"containerPath" : "container:ipjsua-swift.xcodeproj",
"identifier" : "3A6FC61725CBD4540065F472",
"name" : "ipjsua-swift"
}
},
"testTargets" : [
{
"parallelizable" : true,
"target" : {
"containerPath" : "container:ipjsua-swift.xcodeproj",
"identifier" : "3AF9B5332B7B454D0043987D",
"name" : "ipjsua-swiftVidTest"
}
}
],
"version" : 1
}
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,9 @@ struct ContentView: View {
var body: some View {
VStack(alignment: .center) {
HStack(alignment: .center) {
Text(pjsip_vars.calling != true ? "Destination:" :
pjsip_vars.vid_win != nil ? "Video" : "")
if (!pjsip_vars.calling) {
Text("Destination:")
TextField(pjsip_vars.dest, text: $pjsip_vars.dest)
.frame(minWidth:0, maxWidth:200)
}
Expand Down
2 changes: 2 additions & 0 deletions pjsip-apps/src/pjsua/ios-swift/ipjsua-swift/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<string>Audio call permission</string>
<key>NSCameraUsageDescription</key>
<string>Video call permission</string>
<key>NSLocalNetworkUsageDescription</key>
<string>Local network permission</string>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
Expand Down
Loading

0 comments on commit 5ef8463

Please sign in to comment.