display.captureScreen not saving image for production builds on MacOS

I am trying to use display.captureScreen which should save to Pictures folder but it does not on distribution builds. I tried to add the entitlement “[“com.apple.security.assets.pictures.read-write"] = true” but it was rejected. What do I need to do to get this working and be accepted by the Mac App Store?

Application was rejected by Apple because it accesses the following location(s):

‘~/Pictures/Picture 1.jpg’

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.

Hi Mike. Our engineers are looking into this. 

Rob

Apple approved my app after I added the OS X entitlements listed below to my “build.settings” file and then in the iTunes portal under the “App Sandbox Information” section I added “com.apple.security.assets.pictures.read-write”.

osx = {         entitlements = {             ["com.apple.security.app-sandbox"] = true,             ["com.apple.security.assets.pictures.read-write"] = true,         },     },

Great news Mike.

Rob

Hi Mike. Our engineers are looking into this. 

Rob

Apple approved my app after I added the OS X entitlements listed below to my “build.settings” file and then in the iTunes portal under the “App Sandbox Information” section I added “com.apple.security.assets.pictures.read-write”.

osx = {         entitlements = {             ["com.apple.security.app-sandbox"] = true,             ["com.apple.security.assets.pictures.read-write"] = true,         },     },

Great news Mike.

Rob