Default Groups


Gerriet M. Denkmann
 

iOS app + Watch App + Watch App Extension all have Capabilities → App Groups → ON
selected: group.de.mdenkmann.BikeIosLogger

The iOS app has a Settings-Watch.bundle.

The Watch.app has:
Watch App → content of Settings-Watch.bundle/Root.plist

So far so good.

But I cannot read the defaults:

NSString *groupName = @"group.de.mdenkmann.BikeIosLogger";
[standardUserDefaults addSuiteNamed: groupName ];

[User Defaults] Couldn't read values in CFPrefsPlistSource<0x16e47730>
( Domain: group.de.mdenkmann.BikeIosLogger,
User: kCFPreferencesAnyUser,
ByHost: Yes,
Container: (null),
Contents Need Refresh: Yes
):

Using kCFPreferencesAnyUser with a container is only allowed for System Containers, detaching from cfprefsd

I can write these defaults (and these values persist) but are *not* reflected in the Watch.app.

What am I doing wrong?

Gerriet.

Join cocoa@apple-dev.groups.io to automatically receive all group messages.