I forgot to mention, in the Podfile file, I have the following:
post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| ... if target.name == "Notifications" config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)', 'TARGET_IS_NOTIFICATION=1'] end ...
Post
Replies
Boosts
Views
Activity
Looks like i have a workaround for now using the following at the beginning of the methods that shouldn't be run in extensions:
if ([[[NSBundle mainBundle] bundlePath] hasSuffix:@".appex"]) { return; // this is an app extension }
I should probably also mention that in this case it is a forked version of a Cocoapod, so I can change things as needed.
@DTS Engineer Our app has a minimum deployment target of 15.0 set in the app and in Podfile for IPHONEOS_DEPLOYMENT_TARGET. After integrating the WireGuardKit pod and loading a profile, we got this same problem (exactly as shown in https://forums.developer.apple.com/forums/thread/729690). (WireGuardKit on github and their primary download site also has 15.0 as minimum deployment target.)
We have tried on phones running iOS 16.7.8, and phones running 17.6.1. Your solution above is the only one I've found, but either I'm misunderstanding the solution or it's not helping. Any other thoughts on a fix for this? Thanks!