Closed sefidgaran closed 1 year ago
Update: After investigating more and test the official learning app from Salesforce 7.6, same issue observed, so this issue looks like a SFMC SDK issue. Any updates are welcomed. Thanks
Update: After migrating Marketing Cloud SDK iOS to version 8.0.8 and SFMCSdk 1.0.6, I managed to fix this issue. Now in iOS when app is killed, URL in push notification will be received.
So, issue resolved.
We are experiencing the same behaviour. Even with the latest version of sfmc_plugin, the url handler isn't called when the app is in terminated state. Tapping the notification opens the app on the home page.
I'm experiencing the same issue - and I'm running version 8.0.13. @sefidgaran Did you do something speciel to make it work? Or did it just work out of the box all of a sudden?
I'm facing the same issue with my React Native App. useng the react-native-marketingcloudsdk that wraps the iOS SDK.
I have the sfmc_handleURL
implemented on the AppDelegate.mm,
, and it calls on a push notification is opened with the App in the background, but it doesn't happen if the App is closed. The notification takes the user to the Home Screen and doesn't call the sfmc_handleURL.
Works fine after adding the follow code on AppDelegate.mm > -(BOOL)application.
Obs.: After MKC configuration
if (newLaunchOptions != nil && [newLaunchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey] != nil) {
NSDictionary *userInfo = [newLaunchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey];
[[SFMCSdk mp] setNotificationUserInfo:userInfo];
if (userInfo[@"_od"]) {
NSString *initialURL = userInfo[@"_od"];
if (!newLaunchOptions[UIApplicationLaunchOptionsURLKey]) {
newLaunchOptions[UIApplicationLaunchOptionsURLKey] = [NSURL URLWithString:initialURL];
}
}
}
Existed issue regarding iOS:
Pull requests OR solution to this issue are welcomed. Thanks in advance