paco valero paco valero - 8 months ago 254
Objective-C Question

Method openURL:options:completionHandler compatibility in objective c

I'm using the method openURL:options:completionHandler:, it turns out that in iOS 10 works fine, but I'm also interested in my app is compatible with the old iOS 9, but xcode gives me a

-[UIApplication openURL:options:completionHandler:]:

Unrecognized selector send to instance
There any way make it work in iOS 9 also?
Thank for the possible response!


The new UIApplication method openURL:options:completionHandler:, which is executed asynchronously and calls the specified completion handler on the main queue (this method replaces openURL:)

This is under Additional Framework Changes > UIKit at:

you need use it like this:-

if #available(iOS 10.0, *) {, options: [:], completionHandler: nil)
} else {