2013-07-13 173 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]; 

我不知道爲什麼,這使得它的工作,但它確實......至少在我的應用程序。

相關問題