Skip to content

Commit e97c91f

Browse files
authored
SDK 2228 DMA Test automation (#1377)
* Added features in Deep Link Demo App for testing setDMAParamsForEEARegion API. * Updated BranchSDK linking method to cocoaPod * Fixed Crash for Empty log File. * Updated logging API. * Added logging callback function for writing into text files * Fixed print function - Added locks and removed extra setLogFile call.
1 parent 4800c88 commit e97c91f

File tree

11 files changed

+318
-109
lines changed

11 files changed

+318
-109
lines changed

.github/workflows/automation-trigger-test.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,7 @@ jobs:
5555
5656
- name: Create and export DeepLinkDemo IPA file
5757
run: |
58-
./scripts/prep_static_xcframework.sh
5958
cd ./DeepLinkDemo
60-
mkdir Framework
61-
unzip ../Branch_static.zip -d ./Framework/
6259
pod install
6360
xcodebuild -workspace DeepLinkDemo.xcworkspace -scheme DeepLinkDemo -sdk iphoneos archive -archivePath ./IPA/DeepLinkDemo.xcarchive
6461
xcodebuild -exportArchive -archivePath ./IPA/DeepLinkDemo.xcarchive -exportOptionsPlist IPA/Info.plist -exportPath IPA/

DeepLinkDemo/DeepLinkDemo.xcodeproj/project.pbxproj

Lines changed: 27 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
1877918A283C8D2400229CD5 /* Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18779189283C8D2400229CD5 /* Utils.swift */; };
1616
1889ACED283BE1C9009E3601 /* NSURLSessionBranch.m in Sources */ = {isa = PBXBuildFile; fileRef = 1889ACEC283BE1C9009E3601 /* NSURLSessionBranch.m */; };
1717
18AC5ADE283F61430098736E /* LogFileListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18AC5ADD283F61430098736E /* LogFileListViewController.swift */; };
18+
2A2347C154C6746FA55C3649 /* Pods_DeepLinkDemo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DDBB5A837B0C008CA5BEC1EF /* Pods_DeepLinkDemo.framework */; };
1819
7E1A39D42818289B002B302D /* DispalyVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7E1A39D32818289B002B302D /* DispalyVC.swift */; };
1920
7E2AE639280ED92800142446 /* CreateObjectReferenceObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7E2AE638280ED92800142446 /* CreateObjectReferenceObject.swift */; };
2021
7E2AE63B280EE1F700142446 /* GenerateURLVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7E2AE63A280EE1F700142446 /* GenerateURLVC.swift */; };
@@ -33,8 +34,6 @@
3334
7EE84374281CDFAE00A1561C /* StartupOptionsData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7EE84373281CDFAE00A1561C /* StartupOptionsData.swift */; };
3435
7EF58D5B2812CF2300BA92D5 /* WebViewVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7EF58D5A2812CF2300BA92D5 /* WebViewVC.swift */; };
3536
B7B7DC2A2859974E00D45FC5 /* TextViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B7B7DC292859974E00D45FC5 /* TextViewController.swift */; };
36-
E70E80C22A0E22C1008007B6 /* BranchSDK.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = E70E80C12A0E22C1008007B6 /* BranchSDK.xcframework */; };
37-
E71086B529D2423100BDC598 /* Pods_DeepLinkDemo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CA28D389F8D830715B437AAD /* Pods_DeepLinkDemo.framework */; };
3837
/* End PBXBuildFile section */
3938

