I open the external URL in my Swift application using the line:
UIApplication.sharedApplication().openURL(url)
This worked fine until I added Realm to my project through CocoaPods. At that moment, he started giving me two compilation errors:
'sharedApplication ()' is not available: use a controller based on the presentation of the solution, where appropriate.
'openURL' is not available
These errors indicate that the API is not available for application extensions, but my code is in a regular application and not in an extension. Why does adding Realm cause the compiler to think about it in the application extension?
ios swift swift2 realm
Ashish agarwal
source share