Ionic App – Xcode Build Error “library not found for -lPods”

Environment:
Xcode 10.2.1 (10E1001)
Ionic CLI 5.2.1
Cordova CLI 8.1.2
cordova-res 0.5.1
native-run 0.2.7

Installed platforms:
ios 5.0.1

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.

Image 2019-06-29 at 9.52.45 PM

Advertisements

How to Change iOS App Name in Ionic 3

To change iOS app name in Ionic 3:

  1. Change `name` property in `config.xml`.
  2. Ionic product name change

  3. Then remove iOS platform with Ionic CLI command.
  4. $ ionic cordova platform rm ios
    
  5. Then add iOS platform back.
  6. $ ionic cordova platform add ios
    
  7. Rebuild the project.

Ionic Plugin Camera Crash

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.

  • NSCameraUsageDescription
  • NSPhotoLibraryUsageDescription
  • NSLocationWhenInUseUsageDescription
  • NSPhotoLibraryAddUsageDescription

It’s important to add description, this is iOS requirement when apps try to access users data.

Source.

Ionic Plugin Camera Info.plist

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>
</edit-config>

cordova plugin camera crash

To verify, build Ionic for iOS platform, then open project properties in Xcode.
cordova plugin camera crash 2

Source.

Change iOS App Id in Ionic

To change iOS App Id in Xcode:

  1. In Project Navigator, click on project name.
  2. Then click on General.
  3. Under Identity, change the Bundle Identifier.

Image 2018-05-06 at 9.44.03 PM

To do the same in Ionic iOS project, follow this step:

  1. In the root folder, find config.xml.
  2. At the beginning of the content, find widget element.
  3. Change widget‘s attribute id.

Image 2018-05-06 at 9.41.47 PM