4039
/* Begin PBXFileReference section */
@@ -47,8 +46,6 @@
4746
1889ACEB283BE1C9009E3601 /* NSURLSessionBranch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSURLSessionBranch.h; sourceTree = "<group>"; };
4847
1889ACEC283BE1C9009E3601 /* NSURLSessionBranch.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSURLSessionBranch.m; sourceTree = "<group>"; };
4948
18AC5ADD283F61430098736E /* LogFileListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogFileListViewController.swift; sourceTree = "<group>"; };
50-
3ED981AAAEF5ECFF371D65F1 /* Pods-DeepLinkDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DeepLinkDemo.debug.xcconfig"; path = "Target Support Files/Pods-DeepLinkDemo/Pods-DeepLinkDemo.debug.xcconfig"; sourceTree = "<group>"; };
51-
7A19807506A47A88AF290FBF /* Pods-DeepLinkDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DeepLinkDemo.release.xcconfig"; path = "Target Support Files/Pods-DeepLinkDemo/Pods-DeepLinkDemo.release.xcconfig"; sourceTree = "<group>"; };
5249
7E1A39D32818289B002B302D /* DispalyVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DispalyVC.swift; sourceTree = "<group>"; };
5350
7E2AE638280ED92800142446 /* CreateObjectReferenceObject.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreateObjectReferenceObject.swift; sourceTree = "<group>"; };
5451
7E2AE63A280EE1F700142446 /* GenerateURLVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GenerateURLVC.swift; sourceTree = "<group>"; };
@@ -72,8 +69,10 @@
7269
7EE84373281CDFAE00A1561C /* StartupOptionsData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StartupOptionsData.swift; sourceTree = "<group>"; };
7370
7EF58D5A2812CF2300BA92D5 /* WebViewVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WebViewVC.swift; sourceTree = "<group>"; };
7471
7EF58D5C2816D14700BA92D5 /* DeepLinkDemo.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DeepLinkDemo.entitlements; sourceTree = "<group>"; };
72+
88EDCA13B444CE5565DC92FA /* Pods-DeepLinkDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DeepLinkDemo.release.xcconfig"; path = "Target Support Files/Pods-DeepLinkDemo/Pods-DeepLinkDemo.release.xcconfig"; sourceTree = "<group>"; };
7573
B7B7DC292859974E00D45FC5 /* TextViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextViewController.swift; sourceTree = "<group>"; };
76-
CA28D389F8D830715B437AAD /* Pods_DeepLinkDemo.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_DeepLinkDemo.framework; sourceTree = BUILT_PRODUCTS_DIR; };
74+
C06885D21868B25319262FC1 /* Pods-DeepLinkDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DeepLinkDemo.debug.xcconfig"; path = "Target Support Files/Pods-DeepLinkDemo/Pods-DeepLinkDemo.debug.xcconfig"; sourceTree = "<group>"; };
75+
DDBB5A837B0C008CA5BEC1EF /* Pods_DeepLinkDemo.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_DeepLinkDemo.framework; sourceTree = BUILT_PRODUCTS_DIR; };
7776
E70E80C12A0E22C1008007B6 /* BranchSDK.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = BranchSDK.xcframework; path = Framework/BranchSDK.xcframework; sourceTree = "<group>"; };
7877
/* End PBXFileReference section */
7978

