NSUserDefaults not working on Xcode beta with Watch OS2

With watch OS2 you can no longer use shared group containers. Apple Docs:

Watch apps that shared data with their iOS apps using a shared group
container must be redesigned to handle data differently. In watchOS 2,
each process must manage its own copy of any shared data in the local
container directory. For data that is actually shared and updated by
both apps, this requires using the Watch Connectivity framework to
move that data between them.

Leave a Comment