Skip to content

Commit

Permalink
Merge pull request #522 from rudderlabs/release/1.27.0
Browse files Browse the repository at this point in the history
chore(release): pulling release/1.27.0 into master
  • Loading branch information
1abhishekpandey authored Jun 13, 2024
2 parents b3d68b3 + 14f8425 commit a82c0a5
Show file tree
Hide file tree
Showing 21 changed files with 107 additions and 43 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/slack-notify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

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))

### [1.26.3](https://github.com/rudderlabs/rudder-sdk-ios/compare/v1.26.2...v1.26.3) (2024-04-22)


Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ For any questions, concerns, or queries, you can start by asking a question on o
<!----variables---->

[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
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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 */; };
Expand All @@ -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 = "<group>"; };
ED0CA6DB2A7D049E00899C1C /* SampleRudderConfig.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = SampleRudderConfig.plist; sourceTree = "<group>"; };
ED0CA6DC2A7D049E00899C1C /* RudderConfig.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RudderConfig.swift; sourceTree = "<group>"; };
ED3B022F272A67AB000893AA /* RudderSampleAppObjC.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = RudderSampleAppObjC.entitlements; sourceTree = "<group>"; };
ED7619EC2727E28700B086F4 /* RudderSampleAppObjC-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "RudderSampleAppObjC-Info.plist"; sourceTree = "<group>"; };
ED7619EE2727E28700B086F4 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
ED7619EF2727E28700B086F4 /* CustomIntegration.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomIntegration.m; sourceTree = "<group>"; };
ED7619F02727E28700B086F4 /* _ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _ViewController.h; sourceTree = "<group>"; };
ED7619F12727E28700B086F4 /* _AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _AppDelegate.h; sourceTree = "<group>"; };
Expand All @@ -58,7 +54,6 @@
ED8738CA2AB363A80076D24A /* EncryptedDatabaseProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EncryptedDatabaseProvider.h; sourceTree = "<group>"; };
ED8738CC2AB363A80076D24A /* EncryptedDatabaseProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EncryptedDatabaseProvider.m; sourceTree = "<group>"; };
F6A9BB092B9F30CA0076FE23 /* RudderConfig.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = RudderConfig.plist; sourceTree = "<group>"; };

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 = "<group>"; };
/* End PBXFileReference section */

Expand Down Expand Up @@ -123,7 +118,6 @@
isa = PBXGroup;
children = (
F6A9BB092B9F30CA0076FE23 /* RudderConfig.plist */,
ED0CA6DB2A7D049E00899C1C /* SampleRudderConfig.plist */,
ED0CA6DC2A7D049E00899C1C /* RudderConfig.swift */,
);
name = RudderConfig;
Expand All @@ -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 */,
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -298,14 +289,6 @@
/* End PBXSourcesBuildPhase section */

/* Begin PBXVariantGroup section */
ED7619ED2727E28700B086F4 /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
ED7619EE2727E28700B086F4 /* en */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
};
ED7619F32727E28700B086F4 /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
children = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>com.rudderstack.ios.test.objc</string>
<key>CFBundleURLSchemes</key>
<array>
<string>com.ruddertestapp</string>
Expand Down
13 changes: 13 additions & 0 deletions Examples/RudderSampleAppObjC/RudderSampleAppObjC/_AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down Expand Up @@ -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<UIApplicationOpenURLOptionsKey, id> *)options {

if ([[url scheme] isEqualToString:@"com.ruddertestapp"]) {
// Call your custom function with the URLz
[[RSClient sharedInstance]openURL:url options:options];

}
return YES;
}

