App not asking for permission to use the photolibrary

Hi all,

I’m testing an update with Xcode 9 and the latest daily build (or almost) and am having problems getting it to ask permission to use the photolibrary. pList settings seems to be working because the build outputs the following:

Creating Info.plist…

     adding extra plist setting NSCameraUsageDescription: This app would like to access the camera.

     adding extra plist setting NSPhotoLibraryUsageDescription: This app would like to access the photo library.

However, when I test the app (take a screenshot and try to save it), it crashes because permission was never requested. I deleted the app off my phone and did a fresh install with the same result. Am I missing something obvious?

Thanks!

Interestingly, I just tested on my iPad running 10.3.3 and it popped up the request as expected when the camera button was touched in the app. Does this suggest there is an issue with iOS 11? I’m testing iOS 11 on my iPhone 6.

Still investigating… Both the Camera and GPS sample apps work fine on my phone, asking permission as expected. Weird.

Has anyone else had success with display.captureBounds on iOS 11? I can’t seem to figure out why it isn’t working. Works fine on an iPhone 6 with 10.3.3 but not on my phone with 11.0.1. 

Corona staff, are there any samples that use display.captureBounds? I see that screenCaptureToFile uses display.save, not display.captureBounds.

Can you put together a simple test project with the issues you’re having and share it here (upload to DropBox/GoogleDrive and post the link here?)

Thanks

Rob

Hi Rob,

I adapted the screen capture sample app code to save to the photolibrary and uploaded the project here:

https://drive.google.com/open?id=0BydFGmO1OKgheHAtRDhneEJsYWM

Worked on an iPad running 10.3.3 but not on my iPhone running iOS 11. The camera sound plays so it seems to think it has access (see if statement in the code) but then the app just crashes. Actually, cancel that thought… I used the 2nd parameter to check for access… not the first! Anyway, looks like (at least on my phone), the issue is that it just doesn’t prompt the OS to ask for the permission.

Thanks for taking a look!

Jeff

Anyone able to try out my test for me to see if they can replicate the issue?

Hi Rob,

Would you mind testing this out for me? I can’t publish my update without a solution. Many thanks!

@jeff15 I’m out of the office unfortunately and have limited to test this until I get back. I was hoping some other community member could give this a go. I’ll see if I can get an engineer to look at it as well.

Rob

If there is anyone else out there you can confirm or deny this problem? The example I uploaded a couple of messages ago is very simple (1 page). I’d like to know if it’s me or a real issue with Corona. Many thanks!

Tried the code again on another device running iOS 11 (iPod). Same problem so I filed a bug report. Hope someone can check into this for me because I’ve been waiting on it to publish an update.

Thank you for reporting the issue! It seems iOS 11 introduced new  NSPhotoLibraryAddUsageDescription. Please, try to specify it with reason you want to add photos to image library and try again.

Vlads, thanks very much! The new plist entry you suggested worked!

Cheers,
Jeff

Interestingly, I just tested on my iPad running 10.3.3 and it popped up the request as expected when the camera button was touched in the app. Does this suggest there is an issue with iOS 11? I’m testing iOS 11 on my iPhone 6.

Still investigating… Both the Camera and GPS sample apps work fine on my phone, asking permission as expected. Weird.

Has anyone else had success with display.captureBounds on iOS 11? I can’t seem to figure out why it isn’t working. Works fine on an iPhone 6 with 10.3.3 but not on my phone with 11.0.1. 

Corona staff, are there any samples that use display.captureBounds? I see that screenCaptureToFile uses display.save, not display.captureBounds.

Can you put together a simple test project with the issues you’re having and share it here (upload to DropBox/GoogleDrive and post the link here?)

Thanks

Rob

Hi Rob,

I adapted the screen capture sample app code to save to the photolibrary and uploaded the project here:

https://drive.google.com/open?id=0BydFGmO1OKgheHAtRDhneEJsYWM

Worked on an iPad running 10.3.3 but not on my iPhone running iOS 11. The camera sound plays so it seems to think it has access (see if statement in the code) but then the app just crashes. Actually, cancel that thought… I used the 2nd parameter to check for access… not the first! Anyway, looks like (at least on my phone), the issue is that it just doesn’t prompt the OS to ask for the permission.

Thanks for taking a look!

Jeff

Anyone able to try out my test for me to see if they can replicate the issue?

Hi Rob,

Would you mind testing this out for me? I can’t publish my update without a solution. Many thanks!