diff --git a/.gitignore b/.gitignore index ad42991..fd7eecf 100644 --- a/.gitignore +++ b/.gitignore @@ -68,4 +68,7 @@ fastlane/Preview.html fastlane/screenshots fastlane/test_output IDEWorkspaceChecks.plist -*.DS_Store \ No newline at end of file +*.DS_Store + + +RudderConfig.plist \ No newline at end of file diff --git a/Example/Podfile b/Example/Podfile index 14e6d00..0484729 100644 --- a/Example/Podfile +++ b/Example/Podfile @@ -5,11 +5,6 @@ platform :ios, '10.0' target 'Rudder-Appsflyer_Example' do pod 'Rudder-Appsflyer', :path => '../' - target 'Rudder-Appsflyer_Tests' do - inherit! :search_paths - - pod 'FBSnapshotTestCase' - end post_install do |installer| installer.pods_project.build_configurations.each do |config| @@ -17,4 +12,4 @@ target 'Rudder-Appsflyer_Example' do end end -end +end \ No newline at end of file diff --git a/Example/Podfile.lock b/Example/Podfile.lock index edf2f61..4f3d100 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -1,25 +1,18 @@ PODS: - - AppsFlyerFramework (6.9.1): - - AppsFlyerFramework/Main (= 6.9.1) - - AppsFlyerFramework/Main (6.9.1) - - FBSnapshotTestCase (2.1.4): - - FBSnapshotTestCase/SwiftSupport (= 2.1.4) - - FBSnapshotTestCase/Core (2.1.4) - - FBSnapshotTestCase/SwiftSupport (2.1.4): - - FBSnapshotTestCase/Core - - Rudder (1.8.0) - - Rudder-Appsflyer (2.1.0): - - AppsFlyerFramework (~> 6.9.1) - - Rudder (~> 1.0) + - AppsFlyerFramework (6.10.1): + - AppsFlyerFramework/Main (= 6.10.1) + - AppsFlyerFramework/Main (6.10.1) + - Rudder (1.13.0) + - Rudder-Appsflyer (2.2.0): + - AppsFlyerFramework (~> 6.10) + - Rudder (~> 1.12) DEPENDENCIES: - - FBSnapshotTestCase - Rudder-Appsflyer (from `../`) SPEC REPOS: trunk: - AppsFlyerFramework - - FBSnapshotTestCase - Rudder EXTERNAL SOURCES: @@ -27,11 +20,10 @@ EXTERNAL SOURCES: :path: "../" SPEC CHECKSUMS: - AppsFlyerFramework: dc9aa675faa8e1a2ed40fb295d3c5408ee2b972a - FBSnapshotTestCase: 094f9f314decbabe373b87cc339bea235a63e07a - Rudder: 0a5272646aa3b89295526cea2bf54d092044848a - Rudder-Appsflyer: e1f26d1d24d3a9351c7079b3f9c87815680da426 + AppsFlyerFramework: 88a6eed37ad52bcee4ad74232efa8e22809d06c9 + Rudder: 840bf4dfd9816ce6a82cb8870f1a2d4a44ed2652 + Rudder-Appsflyer: 94b945c1dff963d5e655719980453ccbb9c083eb -PODFILE CHECKSUM: 72f0e785b3e2e2c1b9276c5aee9c1558d47208ad +PODFILE CHECKSUM: 49c77f0049a9ff4b4e9202c3918c8ff06a57b815 -COCOAPODS: 1.11.3 +COCOAPODS: 1.12.0 diff --git a/Example/Rudder-Appsflyer.xcodeproj/project.pbxproj b/Example/Rudder-Appsflyer.xcodeproj/project.pbxproj index 759c12e..507aa0f 100644 --- a/Example/Rudder-Appsflyer.xcodeproj/project.pbxproj +++ b/Example/Rudder-Appsflyer.xcodeproj/project.pbxproj @@ -7,7 +7,6 @@ objects = { /* Begin PBXBuildFile section */ - 54ABD99D4E454E0BF0B20DCA /* Pods_Rudder_Appsflyer_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 75D3CAB1638F53CA7265705D /* Pods_Rudder_Appsflyer_Tests.framework */; }; 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; }; 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58F195388D20070C39A /* CoreGraphics.framework */; }; 6003F592195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; }; @@ -21,9 +20,13 @@ 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; }; 6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5B8195388D20070C39A /* InfoPlist.strings */; }; 6003F5BC195388D20070C39A /* Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5BB195388D20070C39A /* Tests.m */; }; - 6CE5DED7F4D6B8D05D699640 /* Pods_Rudder_Appsflyer_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F5286571A438A84D7BB640B2 /* Pods_Rudder_Appsflyer_Example.framework */; }; 71719F9F1E33DC2100824A3D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */; }; 873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */; }; + C1EC4B6E45C9733D3F6310BD /* Pods_Rudder_Appsflyer_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6A5779B4112B227674BEB6A0 /* Pods_Rudder_Appsflyer_Example.framework */; }; + F63C976529E80C04008C81C5 /* AppTrackingTransparency.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F63C976429E80C04008C81C5 /* AppTrackingTransparency.framework */; }; + F694A85829E7C973006F53CC /* RudderConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = F694A85729E7C973006F53CC /* RudderConfig.swift */; }; + F694A85A29E7C9A7006F53CC /* RudderConfig.plist in Resources */ = {isa = PBXBuildFile; fileRef = F694A85929E7C9A7006F53CC /* RudderConfig.plist */; }; + F694A85C29E7E610006F53CC /* SampleRudderConfig.plist in Resources */ = {isa = PBXBuildFile; fileRef = F694A85B29E7E610006F53CC /* SampleRudderConfig.plist */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -37,10 +40,8 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 1BD3AE254B2E89F62B19D972 /* Pods-Rudder-Appsflyer_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Rudder-Appsflyer_Tests.debug.xcconfig"; path = "Target Support Files/Pods-Rudder-Appsflyer_Tests/Pods-Rudder-Appsflyer_Tests.debug.xcconfig"; sourceTree = ""; }; - 22A0D40EE60E017AFC71E313 /* Pods-Rudder-Appsflyer_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Rudder-Appsflyer_Example.release.xcconfig"; path = "Target Support Files/Pods-Rudder-Appsflyer_Example/Pods-Rudder-Appsflyer_Example.release.xcconfig"; sourceTree = ""; }; - 34BB885B8615589B3E9D1EBC /* Pods-Rudder-Appsflyer_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Rudder-Appsflyer_Tests.release.xcconfig"; path = "Target Support Files/Pods-Rudder-Appsflyer_Tests/Pods-Rudder-Appsflyer_Tests.release.xcconfig"; sourceTree = ""; }; 4F6BF5867985B17F530A4FAB /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; + 5776857352FC3BAAA13BAE09 /* Pods-Rudder-Appsflyer_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Rudder-Appsflyer_Example.debug.xcconfig"; path = "Target Support Files/Pods-Rudder-Appsflyer_Example/Pods-Rudder-Appsflyer_Example.debug.xcconfig"; sourceTree = ""; }; 5DEFB86FC76D20A863F9AD7A /* Rudder-Appsflyer.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = "Rudder-Appsflyer.podspec"; path = "../Rudder-Appsflyer.podspec"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 6003F58A195388D20070C39A /* Rudder-Appsflyer_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Rudder-Appsflyer_Example.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 6003F58D195388D20070C39A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; @@ -61,12 +62,16 @@ 6003F5B9195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 6003F5BB195388D20070C39A /* Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Tests.m; sourceTree = ""; }; 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Tests-Prefix.pch"; sourceTree = ""; }; + 6A5779B4112B227674BEB6A0 /* Pods_Rudder_Appsflyer_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Rudder_Appsflyer_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 71719F9E1E33DC2100824A3D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 723A1422FB77ECE447F73246 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; - 75D3CAB1638F53CA7265705D /* Pods_Rudder_Appsflyer_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Rudder_Appsflyer_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 7D3FAC1D808B0A77C9789F94 /* Pods-Rudder-Appsflyer_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Rudder-Appsflyer_Example.release.xcconfig"; path = "Target Support Files/Pods-Rudder-Appsflyer_Example/Pods-Rudder-Appsflyer_Example.release.xcconfig"; sourceTree = ""; }; 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = Main.storyboard; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - D2BD9542964781980025C44A /* Pods-Rudder-Appsflyer_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Rudder-Appsflyer_Example.debug.xcconfig"; path = "Target Support Files/Pods-Rudder-Appsflyer_Example/Pods-Rudder-Appsflyer_Example.debug.xcconfig"; sourceTree = ""; }; - F5286571A438A84D7BB640B2 /* Pods_Rudder_Appsflyer_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Rudder_Appsflyer_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + F63C976429E80C04008C81C5 /* AppTrackingTransparency.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppTrackingTransparency.framework; path = System/Library/Frameworks/AppTrackingTransparency.framework; sourceTree = SDKROOT; }; + F694A85629E7C972006F53CC /* Rudder-Appsflyer_Example-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Rudder-Appsflyer_Example-Bridging-Header.h"; sourceTree = ""; }; + F694A85729E7C973006F53CC /* RudderConfig.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RudderConfig.swift; sourceTree = ""; }; + F694A85929E7C9A7006F53CC /* RudderConfig.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = RudderConfig.plist; sourceTree = ""; }; + F694A85B29E7E610006F53CC /* SampleRudderConfig.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = SampleRudderConfig.plist; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -74,10 +79,11 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + F63C976529E80C04008C81C5 /* AppTrackingTransparency.framework in Frameworks */, 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */, 6003F592195388D20070C39A /* UIKit.framework in Frameworks */, 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */, - 6CE5DED7F4D6B8D05D699640 /* Pods_Rudder_Appsflyer_Example.framework in Frameworks */, + C1EC4B6E45C9733D3F6310BD /* Pods_Rudder_Appsflyer_Example.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -88,7 +94,6 @@ 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */, 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */, 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */, - 54ABD99D4E454E0BF0B20DCA /* Pods_Rudder_Appsflyer_Tests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -98,10 +103,8 @@ 031A6A9332EF8D7C8B270402 /* Pods */ = { isa = PBXGroup; children = ( - D2BD9542964781980025C44A /* Pods-Rudder-Appsflyer_Example.debug.xcconfig */, - 22A0D40EE60E017AFC71E313 /* Pods-Rudder-Appsflyer_Example.release.xcconfig */, - 1BD3AE254B2E89F62B19D972 /* Pods-Rudder-Appsflyer_Tests.debug.xcconfig */, - 34BB885B8615589B3E9D1EBC /* Pods-Rudder-Appsflyer_Tests.release.xcconfig */, + 5776857352FC3BAAA13BAE09 /* Pods-Rudder-Appsflyer_Example.debug.xcconfig */, + 7D3FAC1D808B0A77C9789F94 /* Pods-Rudder-Appsflyer_Example.release.xcconfig */, ); path = Pods; sourceTree = ""; @@ -130,12 +133,12 @@ 6003F58C195388D20070C39A /* Frameworks */ = { isa = PBXGroup; children = ( + F63C976429E80C04008C81C5 /* AppTrackingTransparency.framework */, 6003F58D195388D20070C39A /* Foundation.framework */, 6003F58F195388D20070C39A /* CoreGraphics.framework */, 6003F591195388D20070C39A /* UIKit.framework */, 6003F5AF195388D20070C39A /* XCTest.framework */, - F5286571A438A84D7BB640B2 /* Pods_Rudder_Appsflyer_Example.framework */, - 75D3CAB1638F53CA7265705D /* Pods_Rudder_Appsflyer_Tests.framework */, + 6A5779B4112B227674BEB6A0 /* Pods_Rudder_Appsflyer_Example.framework */, ); name = Frameworks; sourceTree = ""; @@ -143,6 +146,7 @@ 6003F593195388D20070C39A /* Example for Rudder-Appsflyer */ = { isa = PBXGroup; children = ( + F694A85529E7C961006F53CC /* RudderConfig */, 6003F59C195388D20070C39A /* _AppDelegate.h */, 6003F59D195388D20070C39A /* _AppDelegate.m */, 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */, @@ -196,6 +200,17 @@ name = "Podspec Metadata"; sourceTree = ""; }; + F694A85529E7C961006F53CC /* RudderConfig */ = { + isa = PBXGroup; + children = ( + F694A85729E7C973006F53CC /* RudderConfig.swift */, + F694A85629E7C972006F53CC /* Rudder-Appsflyer_Example-Bridging-Header.h */, + F694A85929E7C9A7006F53CC /* RudderConfig.plist */, + F694A85B29E7E610006F53CC /* SampleRudderConfig.plist */, + ); + path = RudderConfig; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -203,11 +218,11 @@ isa = PBXNativeTarget; buildConfigurationList = 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "Rudder-Appsflyer_Example" */; buildPhases = ( - 539DF8B187145F46B183DC6D /* [CP] Check Pods Manifest.lock */, + 2D44192878DC8AF79EA1ACA5 /* [CP] Check Pods Manifest.lock */, 6003F586195388D20070C39A /* Sources */, 6003F587195388D20070C39A /* Frameworks */, 6003F588195388D20070C39A /* Resources */, - 15472CFA83B647175C323FD6 /* [CP] Embed Pods Frameworks */, + C2CE48AFFF8CD4D8FB570717 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -222,11 +237,9 @@ isa = PBXNativeTarget; buildConfigurationList = 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "Rudder-Appsflyer_Tests" */; buildPhases = ( - 7928E2DA6643CA3279EE5B95 /* [CP] Check Pods Manifest.lock */, 6003F5AA195388D20070C39A /* Sources */, 6003F5AB195388D20070C39A /* Frameworks */, 6003F5AC195388D20070C39A /* Resources */, - B1A3A734AA11370D917B1B12 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -248,6 +261,11 @@ LastUpgradeCheck = 0720; ORGANIZATIONNAME = arnabp92; TargetAttributes = { + 6003F589195388D20070C39A = { + DevelopmentTeam = WPX9KRKA8B; + LastSwiftMigration = 1430; + ProvisioningStyle = Automatic; + }; 6003F5AD195388D20070C39A = { TestTargetID = 6003F589195388D20070C39A; }; @@ -279,6 +297,8 @@ buildActionMask = 2147483647; files = ( 873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */, + F694A85A29E7C9A7006F53CC /* RudderConfig.plist in Resources */, + F694A85C29E7E610006F53CC /* SampleRudderConfig.plist in Resources */, 71719F9F1E33DC2100824A3D /* LaunchScreen.storyboard in Resources */, 6003F5A9195388D20070C39A /* Images.xcassets in Resources */, 6003F598195388D20070C39A /* InfoPlist.strings in Resources */, @@ -296,25 +316,7 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 15472CFA83B647175C323FD6 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Rudder-Appsflyer_Example/Pods-Rudder-Appsflyer_Example-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/Rudder/Rudder.framework", - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Rudder.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Rudder-Appsflyer_Example/Pods-Rudder-Appsflyer_Example-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 539DF8B187145F46B183DC6D /* [CP] Check Pods Manifest.lock */ = { + 2D44192878DC8AF79EA1ACA5 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -336,44 +338,22 @@ 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"; showEnvVarsInLog = 0; }; - 7928E2DA6643CA3279EE5B95 /* [CP] Check Pods Manifest.lock */ = { + C2CE48AFFF8CD4D8FB570717 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); - inputFileListPaths = ( - ); inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Rudder-Appsflyer_Tests-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - 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"; - showEnvVarsInLog = 0; - }; - B1A3A734AA11370D917B1B12 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Rudder-Appsflyer_Tests/Pods-Rudder-Appsflyer_Tests-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/FBSnapshotTestCase/FBSnapshotTestCase.framework", + "${PODS_ROOT}/Target Support Files/Pods-Rudder-Appsflyer_Example/Pods-Rudder-Appsflyer_Example-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Rudder/Rudder.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FBSnapshotTestCase.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Rudder.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Rudder-Appsflyer_Tests/Pods-Rudder-Appsflyer_Tests-frameworks.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Rudder-Appsflyer_Example/Pods-Rudder-Appsflyer_Example-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -384,6 +364,7 @@ buildActionMask = 2147483647; files = ( 6003F59E195388D20070C39A /* _AppDelegate.m in Sources */, + F694A85829E7C973006F53CC /* RudderConfig.swift in Sources */, 6003F5A7195388D20070C39A /* _ViewController.m in Sources */, 6003F59A195388D20070C39A /* main.m in Sources */, ); @@ -512,17 +493,24 @@ }; 6003F5C0195388D20070C39A /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D2BD9542964781980025C44A /* Pods-Rudder-Appsflyer_Example.debug.xcconfig */; + baseConfigurationReference = 5776857352FC3BAAA13BAE09 /* Pods-Rudder-Appsflyer_Example.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = WPX9KRKA8B; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "Rudder-Appsflyer/Rudder-Appsflyer-Prefix.pch"; INFOPLIST_FILE = "Rudder-Appsflyer/Rudder-Appsflyer-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 14.3; MODULE_NAME = ExampleApp; ONLY_ACTIVE_ARCH = YES; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_BUNDLE_IDENTIFIER = "com.rudderstack.ios.appsflyer.device-mode"; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_OBJC_BRIDGING_HEADER = "Rudder-Appsflyer/RudderConfig/Rudder-Appsflyer_Example-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 4.0; WRAPPER_EXTENSION = app; }; @@ -530,17 +518,23 @@ }; 6003F5C1195388D20070C39A /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 22A0D40EE60E017AFC71E313 /* Pods-Rudder-Appsflyer_Example.release.xcconfig */; + baseConfigurationReference = 7D3FAC1D808B0A77C9789F94 /* Pods-Rudder-Appsflyer_Example.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = WPX9KRKA8B; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "Rudder-Appsflyer/Rudder-Appsflyer-Prefix.pch"; INFOPLIST_FILE = "Rudder-Appsflyer/Rudder-Appsflyer-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 14.3; MODULE_NAME = ExampleApp; ONLY_ACTIVE_ARCH = NO; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_BUNDLE_IDENTIFIER = "com.rudderstack.ios.appsflyer.device-mode"; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_OBJC_BRIDGING_HEADER = "Rudder-Appsflyer/RudderConfig/Rudder-Appsflyer_Example-Bridging-Header.h"; SWIFT_VERSION = 4.0; WRAPPER_EXTENSION = app; }; @@ -548,8 +542,8 @@ }; 6003F5C3195388D20070C39A /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 1BD3AE254B2E89F62B19D972 /* Pods-Rudder-Appsflyer_Tests.debug.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; FRAMEWORK_SEARCH_PATHS = ( "$(PLATFORM_DIR)/Developer/Library/Frameworks", @@ -573,8 +567,8 @@ }; 6003F5C4195388D20070C39A /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 34BB885B8615589B3E9D1EBC /* Pods-Rudder-Appsflyer_Tests.release.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; FRAMEWORK_SEARCH_PATHS = ( "$(PLATFORM_DIR)/Developer/Library/Frameworks", diff --git a/Example/Rudder-Appsflyer/Base.lproj/Main.storyboard b/Example/Rudder-Appsflyer/Base.lproj/Main.storyboard index e9e93c1..5e2bed5 100644 --- a/Example/Rudder-Appsflyer/Base.lproj/Main.storyboard +++ b/Example/Rudder-Appsflyer/Base.lproj/Main.storyboard @@ -1,11 +1,10 @@ - - - - + + - + + @@ -14,18 +13,115 @@ - - + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + diff --git a/Example/Rudder-Appsflyer/Rudder-Appsflyer-Info.plist b/Example/Rudder-Appsflyer/Rudder-Appsflyer-Info.plist index 7576a0d..686c467 100644 --- a/Example/Rudder-Appsflyer/Rudder-Appsflyer-Info.plist +++ b/Example/Rudder-Appsflyer/Rudder-Appsflyer-Info.plist @@ -2,6 +2,8 @@ + NSUserTrackingUsageDescription + Allow app to track your actions ? CFBundleDevelopmentRegion en CFBundleDisplayName diff --git a/Example/Rudder-Appsflyer/RudderConfig/Rudder-Appsflyer_Example-Bridging-Header.h b/Example/Rudder-Appsflyer/RudderConfig/Rudder-Appsflyer_Example-Bridging-Header.h new file mode 100644 index 0000000..1b2cb5d --- /dev/null +++ b/Example/Rudder-Appsflyer/RudderConfig/Rudder-Appsflyer_Example-Bridging-Header.h @@ -0,0 +1,4 @@ +// +// Use this file to import your target's public headers that you would like to expose to Swift. +// + diff --git a/Example/Rudder-Appsflyer/RudderConfig/RudderConfig.swift b/Example/Rudder-Appsflyer/RudderConfig/RudderConfig.swift new file mode 100644 index 0000000..46b01a5 --- /dev/null +++ b/Example/Rudder-Appsflyer/RudderConfig/RudderConfig.swift @@ -0,0 +1,27 @@ +// +// RudderConfig.swift +// Rudder-Appsflyer +// +// Created by Desu Sai Venkat on 12/04/23. +// +import Foundation + +@objc +class RudderConfig: NSObject, Codable { + @objc let WRITE_KEY: String + @objc let PROD_DATA_PLANE_URL: String + @objc let PROD_CONTROL_PLANE_URL: String + @objc let LOCAL_DATA_PLANE_URL: String + @objc let LOCAL_CONTROL_PLANE_URL: String + @objc let DEV_DATA_PLANE_URL: String + @objc let DEV_CONTROL_PLANE_URL: String + + @objc + class func create(from url: URL) -> RudderConfig? { + if let data = try? Data(contentsOf: url), + let rudderConfig = try? PropertyListDecoder().decode(RudderConfig.self, from: data) { + return rudderConfig + } + return nil + } +} diff --git a/Example/Rudder-Appsflyer/RudderConfig/SampleRudderConfig.plist b/Example/Rudder-Appsflyer/RudderConfig/SampleRudderConfig.plist new file mode 100644 index 0000000..de06912 --- /dev/null +++ b/Example/Rudder-Appsflyer/RudderConfig/SampleRudderConfig.plist @@ -0,0 +1,27 @@ + + + + + + WRITE_KEY + + PROD_DATA_PLANE_URL + + PROD_CONTROL_PLANE_URL + + LOCAL_DATA_PLANE_URL + + LOCAL_CONTROL_PLANE_URL + + DEV_DATA_PLANE_URL + + DEV_CONTROL_PLANE_URL + + + \ No newline at end of file diff --git a/Example/Rudder-Appsflyer/_AppDelegate.m b/Example/Rudder-Appsflyer/_AppDelegate.m index ed06219..281a2df 100644 --- a/Example/Rudder-Appsflyer/_AppDelegate.m +++ b/Example/Rudder-Appsflyer/_AppDelegate.m @@ -10,9 +10,8 @@ #import #import "RudderAppsflyerFactory.h" #import - -static NSString *DATA_PLANE_URL = @"https://6fce-2405-201-c001-18cd-f190-b1cc-2af3-7028.ngrok.io"; -static NSString *WRITE_KEY = @"1pAKRv50y15Ti6UWpYroGJaO0Dj"; +#import +#import "Rudder_Appsflyer_Example-Swift.h" @implementation _AppDelegate @@ -23,83 +22,27 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( [[AppsFlyerLib shared] setAppsFlyerDevKey:@""]; [[AppsFlyerLib shared] setAppleAppID:@" "Apache", :file => "LICENSE" } - s.author = { 'RudderStack' => 'arnab@rudderlabs.com' } + s.license = { :type => "Apache", :file => "LICENSE.md" } + s.author = { 'RudderStack' => 'sdk@rudderstack.com' } s.source = { :git => 'https://github.com/rudderlabs/rudder-integration-appsflyer-ios.git', :tag => "v#{s.version}" } s.platform = :ios, "9.0" s.ios.deployment_target = '10.0' - ## Ref: https://github.com/CocoaPods/CocoaPods/issues/10065 - s.pod_target_xcconfig = { - 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' - } - s.user_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' } - s.static_framework = true s.source_files = 'Rudder-Appsflyer/Classes/**/*' - s.dependency 'Rudder', '~> 1.0' - s.dependency 'AppsFlyerFramework', '~> 6.9.1' + if defined?($AppsflyerSDKVersion) + Pod::UI.puts "#{s.name}: Using user specified Appsflyer SDK version '#{$AppsflyerSDKVersion}'" + appsflyer_sdk_version = $AppsflyerSDKVersion + else + Pod::UI.puts "#{s.name}: Using default Appsflyer SDK version '#{appsflyer_sdk_version}'" + end + + if defined?($RudderSDKVersion) + Pod::UI.puts "#{s.name}: Using user specified Rudder SDK version '#{$RudderSDKVersion}'" + rudder_sdk_version = $RudderSDKVersion + else + Pod::UI.puts "#{s.name}: Using default Rudder SDK version '#{rudder_sdk_version}'" + end + + + s.dependency 'Rudder', rudder_sdk_version + s.dependency 'AppsFlyerFramework', appsflyer_sdk_version end diff --git a/Rudder-Appsflyer/Assets/.gitkeep b/Rudder-Appsflyer/Assets/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/Rudder-Appsflyer/Classes/.gitkeep b/Rudder-Appsflyer/Classes/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/Rudder-Appsflyer/Classes/RudderAppsflyerIntegration.m b/Rudder-Appsflyer/Classes/RudderAppsflyerIntegration.m index 5555a63..5155736 100644 --- a/Rudder-Appsflyer/Classes/RudderAppsflyerIntegration.m +++ b/Rudder-Appsflyer/Classes/RudderAppsflyerIntegration.m @@ -11,6 +11,9 @@ @implementation RudderAppsflyerIntegration NSString *const FIRSTPURCHASE = @"first_purchase"; +NSString *const CREATIVE = @"creative"; +NSArray* TRACK_RESERVED_KEYWORDS; + #pragma mark - Initialization @@ -18,6 +21,19 @@ - (instancetype)initWithConfig:(NSDictionary *)config withAnalytics:(nonnull RSC self = [super init]; if (self) { isNewScreenEnabled = [[config objectForKey:@"useRichEventName"] boolValue]; + TRACK_RESERVED_KEYWORDS = [[NSArray alloc] initWithObjects:KeyQuery, + KeyPrice, + KeyProductId, + KeyCategory, + KeyCurrency, + KeyProducts, + KeyQuantity, + KeyTotal, + KeyRevenue, + KeyOrderId, + KeyShareMessage, + CREATIVE, + KeyRating, nil]; } return self; } @@ -31,7 +47,7 @@ - (void)dump:(RSMessage *)message { - (void) processRudderEvent: (nonnull RSMessage *) message { NSString *type = message.type; if ([type isEqualToString:@"identify"]) { - [[AppsFlyerLib shared] setCustomerUserID:message.userId]; + [[AppsFlyerLib shared] setCustomerUserID:message.userId]; if ([message.context.traits[@"currencyCode"] isKindOfClass:[NSString class]]) { [AppsFlyerLib shared].currencyCode = [[NSString alloc] initWithFormat:@"%@", message.context.traits[@"currencyCode"]]; @@ -63,7 +79,7 @@ - (void) processRudderEvent: (nonnull RSMessage *) message { NSMutableDictionary *afProperties = [[NSMutableDictionary alloc] init]; if ([eventName isEqualToString:ECommProductsSearched]) { afEventName = AFEventSearch; - NSString *query = properties[@"query"]; + NSString *query = properties[KeyQuery]; if (query != nil) { [afProperties setValue:query forKey:AFEventParamSearchString]; } @@ -71,7 +87,7 @@ - (void) processRudderEvent: (nonnull RSMessage *) message { afEventName = AFEventContentView; [self addProductProperties:properties params:afProperties]; } else if ([eventName isEqualToString:ECommProductListViewed]) { - afEventName = @"af_list_view"; + afEventName = AFEventListView; [self addProductListViewedProperties:properties params:afProperties]; } else if ([eventName isEqualToString:ECommProductAddedToWishList]) { afEventName = AFEventAddToWishlist; @@ -89,14 +105,50 @@ - (void) processRudderEvent: (nonnull RSMessage *) message { afEventName = FIRSTPURCHASE; [self addCheckoutProperties:properties params:afProperties]; } + else if ([eventName isEqualToString:ECommPromotionViewed]){ + afEventName = AFEventAdView; + if(properties[CREATIVE]) { + [afProperties setValue:properties[CREATIVE] forKey:AFEventParamAdRevenueAdType]; + } + if(properties[KeyCurrency]) { + [afProperties setValue:properties[KeyCurrency] forKey:AFEventParamCurrency]; + } + } + else if ([eventName isEqualToString:ECommPromotionClicked]){ + afEventName = AFEventAdClick; + if(properties[CREATIVE]) { + [afProperties setValue:properties[CREATIVE] forKey:AFEventParamAdRevenueAdType]; + } + if(properties[KeyCurrency]) { + [afProperties setValue:properties[KeyCurrency] forKey:AFEventParamCurrency]; + } + } + else if ([eventName isEqualToString:ECommPaymentInfoEntered]) { + afEventName = AFEventAddPaymentInfo; + } + else if ([eventName isEqualToString:ECommProductShared] || [eventName isEqualToString:ECommCartShared]) { + afEventName = AFEventShare; + if(properties[KeyShareMessage]) { + [afProperties setValue:properties[KeyShareMessage] forKey:AFEventParamDescription]; + } + } + else if([eventName isEqualToString:ECommProductReviewed]) { + afEventName = AFEventRate; + if(properties[KeyProductId]) { + [afProperties setValue:properties[KeyProductId] forKey:AFEventParamContentId]; + } + if(properties[KeyRating]) { + [afProperties setValue:properties[KeyRating] forKey:AFEventParamRatingValue]; + } + } else if ([eventName isEqualToString:ECommProductRemoved]) { afEventName = @"remove_from_cart"; if (properties != nil) { - NSString *productId = properties[@"product_id"]; + NSString *productId = properties[KeyProductId]; if (productId != nil) { [afProperties setValue:productId forKey:AFEventParamContentId]; } - NSString *category = properties[@"category"]; + NSString *category = properties[KeyCategory]; if (category != nil) { [afProperties setValue:category forKey:AFEventParamContentType]; } @@ -105,6 +157,7 @@ - (void) processRudderEvent: (nonnull RSMessage *) message { else { afEventName = [afEventName stringByReplacingOccurrencesOfString:@" " withString:@"_"]; } + [self attachAllCustomProperties:afProperties properties:properties]; [[AppsFlyerLib shared] logEvent:afEventName withValues:afProperties]; } } else if ([type isEqualToString:@"screen"]) { @@ -129,21 +182,21 @@ - (void) processRudderEvent: (nonnull RSMessage *) message { - (void) addCheckoutProperties: (NSDictionary *) properties params: (NSMutableDictionary *) params { if (properties != nil && params != nil) { - NSNumber *total = properties[@"total"]; + NSNumber *total = properties[KeyTotal]; if (total != nil) { [params setValue:total forKey:AFEventParamPrice]; } - NSArray* products = properties[@"products"]; + NSArray* products = properties[KeyProducts]; NSMutableArray *productIds = [[NSMutableArray alloc] init]; NSMutableArray *productCategories = [[NSMutableArray alloc] init]; NSMutableArray *productQuants = [[NSMutableArray alloc] init]; if (products != nil) { for (NSDictionary* product in products) { if (product != nil) { - NSString *productId = product[@"product_id"]; - NSString *productCategory = product[@"category"]; - NSString *productQuan = product[@"quantity"]; + NSString *productId = product[KeyProductId]; + NSString *productCategory = product[KeyCategory]; + NSString *productQuan = product[KeyQuantity]; if (productId != nil && productCategory != nil && productQuan != nil) { [productIds addObject:productId]; [productCategories addObject:productCategory]; @@ -156,37 +209,37 @@ - (void) addCheckoutProperties: (NSDictionary *) properties params: (NSMutableDi [params setValue:productCategories forKey:AFEventParamContentType]; [params setValue:productQuants forKey:AFEventParamQuantity]; - NSString *currency = properties[@"currency"]; + NSString *currency = properties[KeyCurrency]; if (currency != nil) { [params setValue:currency forKey:AFEventParamCurrency]; } - NSString *orderId = properties[@"order_id"]; + NSString *orderId = properties[KeyOrderId]; if (orderId != nil) { [params setValue:orderId forKey:AFEventParamReceiptId]; - [params setValue:orderId forKey:@"af_order_id"]; + [params setValue:orderId forKey:AFEventParamOrderId]; } - NSString *revenue = properties[@"revenue"]; + NSString *revenue = properties[KeyRevenue]; if (revenue != nil) { [params setValue:revenue forKey:AFEventParamRevenue]; } } } - + - (void) addProductListViewedProperties: (NSDictionary *) properties params: (NSMutableDictionary *) params { if (properties != nil && params != nil) { - NSString *category = properties[@"category"]; + NSString *category = properties[KeyCategory]; if (category != nil) { [params setValue:category forKey:AFEventParamContentType]; } - NSArray* products = properties[@"products"]; + NSArray* products = properties[KeyProducts]; NSMutableArray *productParams = [[NSMutableArray alloc] init]; if (products != nil) { for (NSDictionary* product in products) { if (product != nil) { - NSString *productId = product[@"product_id"]; + NSString *productId = product[KeyProductId]; if (productId != nil) { [productParams addObject:productId]; } @@ -199,27 +252,27 @@ - (void) addProductListViewedProperties: (NSDictionary *) properties params: (NS - (void) addProductProperties: (NSDictionary *) properties params: (NSMutableDictionary *) params { if (properties != nil && params != nil) { - NSString *price = properties[@"price"]; + NSString *price = properties[KeyPrice]; if (price != nil) { [params setValue:price forKey:AFEventParamPrice]; } - NSString *productId = properties[@"product_id"]; + NSString *productId = properties[KeyProductId]; if (productId != nil) { [params setValue:productId forKey:AFEventParamContentId]; } - NSString *category = properties[@"category"]; + NSString *category = properties[KeyCategory]; if (category != nil) { [params setValue:category forKey:AFEventParamContentType]; } - NSString *currency = properties[@"currency"]; + NSString *currency = properties[KeyCurrency]; if (currency != nil) { [params setValue:currency forKey:AFEventParamCurrency]; } - NSNumber *quantity = properties[@"quantity"]; + NSNumber *quantity = properties[KeyQuantity]; if (quantity != nil) { [params setValue:quantity forKey:AFEventParamQuantity]; } @@ -234,6 +287,19 @@ - (void)flush { // Appsflyer doesn't support flush functionality } +- (void)attachAllCustomProperties:(NSMutableDictionary *)afEventProps properties:(NSDictionary *)properties { + if (properties == nil || properties.count == 0) { + return; + } + for (NSString *key in properties) { + id value = properties[key]; + if ([TRACK_RESERVED_KEYWORDS containsObject:key] || key.length == 0) { + continue; + } + afEventProps[key] = value; + } +} + @end