I am opening an external URL in my Swift app using the line:
UIApplication.sharedApplication().openURL(url)
This was working fine until I added Realm to my project via CocoaPods. At that point, it started giving me the two compile errors below:
'sharedApplication()' is unavailable: Use view controller based solutions where appropriate instead.
'openURL' is unavailable
These errors indicate that the API is unavailable to Application Extensions, but my code is in a normal application, not an extension. Why would adding Realm result in the compiler thinking it's in an App Extension?