display.captureScreen requires adding app-id?

So that my mac os app can save screenshots to the pictures folder, I have added the following to my build.settings…

entitlements = {  [“com.apple.security.assets.pictures.read-write”] = true, },

However apple rejected it saying the following:

Your application accesses the following location(s):

_‘~/Pictures/Picture 1.jpg’
The majority of developers encountering this issue are opening files in Read/Write mode instead of Read-Only mode, in which case it should be changed to Read-Only.
Other common reasons for this issue include:

  • creating or writing files in the above location(s), which are not valid locations for files to be written as stated in documentation.
  • writing to the above location(s) without using a valid app-id as a container for the written files._

So I assume I need to save the screenshot to ~/Pictures/<app-identifier>

…How to do I go about doing this if using the display.captureScreen(true)?

And to confirm, if i only save (write) screenshots and not load (read) them do I still use the com.apple.security.assets.pictures.read-write in my build.settings?

Any help appreciated.

Jacques1,

This is just a guess based on my experience, but I don’t think you need that entitlement to be read-write.

The actual screenshot is via an OS mechanism which will already has write-permissions to the folder you’re worried about.

I basically removed the entitlement so Apple would approve the app but it no longer saves the image anywhere if you don’t use the entitlement. (ie; if running the actual mac os app not in corona sdk simulator)

@jacques1 - Sorry to hear that.  That is very strange.    I’m afraid I don’t know more.  

@everyone - Does anyone here have direct experience with this?  If so, please lend some advice.

I am often stumped by the desire to create something for Mac where the market is like 5% Mac V 95% Windows?

Makes no sense to me.

Well, it depends if you are only developing games to try and make money from people or because you genuinely enjoy developing them.

Can you put together a simple test case that has this issue?

Rob

Jacques1,

This is just a guess based on my experience, but I don’t think you need that entitlement to be read-write.

The actual screenshot is via an OS mechanism which will already has write-permissions to the folder you’re worried about.

I basically removed the entitlement so Apple would approve the app but it no longer saves the image anywhere if you don’t use the entitlement. (ie; if running the actual mac os app not in corona sdk simulator)

@jacques1 - Sorry to hear that.  That is very strange.    I’m afraid I don’t know more.  

@everyone - Does anyone here have direct experience with this?  If so, please lend some advice.

I am often stumped by the desire to create something for Mac where the market is like 5% Mac V 95% Windows?

Makes no sense to me.

Well, it depends if you are only developing games to try and make money from people or because you genuinely enjoy developing them.

Can you put together a simple test case that has this issue?

Rob