关于Couldn’t read values in CFPrefsPlistSource<0x283322480>报错

[User Defaults] Couldn’t read values in CFPrefsPlistSource<0x283322480> (Domain: group.yiju.ezi, User: kCFPreferencesAnyUser, ByHost: Yes, Container: (null), Contents Need Refresh: Yes): Using kCFPreferencesAnyUser with a container is only allowed for System Containers, detaching from cfprefsd 这实际上是在iOS 10和macOS 10.12中引入的虚假警告。 预先加入您的小组ID的建议将使该警告静音,但也会创建一个新的空用户默认值。这将导致任何先前存储的数据不可读。 目前,解决方案只是忽略它。 资料来源:https://twitter.com/Catfish_Man/status/784460565972332544

讓不同 App 共享資料的 App Group

一般的情況下,iOS App 只能存取自己資料夾下的東西,無法存取其它 App 的內容。Apple 這麼做主要是為了安全,比方彼得潘如果不小心裝了虎克船長開發的邪惡 App,它也無法讀取我在 LINE 裡傳給溫蒂的私密照片。 不過有時我們會開發好幾個 App,如果自己開發的 App 能夠共享資料,應該會方便許多。Apple 其實提供一些方法讓不同的 App 可以共享資料,比方我們接下來要介紹的 App Group。Different ways to share data between apps — iOSA good idea is about ten percent and implementation and hard work, and luck is 90 percent. — Guy Kawasakimedium.com App Group 讓不同的 App 或是 App & App extension 之間可以透過以下兩種方法共享資料(不過必須是同一個帳號開發的 …