From 759a9f35d658c54ce801207dc4f9a09a04f63903 Mon Sep 17 00:00:00 2001 From: Abhishek Pandey <64667840+1abhishekpandey@users.noreply.github.com> Date: Mon, 22 Apr 2024 21:35:10 +0530 Subject: [PATCH 1/7] fix: remove tracking domain url from Privacy Manifest file (#509) --- Sources/Resources/PrivacyInfo.xcprivacy | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Sources/Resources/PrivacyInfo.xcprivacy b/Sources/Resources/PrivacyInfo.xcprivacy index 80af55f1..54919e59 100644 --- a/Sources/Resources/PrivacyInfo.xcprivacy +++ b/Sources/Resources/PrivacyInfo.xcprivacy @@ -92,9 +92,5 @@ - NSPrivacyTrackingDomains - - rudderstack.com/ - From 8f102dac469826c626b7d43edb6ac09b0e4d794a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 24 Apr 2024 18:27:02 +0530 Subject: [PATCH 2/7] chore(deps): bump slackapi/slack-github-action from 1.25.0 to 1.26.0 (#511) Bumps [slackapi/slack-github-action](https://github.com/slackapi/slack-github-action) from 1.25.0 to 1.26.0. - [Release notes](https://github.com/slackapi/slack-github-action/releases) - [Commits](https://github.com/slackapi/slack-github-action/compare/v1.25.0...v1.26.0) --- updated-dependencies: - dependency-name: slackapi/slack-github-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Abhishek Pandey <64667840+1abhishekpandey@users.noreply.github.com> --- .github/workflows/slack-notify.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/slack-notify.yml b/.github/workflows/slack-notify.yml index 7cb6198b..c86e9b81 100644 --- a/.github/workflows/slack-notify.yml +++ b/.github/workflows/slack-notify.yml @@ -11,7 +11,7 @@ jobs: steps: - name: Send message to Slack channel id: slack - uses: slackapi/slack-github-action@v1.25.0 + uses: slackapi/slack-github-action@v1.26.0 env: SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} PROJECT_NAME: 'iOS SDK' From 8905a6ec42dd20b434d94fdae65c9f31db6f089b Mon Sep 17 00:00:00 2001 From: gitcommitshow <56937085+gitcommitshow@users.noreply.github.com> Date: Wed, 5 Jun 2024 21:46:34 +0530 Subject: [PATCH 3/7] docs: update cla link --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index be6944b2..44ef81c1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -40,4 +40,4 @@ For any questions, concerns, or queries, you can start by asking a question on o [issue]: https://github.com/rudderlabs/rudder-sdk-ios/issues/new -[CLA]: https://rudderlabs.wufoo.com/forms/rudderlabs-contributor-license-agreement +[CLA]: https://forms.gle/845JRGVZaC6kPZy68 From f30f16397faf7943cc206cd1211ea8632a786e36 Mon Sep 17 00:00:00 2001 From: Abhishek Pandey <64667840+1abhishekpandey@users.noreply.github.com> Date: Tue, 11 Jun 2024 15:58:35 +0530 Subject: [PATCH 4/7] ci: change the latest platform to macos-latest-large (#521) --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 97c20b31..44095ff4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,7 +19,7 @@ jobs: build: name: 'Tests & Coverage' needs: cancel_previous - runs-on: macOS-latest + runs-on: macos-latest-large env: BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory # Directory where build-wrapper output will be placed steps: From e9ad05b6778823f09645ef53d1d706de54c4ef6d Mon Sep 17 00:00:00 2001 From: shwetalodhe123 <39183358+shwetalodhe123@users.noreply.github.com> Date: Thu, 13 Jun 2024 15:58:14 +0530 Subject: [PATCH 5/7] feat: add support for deep link tracking (#520) * feat: add deep link support * feat: deep link param read support * feat: deep link example swift and ObjC support * feat: support deep link modifications * feat: support deep link modification * feat: Support deep link code revert * feat: update support deep link method * feat: support deep link mehod modification * feat: support deep link method modification * feat: deep link method modification --- ...eRudderConfig.plist => RudderConfig.plist} | 0 .../project.pbxproj | 17 ---------- .../RudderSampleAppObjC-Info.plist | 2 ++ .../RudderSampleAppObjC/_AppDelegate.m | 13 ++++++++ .../en.lproj/InfoPlist.strings | 2 -- .../project.pbxproj | 8 ----- .../RudderSampleAppSwift/Info.plist | 13 ++++++++ .../RudderSampleAppSwift/SceneDelegate.swift | 9 ++++- Podfile.lock | 6 ++-- Sources/Classes/Headers/Public/RSClient.h | 4 +++ Sources/Classes/Headers/Public/RSUtils.h | 2 +- Sources/Classes/RSClient.m | 33 +++++++++++++++++++ Sources/Classes/RSUtils.m | 12 +++++++ 13 files changed, 89 insertions(+), 32 deletions(-) rename Examples/RudderConfig/{SampleRudderConfig.plist => RudderConfig.plist} (100%) delete mode 100644 Examples/RudderSampleAppObjC/RudderSampleAppObjC/en.lproj/InfoPlist.strings diff --git a/Examples/RudderConfig/SampleRudderConfig.plist b/Examples/RudderConfig/RudderConfig.plist similarity index 100% rename from Examples/RudderConfig/SampleRudderConfig.plist rename to Examples/RudderConfig/RudderConfig.plist diff --git a/Examples/RudderSampleAppObjC/RudderSampleAppObjC.xcodeproj/project.pbxproj b/Examples/RudderSampleAppObjC/RudderSampleAppObjC.xcodeproj/project.pbxproj index 8db2684a..1f821c7b 100644 --- a/Examples/RudderSampleAppObjC/RudderSampleAppObjC.xcodeproj/project.pbxproj +++ b/Examples/RudderSampleAppObjC/RudderSampleAppObjC.xcodeproj/project.pbxproj @@ -12,9 +12,7 @@ 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58F195388D20070C39A /* CoreGraphics.framework */; }; 6003F592195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; }; D7658499F5E99A9FFCBCFD5E /* Pods_RudderSampleAppObjC.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B7D86F781FF516ED3B29744C /* Pods_RudderSampleAppObjC.framework */; }; - ED0CA6DE2A7D049E00899C1C /* SampleRudderConfig.plist in Resources */ = {isa = PBXBuildFile; fileRef = ED0CA6DB2A7D049E00899C1C /* SampleRudderConfig.plist */; }; ED0CA6DF2A7D049E00899C1C /* RudderConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED0CA6DC2A7D049E00899C1C /* RudderConfig.swift */; }; - ED7619FF2727E28800B086F4 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = ED7619ED2727E28700B086F4 /* InfoPlist.strings */; }; ED761A002727E28800B086F4 /* CustomIntegration.m in Sources */ = {isa = PBXBuildFile; fileRef = ED7619EF2727E28700B086F4 /* CustomIntegration.m */; }; ED761A012727E28800B086F4 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = ED7619F32727E28700B086F4 /* LaunchScreen.storyboard */; }; ED761A022727E28800B086F4 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = ED7619F52727E28700B086F4 /* Main.storyboard */; }; @@ -37,11 +35,9 @@ 6003F5AF195388D20070C39A /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; B7D86F781FF516ED3B29744C /* Pods_RudderSampleAppObjC.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RudderSampleAppObjC.framework; sourceTree = BUILT_PRODUCTS_DIR; }; ED0CA6D62A7D048D00899C1C /* RudderSampleAppObjC-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RudderSampleAppObjC-Bridging-Header.h"; sourceTree = ""; }; - ED0CA6DB2A7D049E00899C1C /* SampleRudderConfig.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = SampleRudderConfig.plist; sourceTree = ""; }; ED0CA6DC2A7D049E00899C1C /* RudderConfig.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RudderConfig.swift; sourceTree = ""; }; ED3B022F272A67AB000893AA /* RudderSampleAppObjC.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = RudderSampleAppObjC.entitlements; sourceTree = ""; }; ED7619EC2727E28700B086F4 /* RudderSampleAppObjC-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "RudderSampleAppObjC-Info.plist"; sourceTree = ""; }; - ED7619EE2727E28700B086F4 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; ED7619EF2727E28700B086F4 /* CustomIntegration.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomIntegration.m; sourceTree = ""; }; ED7619F02727E28700B086F4 /* _ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _ViewController.h; sourceTree = ""; }; ED7619F12727E28700B086F4 /* _AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _AppDelegate.h; sourceTree = ""; }; @@ -58,7 +54,6 @@ ED8738CA2AB363A80076D24A /* EncryptedDatabaseProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EncryptedDatabaseProvider.h; sourceTree = ""; }; ED8738CC2AB363A80076D24A /* EncryptedDatabaseProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EncryptedDatabaseProvider.m; sourceTree = ""; }; F6A9BB092B9F30CA0076FE23 /* RudderConfig.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = RudderConfig.plist; sourceTree = ""; }; - F928F8A942558010CC7088BF /* Pods-RudderSampleAppObjC.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RudderSampleAppObjC.debug.xcconfig"; path = "Target Support Files/Pods-RudderSampleAppObjC/Pods-RudderSampleAppObjC.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ @@ -123,7 +118,6 @@ isa = PBXGroup; children = ( F6A9BB092B9F30CA0076FE23 /* RudderConfig.plist */, - ED0CA6DB2A7D049E00899C1C /* SampleRudderConfig.plist */, ED0CA6DC2A7D049E00899C1C /* RudderConfig.swift */, ); name = RudderConfig; @@ -146,7 +140,6 @@ ED8738CA2AB363A80076D24A /* EncryptedDatabaseProvider.h */, ED8738CC2AB363A80076D24A /* EncryptedDatabaseProvider.m */, ED7619FA2727E28800B086F4 /* Images.xcassets */, - ED7619ED2727E28700B086F4 /* InfoPlist.strings */, ED7619F32727E28700B086F4 /* LaunchScreen.storyboard */, ED7619F82727E28700B086F4 /* main.m */, ED7619F52727E28700B086F4 /* Main.storyboard */, @@ -220,9 +213,7 @@ files = ( F6A9BB0A2B9F30CA0076FE23 /* RudderConfig.plist in Resources */, ED761A012727E28800B086F4 /* LaunchScreen.storyboard in Resources */, - ED0CA6DE2A7D049E00899C1C /* SampleRudderConfig.plist in Resources */, ED761A052727E28800B086F4 /* Images.xcassets in Resources */, - ED7619FF2727E28800B086F4 /* InfoPlist.strings in Resources */, ED761A022727E28800B086F4 /* Main.storyboard in Resources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -298,14 +289,6 @@ /* End PBXSourcesBuildPhase section */ /* Begin PBXVariantGroup section */ - ED7619ED2727E28700B086F4 /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - ED7619EE2727E28700B086F4 /* en */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; ED7619F32727E28700B086F4 /* LaunchScreen.storyboard */ = { isa = PBXVariantGroup; children = ( diff --git a/Examples/RudderSampleAppObjC/RudderSampleAppObjC/RudderSampleAppObjC-Info.plist b/Examples/RudderSampleAppObjC/RudderSampleAppObjC/RudderSampleAppObjC-Info.plist index 3c19e5e0..c2c58103 100644 --- a/Examples/RudderSampleAppObjC/RudderSampleAppObjC/RudderSampleAppObjC-Info.plist +++ b/Examples/RudderSampleAppObjC/RudderSampleAppObjC/RudderSampleAppObjC-Info.plist @@ -23,6 +23,8 @@ CFBundleTypeRole Editor + CFBundleURLName + com.rudderstack.ios.test.objc CFBundleURLSchemes com.ruddertestapp diff --git a/Examples/RudderSampleAppObjC/RudderSampleAppObjC/_AppDelegate.m b/Examples/RudderSampleAppObjC/RudderSampleAppObjC/_AppDelegate.m index 1e6c9c8b..efea32c9 100644 --- a/Examples/RudderSampleAppObjC/RudderSampleAppObjC/_AppDelegate.m +++ b/Examples/RudderSampleAppObjC/RudderSampleAppObjC/_AppDelegate.m @@ -46,6 +46,7 @@ + (void) initializeSDK { } } + + (void) sendIdentify { NSString* userId = [[NSString alloc] initWithFormat:@"User %d",userCount]; NSString* userEmail = [[NSString alloc] initWithFormat:@"User%d@gmail.com",userCount]; @@ -100,4 +101,16 @@ + (void) clearAdvertisingId { [[RSClient sharedInstance] clearAdvertisingId]; } +// This deep link API will be triggered on devices having iOS version 12 and below + +- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary *)options { + + if ([[url scheme] isEqualToString:@"com.ruddertestapp"]) { + // Call your custom function with the URLz + [[RSClient sharedInstance]openURL:url options:options]; + + } + return YES; + } + @end diff --git a/Examples/RudderSampleAppObjC/RudderSampleAppObjC/en.lproj/InfoPlist.strings b/Examples/RudderSampleAppObjC/RudderSampleAppObjC/en.lproj/InfoPlist.strings deleted file mode 100644 index 477b28ff..00000000 --- a/Examples/RudderSampleAppObjC/RudderSampleAppObjC/en.lproj/InfoPlist.strings +++ /dev/null @@ -1,2 +0,0 @@ -/* Localized versions of Info.plist keys */ - diff --git a/Examples/RudderSampleAppSwift/RudderSampleAppSwift.xcodeproj/project.pbxproj b/Examples/RudderSampleAppSwift/RudderSampleAppSwift.xcodeproj/project.pbxproj index 56bcb79c..dc3e5dda 100644 --- a/Examples/RudderSampleAppSwift/RudderSampleAppSwift.xcodeproj/project.pbxproj +++ b/Examples/RudderSampleAppSwift/RudderSampleAppSwift.xcodeproj/project.pbxproj @@ -15,9 +15,7 @@ 06EABC9224665E480043D720 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 06EABC9024665E480043D720 /* LaunchScreen.storyboard */; }; DFDD9226B8A80360A231BD44 /* Pods_RudderSampleAppSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D50A9B077957B1C39E075D10 /* Pods_RudderSampleAppSwift.framework */; }; ED00467228A64DE50007206F /* SessionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED00467128A64DE50007206F /* SessionViewController.swift */; }; - ED0CA6D52A7AAC5600899C1C /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = ED0CA6D42A7AAC5600899C1C /* GoogleService-Info.plist */; }; ED0CA7042A7D0B2B00899C1C /* RudderConfig.plist in Resources */ = {isa = PBXBuildFile; fileRef = ED0CA7012A7D0B2B00899C1C /* RudderConfig.plist */; }; - ED0CA7052A7D0B2B00899C1C /* SampleRudderConfig.plist in Resources */ = {isa = PBXBuildFile; fileRef = ED0CA7022A7D0B2B00899C1C /* SampleRudderConfig.plist */; }; ED0CA7062A7D0B2B00899C1C /* RudderConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED0CA7032A7D0B2B00899C1C /* RudderConfig.swift */; }; ED8738D02AB36C230076D24A /* EncryptedDatabaseProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED8738CF2AB36C230076D24A /* EncryptedDatabaseProvider.swift */; }; EDEAEBC7299CB30200D537C3 /* CustomFilter.swift in Sources */ = {isa = PBXBuildFile; fileRef = EDEAEBC6299CB30200D537C3 /* CustomFilter.swift */; }; @@ -35,9 +33,7 @@ D50A9B077957B1C39E075D10 /* Pods_RudderSampleAppSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RudderSampleAppSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; E32C35F6B909BB22A7F0553E /* Pods-RudderSampleAppSwift.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RudderSampleAppSwift.release.xcconfig"; path = "Target Support Files/Pods-RudderSampleAppSwift/Pods-RudderSampleAppSwift.release.xcconfig"; sourceTree = ""; }; ED00467128A64DE50007206F /* SessionViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SessionViewController.swift; sourceTree = ""; }; - ED0CA6D42A7AAC5600899C1C /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; ED0CA7012A7D0B2B00899C1C /* RudderConfig.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = RudderConfig.plist; sourceTree = ""; }; - ED0CA7022A7D0B2B00899C1C /* SampleRudderConfig.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = SampleRudderConfig.plist; sourceTree = ""; }; ED0CA7032A7D0B2B00899C1C /* RudderConfig.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RudderConfig.swift; sourceTree = ""; }; ED8738CF2AB36C230076D24A /* EncryptedDatabaseProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EncryptedDatabaseProvider.swift; sourceTree = ""; }; ED8738D82AB41F520076D24A /* RudderSampleAppSwift-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RudderSampleAppSwift-Bridging-Header.h"; sourceTree = ""; }; @@ -79,7 +75,6 @@ isa = PBXGroup; children = ( ED0CA7002A7D0B2B00899C1C /* RudderConfig */, - ED0CA6D42A7AAC5600899C1C /* GoogleService-Info.plist */, 06EABC8524665E470043D720 /* AppDelegate.swift */, EDEAEBC6299CB30200D537C3 /* CustomFilter.swift */, 06EABC8724665E470043D720 /* SceneDelegate.swift */, @@ -117,7 +112,6 @@ isa = PBXGroup; children = ( ED0CA7012A7D0B2B00899C1C /* RudderConfig.plist */, - ED0CA7022A7D0B2B00899C1C /* SampleRudderConfig.plist */, ED0CA7032A7D0B2B00899C1C /* RudderConfig.swift */, ); name = RudderConfig; @@ -186,10 +180,8 @@ files = ( 06EABC9224665E480043D720 /* LaunchScreen.storyboard in Resources */, ED0CA7042A7D0B2B00899C1C /* RudderConfig.plist in Resources */, - ED0CA7052A7D0B2B00899C1C /* SampleRudderConfig.plist in Resources */, 06EABC8F24665E480043D720 /* Assets.xcassets in Resources */, 06EABC8D24665E470043D720 /* Main.storyboard in Resources */, - ED0CA6D52A7AAC5600899C1C /* GoogleService-Info.plist in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/Examples/RudderSampleAppSwift/RudderSampleAppSwift/Info.plist b/Examples/RudderSampleAppSwift/RudderSampleAppSwift/Info.plist index 2a3483c0..761e825c 100644 --- a/Examples/RudderSampleAppSwift/RudderSampleAppSwift/Info.plist +++ b/Examples/RudderSampleAppSwift/RudderSampleAppSwift/Info.plist @@ -16,6 +16,19 @@ $(PRODUCT_BUNDLE_PACKAGE_TYPE) CFBundleShortVersionString 1.0 + CFBundleURLTypes + + + CFBundleTypeRole + Editor + CFBundleURLName + com.rudderstack.ios.swift + CFBundleURLSchemes + + com.ruddertestappswift + + + CFBundleVersion 1 LSRequiresIPhoneOS diff --git a/Examples/RudderSampleAppSwift/RudderSampleAppSwift/SceneDelegate.swift b/Examples/RudderSampleAppSwift/RudderSampleAppSwift/SceneDelegate.swift index 49cae587..2fce9d75 100644 --- a/Examples/RudderSampleAppSwift/RudderSampleAppSwift/SceneDelegate.swift +++ b/Examples/RudderSampleAppSwift/RudderSampleAppSwift/SceneDelegate.swift @@ -7,12 +7,19 @@ // import UIKit +import Rudder class SceneDelegate: UIResponder, UIWindowSceneDelegate { var window: UIWindow? - + @available(iOS 13.0, *) + internal func scene(_ scene: UIScene, openURLContexts URLContexts: Set) { + guard let urlContext = URLContexts.first else { return } + let url = urlContext.url + RSClient.sharedInstance()?.open(url) + } + func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. diff --git a/Podfile.lock b/Podfile.lock index ebb5c26f..da14c407 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -3,7 +3,7 @@ PODS: - RSCrashReporter (= 1.0.1) - RudderKit (= 1.4.0) - RSCrashReporter (1.0.1) - - Rudder (1.25.2): + - Rudder (1.26.3): - MetricsReporter (= 1.2.1) - RudderKit (1.4.0) - SQLCipher (4.5.4): @@ -33,10 +33,10 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: MetricsReporter: 99596ee5003c69949ed2f50acc34aee83c42f843 RSCrashReporter: 6b8376ac729b0289ebe0908553e5f56d8171f313 - Rudder: c6f6c7b266136c7d7990bccec40d2b0a3057abc6 + Rudder: 23456f79749849870e18c45bd250d6e2229a7147 RudderKit: d9d6997696e1642b753d8bdf94e57af643a68f03 SQLCipher: 905b145f65f349f26da9e60a19901ad24adcd381 PODFILE CHECKSUM: b6937cee06e0633464427ff0d975d40e17419e9f -COCOAPODS: 1.14.2 +COCOAPODS: 1.15.2 diff --git a/Sources/Classes/Headers/Public/RSClient.h b/Sources/Classes/Headers/Public/RSClient.h index 6a62a2ea..78d83535 100644 --- a/Sources/Classes/Headers/Public/RSClient.h +++ b/Sources/Classes/Headers/Public/RSClient.h @@ -93,6 +93,10 @@ typedef void (^Callback)(NSObject *_Nullable); - (void) onIntegrationReady:(id)factory withCallback:(Callback)callback; - (void) clearAdvertisingId; + +- (void)openURL:(NSURL *)url options:(NSDictionary*)options; +- (void)openURL:(NSURL *)url; + @property (strong, nonatomic, readonly) NSNumber* _Nullable sessionId; @property (strong, nonatomic, readonly) NSString* _Nullable anonymousId; @property (strong, nonatomic, readonly) RSConfig* _Nullable config; diff --git a/Sources/Classes/Headers/Public/RSUtils.h b/Sources/Classes/Headers/Public/RSUtils.h index 70990864..d2ef1c73 100644 --- a/Sources/Classes/Headers/Public/RSUtils.h +++ b/Sources/Classes/Headers/Public/RSUtils.h @@ -49,7 +49,7 @@ NS_ASSUME_NONNULL_BEGIN + (BOOL) isEmptyString:(NSString *)value; + (BOOL) isValidIDFA:(NSString*)idfa; + (BOOL) isSpecialFloatingNumber:(NSNumber *)number; - ++(NSArray*) extractParamFromURL: (NSURL*) deepLinkURL; extern unsigned int MAX_EVENT_SIZE; extern unsigned int MAX_BATCH_SIZE; diff --git a/Sources/Classes/RSClient.m b/Sources/Classes/RSClient.m index 54ced2a8..645af265 100644 --- a/Sources/Classes/RSClient.m +++ b/Sources/Classes/RSClient.m @@ -541,4 +541,37 @@ - (void) onIntegrationReady:(id)factory withCallback:(Call } } +#pragma mark - Deep Link Track + +- (void)openURL:(NSURL *)url options:(NSDictionary *)options +{ + if ([RSClient getOptStatus]) { + [self reportDiscardedEvent]; + return; + } + NSString *urlString = url.absoluteString; + NSMutableDictionary *properties = [NSMutableDictionary dictionaryWithCapacity:options.count + 2]; + NSArray *paramArray = [RSUtils extractParamFromURL:url]; + if (paramArray.count > 0) { + // Iterate through the query items + for (NSURLQueryItem *item in paramArray) { + [RSLogger logVerbose:[[NSString alloc] initWithFormat:@"Parameter name: %@, value: %@", item.name, item.value]]; + properties[item.name] = item.value; + } + } + properties[@"url"] = urlString; + if (options != nil) { + for (NSString *key in options) { + properties[key] = options[key]; + } + } + [self track:@"Deep Link Opened" properties:[properties copy]]; +} + +- (void)openURL:(NSURL *)url +{ + NSDictionary *options = [[NSDictionary alloc] init]; + [self openURL:url options:options]; +} + @end diff --git a/Sources/Classes/RSUtils.m b/Sources/Classes/RSUtils.m index 76e285e7..927fb1c7 100644 --- a/Sources/Classes/RSUtils.m +++ b/Sources/Classes/RSUtils.m @@ -276,6 +276,18 @@ + (NSString*) serializeSpecialFloatingNumber: (NSNumber *) number { return [number stringValue]; } ++(NSArray*) extractParamFromURL: (NSURL*) deepLinkURL{ + NSArray *queryItems; + if (deepLinkURL) { + // Create NSURLComponents object + NSURLComponents *components = [NSURLComponents componentsWithURL:deepLinkURL resolvingAgainstBaseURL:NO]; + + // Get the query items + queryItems = components.queryItems; + + } + return queryItems; +} unsigned int MAX_EVENT_SIZE = 32 * 1024; // 32 KB unsigned int MAX_BATCH_SIZE = 500 * 1024; // 500 KB From 24a8704175571208848f5febad8806169ca17a8e Mon Sep 17 00:00:00 2001 From: GitHub actions Date: Thu, 13 Jun 2024 10:31:53 +0000 Subject: [PATCH 6/7] chore(release): 1.27.0 --- CHANGELOG.md | 12 ++++++++++++ README.md | 10 +++++----- Sources/Classes/Headers/RSVersion.h | 2 +- package.json | 2 +- sonar-project.properties | 2 +- 5 files changed, 20 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fb433a5e..18a51ee8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,18 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [1.27.0](https://github.com/rudderlabs/rudder-sdk-ios/compare/v1.26.2...v1.27.0) (2024-06-13) + + +### Features + +* add support for deep link tracking ([#520](https://github.com/rudderlabs/rudder-sdk-ios/issues/520)) ([e9ad05b](https://github.com/rudderlabs/rudder-sdk-ios/commit/e9ad05b6778823f09645ef53d1d706de54c4ef6d)) + + +### Bug Fixes + +* remove tracking domain url from Privacy Manifest file ([#509](https://github.com/rudderlabs/rudder-sdk-ios/issues/509)) ([759a9f3](https://github.com/rudderlabs/rudder-sdk-ios/commit/759a9f35d658c54ce801207dc4f9a09a04f63903)) + ### [1.26.3](https://github.com/rudderlabs/rudder-sdk-ios/compare/v1.26.2...v1.26.3) (2024-04-22) diff --git a/README.md b/README.md index 07a1dd9c..c16c9a73 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@

- +

@@ -39,7 +39,7 @@ The iOS SDK is available through [**CocoaPods**](https://cocoapods.org), [**Cart To install the SDK, simply add the following line to your Podfile: ```xcode -pod 'Rudder', '1.26.3' +pod 'Rudder', '1.27.0' ``` ### Carthage @@ -47,7 +47,7 @@ pod 'Rudder', '1.26.3' For Carthage support, add the following line to your `Cartfile`: ```xcode -github "rudderlabs/rudder-sdk-ios" "v1.26.3" +github "rudderlabs/rudder-sdk-ios" "v1.27.0" ``` > Remember to include the following code in all `.m` and `.h` files where you want to refer to or use the RudderStack SDK classes, as shown: @@ -71,7 +71,7 @@ You can also add the RudderStack iOS SDK via Swift Package Mangaer, via one of t * Enter the package repository (`git@github.com:rudderlabs/rudder-sdk-ios.git`) in the search bar. -* In **Dependency Rule**, select **Up to Next Major Version** and enter `1.26.3` as the value, as shown: +* In **Dependency Rule**, select **Up to Next Major Version** and enter `1.27.0` as the value, as shown: ![Setting dependency](https://user-images.githubusercontent.com/59817155/145574696-8c849749-13e0-40d5-aacb-3fccb5c8e67d.png) @@ -99,7 +99,7 @@ let package = Package( ], dependencies: [ // Dependencies declare other packages that this package depends on. - .package(url: "git@github.com:rudderlabs/rudder-sdk-ios.git", from: "1.26.3") + .package(url: "git@github.com:rudderlabs/rudder-sdk-ios.git", from: "1.27.0") ], targets: [ // Targets are the basic building blocks of a package. A target can define a module or a test suite. diff --git a/Sources/Classes/Headers/RSVersion.h b/Sources/Classes/Headers/RSVersion.h index 51515f86..45eb7ac8 100644 --- a/Sources/Classes/Headers/RSVersion.h +++ b/Sources/Classes/Headers/RSVersion.h @@ -8,6 +8,6 @@ #ifndef RSVersion_h #define RSVersion_h -NSString *const SDK_VERSION = @"1.26.3"; +NSString *const SDK_VERSION = @"1.27.0"; #endif /* RSVersion_h */ diff --git a/package.json b/package.json index ad2ec9ff..c93d0153 100644 --- a/package.json +++ b/package.json @@ -1,4 +1,4 @@ { - "version": "1.26.3", + "version": "1.27.0", "description": "Rudder is a platform for collecting, storing and routing customer event data to dozens of tools" } diff --git a/sonar-project.properties b/sonar-project.properties index 666bedd8..d5c51e54 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -6,7 +6,7 @@ sonar.qualitygate.wait=false sonar.projectKey=rudderlabs_rudder-sdk-ios sonar.organization=rudderlabs sonar.projectName=RudderStack iOS SDK -sonar.projectVersion=1.26.3 +sonar.projectVersion=1.27.0 # C/C++/Objective-C related details # sonar.cfamily.compile-commands=compile_commands.json From 14f84258781b5a07fa8081c6d5de576755bf75c4 Mon Sep 17 00:00:00 2001 From: Abhishek Pandey <64667840+1abhishekpandey@users.noreply.github.com> Date: Thu, 13 Jun 2024 16:09:30 +0530 Subject: [PATCH 7/7] chore: remove Bug Fixes section from the CHANGELOG file This is already released in the previous v1.26.3 release --- CHANGELOG.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 18a51ee8..25cbb92c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,11 +9,6 @@ All notable changes to this project will be documented in this file. See [standa * add support for deep link tracking ([#520](https://github.com/rudderlabs/rudder-sdk-ios/issues/520)) ([e9ad05b](https://github.com/rudderlabs/rudder-sdk-ios/commit/e9ad05b6778823f09645ef53d1d706de54c4ef6d)) - -### Bug Fixes - -* remove tracking domain url from Privacy Manifest file ([#509](https://github.com/rudderlabs/rudder-sdk-ios/issues/509)) ([759a9f3](https://github.com/rudderlabs/rudder-sdk-ios/commit/759a9f35d658c54ce801207dc4f9a09a04f63903)) - ### [1.26.3](https://github.com/rudderlabs/rudder-sdk-ios/compare/v1.26.2...v1.26.3) (2024-04-22)