GoCarrot / teak-ios

Teak SDK for iOS
Apache License 2.0
3 stars 1 forks source link

Launch Link #15

Closed ZeroStride closed 4 years ago

AlexSc commented 4 years ago

If a foreground notification is received, the app will immediately navigate to the contained deep link, without the user tapping on the notification.

This is caused by userNotificationCenter:willPresentNotification:withCompletionHandler: calling application:didReceiveRemoteNotification: .

AlexSc commented 4 years ago

Currently a notification with a non-teak deep link will send to the server twice -- once with the notification, and then it will reset launchAttribution with launch_link = deep_link and send to the server again.

Ideally this wouldn't happen. The fastest path to that is to not set launch_link in application:openURL:sourceApplication:annotation: if the link is not a teak link. A longer term solution is that we should not permit the server response from users.json to start a new session.

Another possible fix is that the value for UIApplicationOpenURLOptionsSourceApplicationKey will be the current bundle id when the link was opened through this path. If UIApplicationOpenURLOptionsSourceApplicationKey is our bundleId, we should not update launch attribution.