【问题标题】:App Store rejection due to programmatically adding application to all spaces由于以编程方式将应用程序添加到所有空间,App Store 被拒绝
【发布时间】:2011-10-05 20:09:29
【问题描述】:

我有一个应用提交到应用商店,但由于以下原因被拒绝:

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.

有人知道为什么会被拒绝吗?我只是没看到...

谢谢!

【问题讨论】:

    标签: app-store nsuserdefaults osx-lion appstore-approval


    【解决方案1】:

    这是一个非常重要的问题that I bemoaned on the Apple Dev Forums...

    而且我认为提交Feedback Request 可能 有一天会产生效果......但显然这个 LAME 限制.. 这限制了应用程序做任何事情的能力在沙箱之外.. 即使这是您的 用户 可以做的事情... 这是在 mac 上的第三方应用程序执行简单、隐式命令的能力方面的严重倒退用户。

    这似乎是 Apple 的根本范式转变。这是上述论坛列表的 jist..

    NSUserDefaults can be used only for our own app, 
    and sandboxing will not allow to modify other apps defaults
    

    此外,您不能以任何方式修改任何其他应用的.plist、通过 XML 或其他方式。

    而且,不,通过另一个域上的任务或终端执行defaults write,除了您自己的应用程序也是非法的。呃,很烦人。

    【讨论】:

      猜你喜欢
      • 2011-11-19
      • 2021-10-23
      • 2017-12-21
      • 1970-01-01
      • 2023-03-10
      • 1970-01-01
      • 1970-01-01
      • 2021-06-03
      • 1970-01-01
      相关资源
      最近更新 更多