2

We tried to implement the sfmc_notification system in our flutter app, we setup sfmc and set URLHandlingDelegate, we are receiving the notifications which contains a url to open (deep linking), but when the app is closed it always open the application and nothing more. I realized that the sfmc_handle function is never hit in this case. But when the app is already running or in the background it works ok and it would hit sfmc_handle. Is there anything that we are missing ?

1
  • You have not implemented your App Delegate, or you have implemented it incorrectly. Refer to the docs.
    – Bill Mote
    Sep 15, 2022 at 12:29

1 Answer 1

1

FYI: I have tested official SFMC learning app and looks like sfmc_handleURL callback won't be called when iOS app is not running (killed) and user taps on push notifications (It only opens the app) but it is working when app is running.

func sfmc_handleURL(_ url: URL, type: String) {
            // Very simply, send the URL returned from the MobilePush SDK to UIApplication to handle correctly.
            UIApplication.shared.open(url,
                                      options: [:],
                                      completionHandler: {
                                        (success) in
                                        print("Open \(url): \(success)")
                                      })
        }

Flutter sfmc_plugin package: https://pub.dev/packages/sfmc_plugin

Reported issue: https://github.com/sefidgaran/salesforce-marketing-cloud/issues/2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .