NSUserDefaults not working on Xcode beta with Watch OS2

前端 未结 5 1754
一个人的身影
一个人的身影 2020-11-27 07:02

I just installed the latest beta of Xcode to try Swift 2 and the improvements made to the Apple Watch development section.

I\'m actually having an h

5条回答
  •  甜味超标
    2020-11-27 07:37

    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.

提交回复
热议问题