When I look into the package that is built by Xojo I can’t see any reference to “NSCameraUsageDescription” even though it is in the plist I dragged into the project.
[quote=390542:@Martin Fitzgibbons]When I look into the package that is built by Xojo I can’t see any reference to “NSCameraUsageDescription” even though it is in the plist I dragged into the project.
Could that be the issue?[/quote]
Yes. Apple specifically states that without these permission keys, your app will crash.
Here is the routine that I use. It will then request the authorization. The app will close after they authorize it. Then when you reopen the app it will be authorized. You must have Jason Kings IOSKIT for this to work.
[code]Dim iB as new iOSBlock(AddressOf AVFoundation.AVCaptureDevice.RequestAccessForMediaTypeCompletionHandler)
Select Case captureDevice.AuthorizationStatusForMediaType(AVFoundation.AVStringConstant(“AVMediaTypeVideo”))
Case AVFoundation.AVCaptureDevice.AVAuthorizationStatus.NotDetermined
captureDevice.RequestAccessForMediaTypeCompletionHandler(AVFoundation.AVStringConstant(“AVMediaTypeVideo”), iB)
Return True
Case AVFoundation.AVCaptureDevice.AVAuthorizationStatus.Restricted
Return False
Case AVFoundation.AVCaptureDevice.AVAuthorizationStatus.Authorized
Return True
Case AVFoundation.AVCaptureDevice.AVAuthorizationStatus.Denied
Return False
Else
Return False
End Select
[/code]
I’m A step closer. I have the App correctly requesting access to use the camera through the plist entry but when you try and save the manipulated photo via the share panel the app quits
I have these 2 entries is something else needed
“NSPhotoLibraryUsageDescription” = “Allow the selection of photos from the photo library.”;
“NSCameraUsageDescription” = “Allow access to camera.”;
Martin try adding a value for Privacy - Photo Library Additions Usage Description. I have this in my app and can save photos. I believe this requirement was added in iOS10.