In my application, I have option for sending mail to support team if crash occured. For that i used sbsendmail code for sending mails. 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. 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. Exactly at this line
[emailMessage send];
Can anyone please provide the solution to accomplish the issue and that follows mac store acceptance criteria.
Thanks.
My understanding is that Mail has a scripting target for composing messages only, not sending. 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. 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. Also, you should file a bug report in Radar requesting that Apple add a scripting target for sending Mail messages.
See...
https://developer.apple.com/library/Mac/qa/qa1802/_index.html
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.