使用TeamId为iOS共享应用程序组添加前缀

Eri*_*ill 5 ios

tl; dr是否有人在他们的共享应用程序组名称前加上他们的TeamId?

我们使用应用程序组在我们的应用程序和扩展程序之间以及我们的另一个应用程序之间共享数据 我一直将套件名称"group.com.example"传递给NSUserDefaults -initWithSuiteName和NSFileManager -containerURLForSecurityApplicationGroupIdentifier,它一直运行良好.

使用iOS 10,我在启动应用程序时看到Xcode控制台错误:

[User Defaults] Failed to read values in CFPrefsPlistSource. 
Using kCFPreferencesAnyUser with a container is only allowed for System Containers, 
detaching from cfprefsd
Run Code Online (Sandbox Code Playgroud)

一个已知的解决方案是将我们的TeamId添加到该组的前缀,但我们已经有一个使用非前缀变体的应用程序,因此在这个新应用程序中更改它将导致兼容性问题.除了启动时的这个消息,没有明显的问题.

这就是让我警惕的原因:我们几个月前发布了一个类似的Mac应用程序,并且遇到App Store验证错误,迫使我们在Mac上使用TeamID:

Invalid Code Signing Entitlements. Your application bundle's signature 
contains code signing entitlements that are not supported on Mac OS X. 
Specifically, value '[group.com.example]' for key 
'com.apple.security.application-groups' is not supported. This value 
should be a string or an array of strings, each starting with 
your TEAMID followed by a dot '.' .
Run Code Online (Sandbox Code Playgroud)

Apple的文档和示例代码根本没有提到TeamID前缀,我的预感是这不是他们能够在不打破大量应用程序的情况下做出的改变,但如果这是Apple的方向,那么移动我宁愿现在处理它而不是以后.

有没有人有关于在iOS上使用TeamID前缀的权威知识?有没有人遇到过使用它的问题?