[英]Mac App store rejects use of deprecated sandbox entitlement
In my application, I have option for sending mail to support team if crash occured. 在我的应用程序中,如果发生崩溃,我可以选择向支持团队发送邮件。 For that i used sbsendmail code for sending mails. 为此,我使用sbsendmail代码发送邮件。 After enabling sandbox mode, i have added this 启用沙箱模式后,我添加了此功能
<key>com.apple.security.temporary-exception.apple-events</key>
<array>
<string>com.apple.mail</string>
</array>
in my app entitlement. 在我的应用程序权利中。 It works fine and i submitted my app to mac store. 它工作正常,我将我的应用程序提交到mac商店。 But my app is rejected due to following reason. 但由于以下原因,我的应用被拒绝了。
From Apple team:
We found that your app uses a deprecated sandbox entitlement:
com.apple.security.temporary-exception.apple-events - com.apple.mail
Please revise your app to use the following entitlement:
com.apple.security.scripting-targets
After this rejection i had replaced the above entitlement with the below. 在此拒绝后,我用以下内容取代了上述权利。
<key>com.apple.security.scripting-targets</key>
<dict>
<key>com.apple.mail</key>
<array>
<string>com.apple.mail.compose</string>
</array>
</dict>
But i am getting osstatus error exception in mail sending part. 但我在邮件发送部分得到了osstatus错误异常。 Exactly at this line 正好在这条线上
[emailMessage send];
Can anyone please provide the solution to accomplish the issue and that follows mac store acceptance criteria. 任何人都可以提供解决方案来完成问题,并遵循mac商店验收标准。
Thanks. 谢谢。
My understanding is that Mail has a scripting target for composing messages only, not sending. 我的理解是Mail有一个脚本目标,只用于编写消息,而不是发送。 So, to compose the message, use the scripting target, as you have done. 因此,要编写消息,请使用脚本目标,就像您所做的那样。 To send the message, you will probably need to request a temporary Apple Events exception, as you tried initially. 要发送消息,您可能需要请求临时的Apple Events异常,就像您最初尝试过的那样。 You should explain why you need this exception in the reviewer notes, and hopefully they will approve it. 您应该在审阅者备注中解释为什么需要此例外,并希望他们会批准它。 If not, then you may need to submit an appeal and cite Apple's documentation as to why you needed to use the temporary entitlement. 如果没有,那么您可能需要提交申诉并引用Apple的文档,说明您需要使用临时权利的原因。 Also, you should file a bug report in Radar requesting that Apple add a scripting target for sending Mail messages. 此外,您应该在Radar中提交错误报告,请求Apple添加脚本目标以发送邮件。
See... 看到...
https://developer.apple.com/library/Mac/qa/qa1802/_index.html https://developer.apple.com/library/Mac/qa/qa1802/_index.html
https://developer.apple.com/library/mac/documentation/Miscellaneous/Reference/EntitlementKeyReference/Chapters/AppSandboxTemporaryExceptionEntitlements.html#//apple_ref/doc/uid/TP40011195-CH5-SW3 https://developer.apple.com/library/mac/documentation/Miscellaneous/Reference/EntitlementKeyReference/Chapters/AppSandboxTemporaryExceptionEntitlements.html#//apple_ref/doc/uid/TP40011195-CH5-SW3
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.