Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/templates/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用TeamId作为iOS共享应用程序组的前缀_Ios - Fatal编程技术网

使用TeamId作为iOS共享应用程序组的前缀

使用TeamId作为iOS共享应用程序组的前缀,ios,Ios,tl;dr是否有人在共享应用程序组名称前加上其TeamId 我们使用一个应用程序组在我们的应用程序和扩展程序之间以及与我们的另一个应用程序共享数据。我一直将套件名称作为“group.com.example”传递给NSUserDefaults-initWithSuiteName和NSFileManager-ContainerUrlForSecurity应用程序组标识符,它工作正常 在iOS 10中,我在启动我的应用程序时看到一个Xcode控制台错误: [User Defaults] Failed

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

我们使用一个应用程序组在我们的应用程序和扩展程序之间以及与我们的另一个应用程序共享数据。我一直将套件名称作为“group.com.example”传递给NSUserDefaults-initWithSuiteName和NSFileManager-ContainerUrlForSecurity应用程序组标识符,它工作正常

在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
一个已知的解决方案是将我们的TeamId作为组的前缀,但我们已经有了一个使用非前缀变量的应用程序,因此在这个新应用程序中更改它将导致兼容性问题。除此之外,启动时没有明显的问题

让我担心的是:几个月前,我们发布了一个类似的Mac应用程序,但遇到了一个应用程序商店验证错误,迫使我们在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 '.' .
苹果的文档和示例代码根本没有提到TeamID前缀,我的直觉是,这不是他们能够在不破坏大量应用程序的情况下进行的更改,但如果这是苹果正在朝着的方向发展,我宁愿现在就处理,而不是晚些时候


是否有人对在iOS上使用或不使用TeamID前缀有权威性的了解?是否有人在使用时遇到问题?

感谢您分享验证错误和iOS 10消息!我想知道完全相同的事情。查看
~/Library/Group Containers/
,大多数以
$(TeamIdentifierPrefix)
开头,而不是“Group”(事实上,唯一的一个是
Group.com.apple.notes