I use the native camera within my mobile application.
If I test my application with the Ionic DevApp, the camera is working on the device.
When I deploy my application to the ios-device, the application crashes (application is closing immediately).
Does anybody know, which possibilities I have, to see what’s the problem (any errors?) could be?
Do I have it to debug with Xcode? Is this maybe the only way?
DO a search for NSCameraUsageDescription as IOS requires this - I think you can put the entries in the config.xml file but I have yet to find an example.
Thanks for your answer.
After I started my application on the ios-device with XCode I saw an error-message like this:
This app has crashed because it attempted to access privacy-sensitive data
without a usage description. The app's Info.plist must contain
an NSCameraUsageDescription key with a string value explaining to the user how the app uses this data.
I think this goes exactly in that direction you mentioned above.
I will try to fix it and I hope I can solve this issue.
P.S
I’m wondering how many implemented security steps (signing, enable developer mode on device, usage descriptions…) will follow until everything is finally running
After I added following to my config.xml everything worked - Hooray!!! :-)
<platform name="ios">
<config-file parent="NSCameraUsageDescription" platform="ios" target="*-Info.plist">
<string>You can upload your offer/article picture using your camera</string>
</config-file>
</platform>
I had the same problem last week with the microphone using cordova audioinput - but not sure how to check that the user has granted permission. I also feel that it does not look very professional - it should be part of the installation.
I think I will have to build a test app just to see how microphone access responds to no permission and if navigator.getUserMedia({audio:true, video:false} works on the iphone.
yes, that’s true. This message looks a little irritating, but for I think I the user can live with that for the moment.
My experience at the moment is not so high in Ionic (or mobile app in general), that I can give you an answer for this
I have to focus at the moment on others things on my list
But I keep my eye on this and let you know if I would find out something.
hmmm honestly I don’t have that much knowhow in Xcode.
I only used Xcode to deploy my application to the ios-device, to see whether it works.
As I mentioned I just added the above NSCameraUsageDescription to the config.xml,
created an another ios-build, started my XCode Environment and deployed it from there to
my device.
I didn’t have a look to my plist file, whether there was something updated or not.
I just recognised that my camera was working on the device and the policy-error (NSCameraUsageDescription)
from before disappeared.
Do we have to do something with this plist file?
Do we need this to deploy the app in the end to the store?
Like you my knowledge of xcode is very limited - I develop on a windows pc and use a mac-book just to generate the ionic app in IOS format and test it on a iPhone 5C.
Hopefully other Ionic developers who have actually deployed apps on the Apple store will join this discussion - my personal view is that if xcode brings up a warning it needs to be corrected or else it will just come back later.
haha…I’m in the same situation as you.
I’m windows-developer normally. But to compile my mobile app also for ios-devices, I bought an Mac.
But I have to say, that I’m developing the mobile app complete on Mac in VS Code, to learn better
to understand Mac. But they are hard-times at the moment, especially the shortcuts are pain