2

I tried to use the KeyWindow but it is not available in an app extension.

Here's what my code looks like :

[[[[UIApplication sharedApplication] keyWindow] rootViewController] presentedViewController];

It works in the main application but it doesn't work in the app extension.

Is there a way to do it?

Eric Aya
  • 69,000
  • 34
  • 174
  • 243
skyjetsen
  • 169
  • 8

0 Answers0