I am creating a Today extension. I have added all necessary files and getting a bunch of compile errors about
- openUrl is not available
- sharedApplication is not available
- init on UIAlertView is not available
The files with these dependencies are built deep into my app (error handler on my networking layer, etc), and I know that they won't be used in the Today Extension, but in order to completely get rid of dependency in these files I need to refactor the entire app. Is there a way around this?
My code is Swift so I can't use compiler macros either to avoid executing these lines of code.
#if !TARGET_IS_TODAY_EXTENSION #endif