2013-07-13 118 views
2

这是我的Mac应用程序第二次被MAS拒绝。 我使用临时权利,以便用户可以将他的备份文件存储在他的设备上创建的应用程序。 这是我从MAS让我拒绝响应:因为我需要的NSSavePanel临时权利而被拒绝的应用程序

We've determined that one or more temporary entitlement exceptions requested for 
this app are not appropriate and will not be granted: 

com.apple.security.temporary-exception.files.home-relative-path.read-write/

非常模糊,他们没有告诉我什么是错的我在做什么,第二次。

对于我使用下列权利:

<key>com.apple.security.app-sandbox</key> 
<true/> 
<key>com.apple.security.files.user-selected.read-write</key> 
<string>True</string> 
<key>com.apple.security.temporary-exception.files.home-relative-path.read-write</key> 
<array> 
    <string>/</string> 
</array> 

这就是我如何使用的权利:

NSSavePanel* saveSelection = [NSSavePanel savePanel]; 

[saveSelection setPrompt:@"Export"]; 
[saveSelection setMessage:NSLocalizedString(@"Save your encrypted backup file to:",@"")]; 
[saveSelection setNameFieldStringValue:date]; 

[saveSelection beginSheetModalForWindow:kDelegate.window completionHandler:^(NSInteger result) { 
if (result==NSFileHandlingPanelOKButton) 
    {.... 
    } 
} 

我真的希望有人能帮助和感谢很多提前!

+0

你可以更具体地说明你如何使用权利?也就是说,为什么不使用沙盒兼容的保存对话框呢? – ddr

+0

我更新了答案以显示我如何使用权利。 – freshking

回答

1

我终于得到它的工作通过添加此向NSSavePanel:

[saveSelection setAllowedFileTypes:[NSArray arrayWithObject:@"whatever"]]; 
[saveSelection setAllowsOtherFileTypes:NO]; 

我不知道为什么,这使得它的工作,但它确实......至少在我的应用程序。

相关问题