File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,16 @@ @implementation AppDelegate
4646
4747OneSignalNotificationCenterDelegate *_notificationDelegate;
4848
49+ - (BOOL )application : (UIApplication *)app openURL : (NSURL *)url options : (NSDictionary <UIApplicationOpenURLOptionsKey,id> *)options {
50+ // Log the full tracking URL and the original extracted URL
51+ // Also trigger trackClickAndReturnOriginal twice to confirm this click event is only sent once
52+ NSLog (@" Dev App: application openURL FULL URL is %@ " , url);
53+ NSURL *originalURL1 = [OneSignal.LiveActivities trackClickAndReturnOriginal: url];
54+ NSURL *originalURL2 = [OneSignal.LiveActivities trackClickAndReturnOriginal: url];
55+ NSLog (@" Dev App: application openURL processed, original URL is %@ " , originalURL1);
56+ return YES ;
57+ }
58+
4959- (BOOL )application : (UIApplication *)application didFinishLaunchingWithOptions : (NSDictionary *)launchOptions {
5060
5161// [FIRApp configure];
Original file line number Diff line number Diff line change @@ -52,9 +52,11 @@ import OneSignalLiveActivities
5252 }
5353 Spacer ( )
5454 }
55+ . onesignalWidgetURL ( URL ( string: " myapp://product/12345 " ) , context: context)
56+ // .widgetURL(URL(string: "myapp://product/12345"))
5557 . activitySystemActionForegroundColor ( . black)
5658 . activityBackgroundTint ( . white)
57- } dynamicIsland: { _ in
59+ } dynamicIsland: { context in
5860 DynamicIsland {
5961 // Expanded UI goes here. Compose the expanded UI through
6062 // various regions, like leading/trailing/center/bottom
@@ -75,7 +77,8 @@ import OneSignalLiveActivities
7577 } minimal: {
7678 Text ( " Min " )
7779 }
78- . widgetURL ( URL ( string: " http://www.apple.com " ) )
80+ . onesignalWidgetURL ( URL ( string: " myapp://product/12345 " ) , context: context)
81+ // .widgetURL(URL(string: "myapp://product/12345"))
7982 . keylineTint ( Color . red)
8083 }
8184 }
You can’t perform that action at this time.
0 commit comments