gpt4 book ai didi

app-store - 由于以编程方式向所有空间添加应用程序而导致 App Store 拒绝

转载 作者:行者123 更新时间:2023-12-01 09:16:36 30 4
gpt4 key购买 nike

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

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 上第三方应用程序执行用户简单、隐式命令的能力的严重倒退。

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

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

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

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

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

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com