@@ -82,8 +81,7 @@
8281
isa = PBXFrameworksBuildPhase;
8382
buildActionMask = 2147483647;
8483
files = (
85-
E70E80C22A0E22C1008007B6 /* BranchSDK.xcframework in Frameworks */,
86-
E71086B529D2423100BDC598 /* Pods_DeepLinkDemo.framework in Frameworks */,
84+
2A2347C154C6746FA55C3649 /* Pods_DeepLinkDemo.framework in Frameworks */,
8785
);
8886
runOnlyForDeploymentPostprocessing = 0;
8987
};
@@ -104,7 +102,7 @@
104102
isa = PBXGroup;
105103
children = (
106104
E70E80C12A0E22C1008007B6 /* BranchSDK.xcframework */,
107-
CA28D389F8D830715B437AAD /* Pods_DeepLinkDemo.framework */,
105+
DDBB5A837B0C008CA5BEC1EF /* Pods_DeepLinkDemo.framework */,
108106
);
109107
name = Frameworks;
110108
sourceTree = "<group>";
@@ -183,8 +181,8 @@
183181
DB9F65A595474F5DA261D89A /* Pods */ = {
184182
isa = PBXGroup;
185183
children = (
186-
3ED981AAAEF5ECFF371D65F1 /* Pods-DeepLinkDemo.debug.xcconfig */,
187-
7A19807506A47A88AF290FBF /* Pods-DeepLinkDemo.release.xcconfig */,
184+
C06885D21868B25319262FC1 /* Pods-DeepLinkDemo.debug.xcconfig */,
185+
88EDCA13B444CE5565DC92FA /* Pods-DeepLinkDemo.release.xcconfig */,
188186
);
189187
path = Pods;
190188
sourceTree = "<group>";
@@ -196,11 +194,11 @@
196194
isa = PBXNativeTarget;
197195
buildConfigurationList = 7E7477DA2809C46D0088A7D3 /* Build configuration list for PBXNativeTarget "DeepLinkDemo" */;
198196
buildPhases = (
199-
4E20F2B3A080FBA467F97C22 /* [CP] Check Pods Manifest.lock */,
197+
8C8C5B24F34C07814525F311 /* [CP] Check Pods Manifest.lock */,
200198
7E7477C22809C46C0088A7D3 /* Sources */,
201199
7E7477C32809C46C0088A7D3 /* Frameworks */,
202200
7E7477C42809C46C0088A7D3 /* Resources */,
203-
27F53A44E6856F363E13DC32 /* [CP] Embed Pods Frameworks */,
201+
9086714B33BB3D176E3DED70 /* [CP] Embed Pods Frameworks */,
204202
);
205203
buildRules = (
206204
);
@@ -261,43 +259,43 @@
261259
/* End PBXResourcesBuildPhase section */
262260

263261
/* Begin PBXShellScriptBuildPhase section */
264-
27F53A44E6856F363E13DC32 /* [CP] Embed Pods Frameworks */ = {
262+
8C8C5B24F34C07814525F311 /* [CP] Check Pods Manifest.lock */ = {
265263
isa = PBXShellScriptBuildPhase;
266264
buildActionMask = 2147483647;
267265
files = (
268266
);
269267
inputFileListPaths = (
270-
"${PODS_ROOT}/Target Support Files/Pods-DeepLinkDemo/Pods-DeepLinkDemo-frameworks-${CONFIGURATION}-input-files.xcfilelist",
271268
);
272-
name = "[CP] Embed Pods Frameworks";
269+
inputPaths = (
270+
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
271+
"${PODS_ROOT}/Manifest.lock",
272+
);
273+
name = "[CP] Check Pods Manifest.lock";
273274
outputFileListPaths = (
274-
"${PODS_ROOT}/Target Support Files/Pods-DeepLinkDemo/Pods-DeepLinkDemo-frameworks-${CONFIGURATION}-output-files.xcfilelist",
275+
);
276+
outputPaths = (
277+
"$(DERIVED_FILE_DIR)/Pods-DeepLinkDemo-checkManifestLockResult.txt",
275278
);
276279
runOnlyForDeploymentPostprocessing = 0;
277280
shellPath = /bin/sh;
278-
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-DeepLinkDemo/Pods-DeepLinkDemo-frameworks.sh\"\n";
281+
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
279282
showEnvVarsInLog = 0;
280283
};
281-
4E20F2B3A080FBA467F97C22 /* [CP] Check Pods Manifest.lock */ = {
284+
9086714B33BB3D176E3DED70 /* [CP] Embed Pods Frameworks */ = {
282285
isa = PBXShellScriptBuildPhase;
283286
buildActionMask = 2147483647;
284287
files = (
285288
);
286289
inputFileListPaths = (
290+
"${PODS_ROOT}/Target Support Files/Pods-DeepLinkDemo/Pods-DeepLinkDemo-frameworks-${CONFIGURATION}-input-files.xcfilelist",
287291
);
288-
inputPaths = (
289-
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
290-
"${PODS_ROOT}/Manifest.lock",
291-
);
292-
name = "[CP] Check Pods Manifest.lock";
292+
name = "[CP] Embed Pods Frameworks";
293293
outputFileListPaths = (
294-
);
295-
outputPaths = (
296-
"$(DERIVED_FILE_DIR)/Pods-DeepLinkDemo-checkManifestLockResult.txt",
294+
"${PODS_ROOT}/Target Support Files/Pods-DeepLinkDemo/Pods-DeepLinkDemo-frameworks-${CONFIGURATION}-output-files.xcfilelist",
297295
);
298296
runOnlyForDeploymentPostprocessing = 0;
299297
shellPath = /bin/sh;
300-
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
298+
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-DeepLinkDemo/Pods-DeepLinkDemo-frameworks.sh\"\n";
301299
showEnvVarsInLog = 0;
302300
};
303301
/* End PBXShellScriptBuildPhase section */
@@ -469,7 +467,7 @@
469467
};
470468
7E7477DB2809C46D0088A7D3 /* Debug */ = {
471469
isa = XCBuildConfiguration;
472-
baseConfigurationReference = 3ED981AAAEF5ECFF371D65F1 /* Pods-DeepLinkDemo.debug.xcconfig */;
470+
baseConfigurationReference = C06885D21868B25319262FC1 /* Pods-DeepLinkDemo.debug.xcconfig */;
473471
buildSettings = {
474472
ARCHS = "$(ARCHS_STANDARD)";
475473
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
@@ -517,7 +515,7 @@
517515
};
518516
7E7477DC2809C46D0088A7D3 /* Release */ = {
519517
isa = XCBuildConfiguration;
520-
baseConfigurationReference = 7A19807506A47A88AF290FBF /* Pods-DeepLinkDemo.release.xcconfig */;
518+
baseConfigurationReference = 88EDCA13B444CE5565DC92FA /* Pods-DeepLinkDemo.release.xcconfig */;
521519
buildSettings = {
522520
ARCHS = "$(ARCHS_STANDARD)";
523521
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;

DeepLinkDemo/DeepLinkDemo/AppDelegate.swift

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
4242
IQKeyboardManager.shared().isEnabled = true
4343
StartupOptionsData.setActiveSetDebugEnabled(true)
4444
StartupOptionsData.setPendingSetDebugEnabled(true)
45-
Branch.setBranchKey("key_test_om2EWe1WBeBYmpz9Z1mdpopouDmoN72T")
46-
Branch.getInstance().enableLogging()
47-
getBranchData(launchOptions)
4845
Utils.shared.setLogFile("AppDelegate")
4946
return true
5047
}
@@ -145,7 +142,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
145142

146143

147144

148-
fileprivate func getBranchData(_ launchOptions: [UIApplication.LaunchOptionsKey : Any]?) {
145+
func getBranchData(_ launchOptions: [UIApplication.LaunchOptionsKey : Any]?) {
149146

150147
Branch.getInstance().initSession(
151148
launchOptions: launchOptions,

0 commit comments

Comments
 (0)