@end

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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 */; };
Expand All @@ -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 = "<group>"; };
ED00467128A64DE50007206F /* SessionViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SessionViewController.swift; sourceTree = "<group>"; };
ED0CA6D42A7AAC5600899C1C /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
ED0CA7012A7D0B2B00899C1C /* RudderConfig.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = RudderConfig.plist; sourceTree = "<group>"; };
ED0CA7022A7D0B2B00899C1C /* SampleRudderConfig.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = SampleRudderConfig.plist; sourceTree = "<group>"; };
ED0CA7032A7D0B2B00899C1C /* RudderConfig.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RudderConfig.swift; sourceTree = "<group>"; };
ED8738CF2AB36C230076D24A /* EncryptedDatabaseProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EncryptedDatabaseProvider.swift; sourceTree = "<group>"; };
ED8738D82AB41F520076D24A /* RudderSampleAppSwift-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RudderSampleAppSwift-Bridging-Header.h"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -79,7 +75,6 @@
isa = PBXGroup;
children = (
ED0CA7002A7D0B2B00899C1C /* RudderConfig */,
ED0CA6D42A7AAC5600899C1C /* GoogleService-Info.plist */,
06EABC8524665E470043D720 /* AppDelegate.swift */,
EDEAEBC6299CB30200D537C3 /* CustomFilter.swift */,
06EABC8724665E470043D720 /* SceneDelegate.swift */,
Expand Down Expand Up @@ -117,7 +112,6 @@
isa = PBXGroup;
children = (
ED0CA7012A7D0B2B00899C1C /* RudderConfig.plist */,
ED0CA7022A7D0B2B00899C1C /* SampleRudderConfig.plist */,
ED0CA7032A7D0B2B00899C1C /* RudderConfig.swift */,
);
name = RudderConfig;
Expand Down Expand Up @@ -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;
};
Expand Down
13 changes: 13 additions & 0 deletions Examples/RudderSampleAppSwift/RudderSampleAppSwift/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,19 @@
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>com.rudderstack.ios.swift</string>
<key>CFBundleURLSchemes</key>
<array>
<string>com.ruddertestappswift</string>
</array>
</dict>
</array>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<UIOpenURLContext>) {
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.
Expand Down
6 changes: 3 additions & 3 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<p align="center">
<a href="https://cocoapods.org/pods/Rudder">
<img src="https://img.shields.io/static/v1?label=pod&message=v1.26.3&color=blue&style=flat">
<img src="https://img.shields.io/static/v1?label=pod&message=v1.27.0&color=blue&style=flat">
</a>
</p>

Expand Down Expand Up @@ -39,15 +39,15 @@ 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

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:
Expand All @@ -71,7 +71,7 @@ You can also add the RudderStack iOS SDK via Swift Package Mangaer, via one of t

* Enter the package repository (`[email protected]: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)

Expand Down Expand Up @@ -99,7 +99,7 @@ let package = Package(
],
dependencies: [
// Dependencies declare other packages that this package depends on.
.package(url: "[email protected]:rudderlabs/rudder-sdk-ios.git", from: "1.26.3")
.package(url: "[email protected]: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.
Expand Down
4 changes: 4 additions & 0 deletions Sources/Classes/Headers/Public/RSClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ typedef void (^Callback)(NSObject *_Nullable);
- (void) onIntegrationReady:(id<RSIntegrationFactory>)factory withCallback:(Callback)callback;
- (void) clearAdvertisingId;


- (void)openURL:(NSURL *)url options:(NSDictionary<NSString*, id>*)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;
Expand Down
2 changes: 1 addition & 1 deletion Sources/Classes/Headers/Public/RSUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion Sources/Classes/Headers/RSVersion.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
33 changes: 33 additions & 0 deletions Sources/Classes/RSClient.m
Original file line number Diff line number Diff line change
Expand Up @@ -541,4 +541,37 @@ - (void) onIntegrationReady:(id<RSIntegrationFactory>)factory withCallback:(Call
}
}

#pragma mark - Deep Link Track

- (void)openURL:(NSURL *)url options:(NSDictionary<NSString *,NSObject *> *)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
12 changes: 12 additions & 0 deletions Sources/Classes/RSUtils.m
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,18 @@ + (NSString*) serializeSpecialFloatingNumber: (NSNumber *) number {
return [number stringValue];
}

+(NSArray*) extractParamFromURL: (NSURL*) deepLinkURL{
NSArray<NSURLQueryItem *> *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

Expand Down
Loading

0 comments on commit a82c0a5

Please sign in to comment.