I am trying to add Today Widget to my app and it needs to access the same file the main iOS app accesses. But in this file there's code the widget doesn't need access but needs to stay in that file. Is there some type of conditional I can use that checks if it's building for the widget or anything else like that?
I want to be able to do something like how it is when checking for macCatalyst like:
#if !TODAY_EXTENSION
codeForMainApp()
#endIf
I found this answer that says to just update the your debug and release xcconfig file, but my only xcconfig file for release and debug are the ones for my CocoaPods. Is it safe to update this?