Skip to content

Commit

Permalink
refac: update example apps to new processDeeplink: signature
Browse files Browse the repository at this point in the history
  • Loading branch information
uerceg authored and nonelse committed Jul 22, 2024
1 parent 87806b8 commit 28f5952
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion AdjustTests/AdjustTestApp/AdjustTestApp/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ - (void)applicationWillTerminate:(UIApplication *)application {
}

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDiction
// url object contains the deep link

// Call the below method to send deep link to Adjust backend
[Adjust processDeeplink:url];
[Adjust processDeeplink:[[ADJDeeplink alloc] initWithDeeplink:url]];
return YES;
}

- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray<id<UIUserActivityRestoring>> *restorableObjects))restorationHandler {
if ([[userActivity activityType] isEqualToString:NSUserActivityTypeBrowsingWeb]) {
[Adjust processDeeplink:[userActivity webpageURL]];
[Adjust processDeeplink:[[ADJDeeplink alloc] initWithDeeplink:[userActivity webpageURL]]];
}
return YES;
}
Expand Down
4 changes: 2 additions & 2 deletions examples/AdjustExample-ObjC/AdjustExample-ObjC/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDiction
NSLog(@"Scheme based deep link opened an app: %@", url);

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

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

return YES;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ class AppDelegate: UIResponder, UIApplicationDelegate, AdjustDelegate {
// url object contains the deep link

// Call the below method to send deep link to Adjust backend
Adjust.processDeeplink(url)
Adjust.processDeeplink(ADJDeeplink(deeplink: url)!)
return true
}

func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
if (userActivity.activityType == NSUserActivityTypeBrowsingWeb) {
NSLog("Universal link opened an app: %@", userActivity.webpageURL!.absoluteString)
// Pass deep link to Adjust in order to potentially reattribute user.
Adjust.processDeeplink(userActivity.webpageURL!)
Adjust.processDeeplink(ADJDeeplink(deeplink: userActivity.webpageURL!)!)
}
return true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDiction
// url object contains the deep link

// Call the below method to send deep link to Adjust backend
[Adjust processDeeplink:url];
[Adjust processDeeplink:[[ADJDeeplink alloc] initWithDeeplink:url]];
return YES;
}

- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray<id<UIUserActivityRestoring>> *restorableObjects))restorationHandler {
if ([[userActivity activityType] isEqualToString:NSUserActivityTypeBrowsingWeb]) {
[Adjust processDeeplink:[userActivity webpageURL]];
[Adjust processDeeplink:[[ADJDeeplink alloc] initWithDeeplink:[userActivity webpageURL]]];
}
return YES;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDiction
// url object contains the deep link

// Call the below method to send deep link to Adjust backend
[Adjust processDeeplink:url];
[Adjust processDeeplink:[[ADJDeeplink alloc] initWithDeeplink:url]];
return YES;
}

Expand Down
4 changes: 2 additions & 2 deletions examples/AdjustExample-tvOS/AdjustExample-tvOS/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDiction
NSLog(@"Scheme based deep link opened an app: %@", url);

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

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

return YES;
Expand Down

0 comments on commit 28f5952

Please sign in to comment.