G.miku
G.miku

Reputation: 3

UIApplicationOpenURLOptionsKey:Any return String:Any

I need "options:(NSDictionary *)options" ,but this is "options:(NSDictionary *)options" in swift4.1. What should I do?

  • (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary *)options NS_AVAILABLE_IOS(9_0); // no equiv. notification. return NO if the application can't open for some reason

Upvotes: 0

Views: 458

Answers (1)

Dan Karbayev
Dan Karbayev

Reputation: 2930

It's not clear what's your question about, but I'll try to guess that you're looking for open(_:options:completionHandler:) method. Usage example:

let url = URL(string: "https://google.com")!
UIApplication.shared.open(url) // options are equal to [:] and completionHandler is nil by default so they can be omitted

Here's documentation for this method.

Upvotes: 0

Related Questions