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 2c42521d..3f5593c7 100644 --- a/Examples/RudderSampleAppObjC/RudderSampleAppObjC/_AppDelegate.m +++ b/Examples/RudderSampleAppObjC/RudderSampleAppObjC/_AppDelegate.m @@ -106,9 +106,8 @@ + (void) clearAdvertisingId { - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary *)options { if ([[url scheme] isEqualToString:@"com.ruddertestapp"]) { - // Call your custom function with the URL - NSString *appName = [[[NSBundle mainBundle] infoDictionary] objectForKey:(id)kCFBundleNameKey]; - [[RSClient sharedInstance]openURL:url options:options refAppname:appName]; + // Call your custom function with the URLz + [[RSClient sharedInstance]openURL:url options:options]; } return YES; 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/SceneDelegate.swift b/Examples/RudderSampleAppSwift/RudderSampleAppSwift/SceneDelegate.swift index 7341e1dc..2fce9d75 100644 --- a/Examples/RudderSampleAppSwift/RudderSampleAppSwift/SceneDelegate.swift +++ b/Examples/RudderSampleAppSwift/RudderSampleAppSwift/SceneDelegate.swift @@ -17,12 +17,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { internal func scene(_ scene: UIScene, openURLContexts URLContexts: Set) { guard let urlContext = URLContexts.first else { return } let url = urlContext.url - //let options = urlContext.options - - // Handle the URL - let appName = Bundle.main.infoDictionary?[kCFBundleNameKey as String] - let options = [String: String]() - RSClient.sharedInstance()?.open(url, options: options, refAppname: appName as! String) + RSClient.sharedInstance()?.open(url) } func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { 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 6f378ccf..e11e1542 100644 --- a/Sources/Classes/Headers/Public/RSClient.h +++ b/Sources/Classes/Headers/Public/RSClient.h @@ -93,8 +93,8 @@ typedef void (^Callback)(NSObject *_Nullable); - (void) onIntegrationReady:(id)factory withCallback:(Callback)callback; - (void) clearAdvertisingId; -- (void)openURL:(NSURL *)url options:(NSDictionary *)options refAppname:(NSString *)appname; - +- (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/RSClient.m b/Sources/Classes/RSClient.m index 5b57e1af..c2568ca7 100644 --- a/Sources/Classes/RSClient.m +++ b/Sources/Classes/RSClient.m @@ -543,7 +543,7 @@ - (void) onIntegrationReady:(id)factory withCallback:(Call #pragma mark - Deep Link Track -- (void)openURL:(NSURL *)url options:(NSDictionary *)options refAppname:(NSString *)appname +- (void)openURL:(NSURL *)url options:(NSDictionary *)options { if ([RSClient getOptStatus]) { [self reportDiscardedEvent]; @@ -560,7 +560,26 @@ - (void)openURL:(NSURL *)url options:(NSDictionary *)options refAppname:(NSStrin } } properties[@"url"] = urlString; - properties[@"referring_application"] = appname; + [self track:@"Deep Link Opened" properties:[properties copy]]; +} + +- (void)openURL:(NSURL *)url +{ + if ([RSClient getOptStatus]) { + [self reportDiscardedEvent]; + return; + } + NSString *urlString = url.absoluteString; + NSMutableDictionary *properties = [[NSMutableDictionary alloc]init]; + NSMutableArray *paramArray = [RSUtils extractParamFromURL:url]; + if (paramArray.count > 0) { + // Iterate through the query items + for (NSURLQueryItem *item in paramArray) { + NSLog(@"Parameter name: %@, value: %@", item.name, item.value); + properties[item.name] = item.value; + } + } + properties[@"url"] = urlString; [self track:@"Deep Link Opened" properties:[properties copy]]; }