Skip to content

Commit 28f5952

Browse files
uercegnonelse
authored andcommitted
refac: update example apps to new processDeeplink: signature
1 parent 87806b8 commit 28f5952

File tree

7 files changed

+12
-12
lines changed

7 files changed

+12
-12
lines changed

AdjustTests/AdjustTestApp/AdjustTestApp/AppDelegate.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ - (void)applicationWillTerminate:(UIApplication *)application {
4343
}
4444

4545
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey, id> *)options {
46-
[Adjust processDeeplink:url];
46+
[Adjust processDeeplink:[[ADJDeeplink alloc] initWithDeeplink:url]];
4747
return YES;
4848
}
4949

examples/AdjustExample-FbPixel/AdjustExample-FbPixel/AppDelegate.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDiction
2929
// url object contains the deep link
3030

3131
// Call the below method to send deep link to Adjust backend
32-
[Adjust processDeeplink:url];
32+
[Adjust processDeeplink:[[ADJDeeplink alloc] initWithDeeplink:url]];
3333
return YES;
3434
}
3535

3636
- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray<id<UIUserActivityRestoring>> *restorableObjects))restorationHandler {
3737
if ([[userActivity activityType] isEqualToString:NSUserActivityTypeBrowsingWeb]) {
38-
[Adjust processDeeplink:[userActivity webpageURL]];
38+
[Adjust processDeeplink:[[ADJDeeplink alloc] initWithDeeplink:[userActivity webpageURL]]];
3939
}
4040
return YES;
4141
}

examples/AdjustExample-ObjC/AdjustExample-ObjC/AppDelegate.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDiction
5252
NSLog(@"Scheme based deep link opened an app: %@", url);
5353

5454
// Call the below method to send deep link to Adjust backend
55-
[Adjust processDeeplink:url];
55+
[Adjust processDeeplink:[[ADJDeeplink alloc] initWithDeeplink:url]];
5656

5757
return YES;
5858
}
@@ -61,7 +61,7 @@ - (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserAct
6161
if ([[userActivity activityType] isEqualToString:NSUserActivityTypeBrowsingWeb]) {
6262
NSLog(@"Universal link opened an app: %@", [userActivity webpageURL]);
6363
// Pass deep link to Adjust in order to potentially reattribute user.
64-
[Adjust processDeeplink:[userActivity webpageURL]];
64+
[Adjust processDeeplink:[[ADJDeeplink alloc] initWithDeeplink:[userActivity webpageURL]]];
6565
}
6666

6767
return YES;

examples/AdjustExample-Swift/AdjustExample-Swift/AppDelegate.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@ class AppDelegate: UIResponder, UIApplicationDelegate, AdjustDelegate {
4949
// url object contains the deep link
5050

5151
// Call the below method to send deep link to Adjust backend
52-
Adjust.processDeeplink(url)
52+
Adjust.processDeeplink(ADJDeeplink(deeplink: url)!)
5353
return true
5454
}
5555

5656
func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
5757
if (userActivity.activityType == NSUserActivityTypeBrowsingWeb) {
5858
NSLog("Universal link opened an app: %@", userActivity.webpageURL!.absoluteString)
5959
// Pass deep link to Adjust in order to potentially reattribute user.
60-
Adjust.processDeeplink(userActivity.webpageURL!)
60+
Adjust.processDeeplink(ADJDeeplink(deeplink: userActivity.webpageURL!)!)
6161
}
6262
return true
6363
}

examples/AdjustExample-WebView/AdjustExample-WebView/AppDelegate.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDiction
3636
// url object contains the deep link
3737

3838
// Call the below method to send deep link to Adjust backend
39-
[Adjust processDeeplink:url];
39+
[Adjust processDeeplink:[[ADJDeeplink alloc] initWithDeeplink:url]];
4040
return YES;
4141
}
4242

4343
- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray<id<UIUserActivityRestoring>> *restorableObjects))restorationHandler {
4444
if ([[userActivity activityType] isEqualToString:NSUserActivityTypeBrowsingWeb]) {
45-
[Adjust processDeeplink:[userActivity webpageURL]];
45+
[Adjust processDeeplink:[[ADJDeeplink alloc] initWithDeeplink:[userActivity webpageURL]]];
4646
}
4747
return YES;
4848
}

examples/AdjustExample-iWatch/AdjustExample-iWatch/AppDelegate.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDiction
3737
// url object contains the deep link
3838

3939
// Call the below method to send deep link to Adjust backend
40-
[Adjust processDeeplink:url];
40+
[Adjust processDeeplink:[[ADJDeeplink alloc] initWithDeeplink:url]];
4141
return YES;
4242
}
4343

examples/AdjustExample-tvOS/AdjustExample-tvOS/AppDelegate.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDiction
5858
NSLog(@"Scheme based deep link opened an app: %@", url);
5959

6060
// Call the below method to send deep link to Adjust backend
61-
[Adjust processDeeplink:url];
61+
[Adjust processDeeplink:[[ADJDeeplink alloc] initWithDeeplink:url]];
6262

6363
return YES;
6464
}
@@ -67,7 +67,7 @@ - (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserAct
6767
if ([[userActivity activityType] isEqualToString:NSUserActivityTypeBrowsingWeb]) {
6868
NSLog(@"continueUserActivity method called with URL: %@", [userActivity webpageURL]);
6969
[Adjust convertUniversalLink:[userActivity webpageURL] withScheme:@"adjustExample"];
70-
[Adjust processDeeplink:[userActivity webpageURL]];
70+
[Adjust processDeeplink:[[ADJDeeplink alloc] initWithDeeplink:[userActivity webpageURL]]];
7171
}
7272

7373
return YES;

0 commit comments

Comments
 (0)