While working on some projects which use the camera to take pictures inside the app I had to add a description for the user to ask for permission.
The code for that is pretty simple:
<edit-config file="*-Info.plist" mode="merge" target="NSPhotoLibraryUsageDescription"> <string>Please let me take pictures</string> </edit-config>
After that I wanted to build the application for iOS with the following command:
ionic cordova build ios
What usually finished after 10 seconds with a success message now ended like this:
If you are like me you would have no idea what this means. Trying to build again doesn’t solve the problem so it has to be something with this particular change.
After a little bit of digging around I found the fix.
Go into the platforms folder and into ios. There you will find ios.json which holds configurations for the entire application. Locate *-Info.plist and delete the entire object.
After that simply run:
ionic cordova prepare ios
Your build will work again and you can get on with finish your app.
Hope this helps.
Until next time,