Skip to content
This repository has been archived by the owner on Jul 20, 2023. It is now read-only.

SDK iOS 4.14.1 : func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: Any) #41

Open
charliefancelli opened this issue Nov 30, 2017 · 0 comments

Comments

@charliefancelli
Copy link

charliefancelli commented Nov 30, 2017

Hi,

In you SDK, the function Tune.handleOpen(url, sourceApplication: sourceApplication) need a URL and a String! but with SWIFT 3.2, the sourceApplication is now optional.

Can we do that to avoid crashes ?

func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: Any) -> Bool {
    
    // When the app is opened due to a deep link, call the Tune deep link setter
    if let s = sourceApplication {
      Tune.handleOpen(url, sourceApplication: s)
    }
    else{
      Tune.handleOpen(url, sourceApplication: nil)
    }
...
}

Regards,
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant