I have an app group. Finder Sync Extension and Main app register for the group.
Main apps sets a BOOL preferene:
NSUserDefaults *userDefaults = [[NSUserDefaults alloc]initWithSuiteName:GroupIdIsHere];
[userDefaults setBool:YES forKey:keyHere];
[userDefaults synchronize];Now when I run the Finder sync extension, I retrieve the preference:
NSUserDefaults *userDefaults = [[NSUserDefaults alloc]initWithSuiteName:GroupIdIsHere];
BOOL settingOn = [userDefaults boolForKey:keyHere];
//I get NO, even though it was set to YES.Now the Finder sync extension is getting NO. The main app does get YES on the next app launch though.
Meh. Somehow I must've done something (or there is some Xcode bug) but I got Xcode to generate another .entitlement file for the extension without realizing it.....it was called something like:
MyEntitlement.release.entitlements....and it was set to Release mode. The group container ID was only getting added to the release mode entitlement file, not the .entitlement file being used in debug mode.
Fixed that.