开发者

App Store rejection due to programmatically adding application to all spaces

开发者 https://www.devze.com 2023-04-10 18:26 出处:网络
I have an app submitted to the app store that was rejected due to: 2.30 Apps that do not comply with the Mac OS X File System documentation will be rejected

I have an app submitted to the app store that was rejected due to:

2.30 Apps that do not comply with the Mac OS X File System documentation will be rejected

They claim my app is modifying the ~/Library/Preferences/com.apple.spaces.plist file which is unsupported.

My app is in fact modifying that file, but only with NSUserDefaults via: (I'm omitting some code for brevity...)

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 
                                                   fo开发者_开发问答rName:@"com.apple.spaces"];

It seems to me that this falls under the first bullet of "File-System Usage Requirements for the 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.

Does anyone know why this would get rejected? I just don't see it...

Thanks!


This is a really important issue that I bemoaned on the Apple Dev Forums...

And I suppose that filing a Feedback Request might have an effect, someday... But apparently this LAME restriction.. which limits an App's ability to do ANYTHING outside the sandbox.. EVEN IF it's something your user can do... This is a serious step backwards in the ability of third-party apps on the mac to perform SIMPLE, implicit commands by the user.

This seems like a fundamental paradigm shift on Apple's part. Here's the jist of the above forum listing..

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

Additionally, you cannot modify in any way ANY other app's .plist, via XML, or otherwise.

And, no, doing defaults write via a task or terminal on another domain, besides YOUR OWN APP is outlawed as well. Ugh, it's very annoying.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号