This same error has happened before in different contexts.
I only created a new NotificationServiceExtension
and I tried get reference to AppDelegate by
- (AppDelegate *)appDelegate
{
return (AppDelegate *)[[UIApplication sharedApplication] delegate];
}
I get following compile time error.
'sharedApplication()' is unavailable: Use view controller based solutions where appropriate instead.
I have no cocoapod dependency etc.
How can I resolve this issue? Any build settings that I change?