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,473
  • 35
  • 181
  • 253
skyjetsen
  • 169
  • 8

0 Answers0