I want to be very clear: what you’re doing here is very much unsupported. Two points:
open(_:completionHandler:)on NSExtensionContext is specifically documented for use on Today widgets only.
Trying to get around this by walking up the responder chain looking for and calling methods by their selector is not allowed.
While I realise that Apple can be rather opaque at times, the intent here is very clear: if we wanted
open(_:completionHandler:)to work in arbitrary extensions, we would not gone out of our way to restrict it.
If you’d like your keyboard extension to be able to open your app, you should file an enhancement request for a supported way to do that. Personally, I think that’s a reasonable request, but I don’t get to make the call.
Please post your bug number, just for the record.
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"