@reedrichards - thanks for the link. But alone that didn’t solve my problem. I needed to add targetWidth and targetHeight into options. Now it’s work like a charm.
What @champion007 says is right, but in my case, I already had that, so I am here to basically confirm @reedrichards solution DOES work. If you want to add it into the config.xml then code looks like this:
<edit-config target="NSCameraUsageDescription" file="*-Info.plist" mode="merge">
<string>need camera access to take pictures</string>
</edit-config>
<edit-config target="NSPhotoLibraryUsageDescription" file="*-Info.plist" mode="merge">
<string>need photo library access to get pictures from there</string>
</edit-config>
<edit-config target="NSLocationWhenInUseUsageDescription" file="*-Info.plist" mode="merge">
<string>need location access to find things nearby</string>
</edit-config>
<edit-config target="NSPhotoLibraryAddUsageDescription" file="*-Info.plist" mode="merge">
<string>need photo library access to save pictures there</string>
</edit-config>
and if you prefer going into the -Info.plist file then:
<key>NSCameraUsageDescription</key>
<string>need camera access to take pictures</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>need photo library access to get pictures from there</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>need location access to find things nearby</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>need photo library access to save pictures there</string>
The solution works perfect for IOS, but when built for android the code in config.xml throws an error
“Cannot read property ‘find’ of undefined”. Not sure if it was where I placed the code, but I removed the code block and the build ran fine after that. Just wanted to see if I may have done something wrong, or something is breaking in the code itself.
@stemsoftware Well, here’s what I think. Just off the top pf my head, because I built my app to work on iOS to be quite frank, I didn’t quite care much about android (yet). Having said that in your config.xml file you have two major sections:
I don’t believe the exact same code works for Android, but there most likely is an equivalent. Either way, it should be inside the platform tag with the android property and your iOS related code inside the iOS platform tag. Does that make sense?