0

we provide some parameters using URL schema and it works well if we launch app for the first time. I have provided a custom initialization in AppDelegate:

func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
        if let token = Helper.getQueryStringParameter(url: url.absoluteString, param: AUTH_TOKEN_PARAM) {
            tokenFromURL = token
            return true
        } else {
        }
        return false
    }

However this code does not work if for instance user downloads app, opens it and returns back to the web and presses same button to launch app.

I think I need to check if URL was provided in the viewWillAppear, am I right? How to do that, please help?

Viktor Vostrikov
  • 1,322
  • 3
  • 19
  • 36
  • 1
    See the `application(_:,open:,options:)` delegate method. – rmaddy Jan 05 '19 at 21:23
  • Essentially a duplicate of [Get launchOptions when resuming App](https://stackoverflow.com/questions/40015756/get-launchoptions-when-resuming-app?r=SearchResults) – rmaddy Jan 05 '19 at 21:34

0 Answers0