Xcode 10.2.1 (10E1001)
Ionic CLI 5.2.1
Cordova CLI 8.1.2
After building your Ionic project, you open with Xcode then build and got following error:
library not found for -lPods-[your app name]
The error is caused by missing Pod library, most likely your app is using CocoaPods to manage some of dependency libraries.
To solve this issue, in /platforms/ios/ folder, do not open .xcodeproj file with Xcode, instead, open .xcworkspace file and build. The workspace file will include Pods libraries.
To change iOS app name in Ionic 3:
- Change `name` property in `config.xml`.
- Then remove iOS platform with Ionic CLI command.
$ ionic cordova platform rm ios
- Then add iOS platform back.
$ ionic cordova platform add ios
- Rebuild the project.
If you add Ionic’s native camera plugin and it crashed when opened in iOS device, add following entries in `Info.plist`, see previous post on how to add entries.
It’s important to add description, this is iOS requirement when apps try to access users data.
To add entries to `Info.plist`, use `edit-config` tag in `config.xml`, for example:
<edit-config file="*-Info.plist" mode="merge" target="NSCameraUsageDescription">
<string>need camera access to take pictures</string>
To verify, build Ionic for iOS platform, then open project properties in Xcode.
To change iOS App Id in Xcode:
- In Project Navigator, click on project name.
- Then click on General.
- Under Identity, change the Bundle Identifier.
To do the same in Ionic iOS project, follow this step:
- In the root folder, find config.xml.
- At the beginning of the content, find widget element.
- Change widget‘s attribute id.