iOSPicturePicker Runtime Error

In my app i have a view to shot Fotos.
The views controls are the iOSPicturePicker, a BottomBar (a canvas ) and a canvas to show the taken picture.
In the Activate event of the view i try to show the iOSPicturePicker with it’s Source property set to camera.

On a real device (iPhoneX) the app ends with no comment.

In the Simulators there are no problems, but in DebugMode i cannot set the source to camera (it’s CameraRoll).

To make sure that there is no side effect from my custom controls i removed every control except the iOSPicturePicker, but without success!

Has anyone an idea what’s happened here or should i send a Feedback with an error description?
Thanks in advance

It sounds like this might need the NSCameraUsageDescription key in the plist in order to allow camera access. The phone log should have a description of why it crashed.

If this is the cause, the plist would look like this:

[code]<?xml version="1.0" encoding="UTF-8"?>

NSCameraUsageDescription Allow user to use the camera. [/code]

I’ll test this soon and update the docs accordingly.

Thanks Paul, this was the solution.
Would be nice if this situation would return an error instead of simply crashing ;-))

It would be even nicer if Xojo displayed a warning when building the app

As soon as Apple added this restriction, we added a default plist entry to the next version of Xojo. There’s nothing much else we can do as there’s no way to know ahead of time what Apple will choose for the key name/value.

When something new like this appears you could have it on a Xojo server and the IDE would phone home and download the updates required for the plist so that it would be handled automatically and not need an update to the Xojo version.

To be fair, that is over-simplifying very unpredictable changes that can range from plist entries to complicated re-implementations.

Wasn’t exactly the above done a couple of years ago for something? I forget what now, something in iOS. The IDE phoned home and downloaded an incremental update for… something.