我有一个提交到应用商店的应用被拒绝,原因是:

2.30不符合Mac OS X文件系统文档的应用将被拒绝

他们声称我的应用正在修改〜/ Library / Preferences / com.apple.spaces.plist文件,该文件不受支持。

我的应用程序实际上是在修改该文件,但仅通过以下方式使用NSUserDefaults :(为了简洁起见,我省略了一些代码...)

NSMutableDictionary *spacesDefaults =
    [[NSUserDefaults standardUserDefaults] persistentDomainForName:@"com.apple.spaces"];
NSMutableDictionary *dict = [spacesDefaults objectForKey:@"app-bindings"];
NSString *bundleId = [[[NSBundle mainBundle] bundleIdentifier] lowercaseString];

[dict setObject:@"AllSpaces" forKey:bundleId];
[spacesDefaults setObject:dict forKey:@"app-bindings"];

[[NSUserDefaults standardUserDefaults] setPersistentDomain:spacesDefaults
                                                   forName:@"com.apple.spaces"];

在我看来,这属于“Mac App Store的文件系统使用要求”的第一个项目符号http://developer.apple.com/library/mac/#releasenotes/General/SubmittingToMacAppStore/_index.html#//apple_ref/doc/uid/TP40010572
* You may use Apple frameworks such as User Defaults, Calendar Store, and Address Book that implicitly write to files in specific locations, including locations is not allowed to access directly.

有谁知道为什么这会被拒绝?我只是看不到...

谢谢!

最佳答案

这是一个非常重要的问题that I bemoaned on the Apple Dev Forums ...
而且我想有一天会提交Feedback Request可能会起作用...但是显然,此LAME限制..限制了应用程序在沙盒之外执行任何操作的能力。.即使您的用户可以执行此操作... 这是Mac上第三方应用程序执行用户执行的SIMPLE(隐式)命令的能力严重落后。
这似乎是苹果公司的根本范式转变。这是以上论坛列表的主要内容。

NSUserDefaults can be used only for our own app,
and sandboxing will not allow to modify other apps defaults
此外,您不能通过XML或其他方式以任何方式修改任何其他应用程序的.plist
而且,除了您自己的APP外,也禁止通过另一个域上的任务或终端执行defaults write。嗯,这很烦人。

关于app-store - 由于以编程方式将应用程序添加到所有空间而导致App Store拒绝,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/7667130/

10-12 14:28
查看更多