Error : Updating iOS native dependencies with pod install

Hello everyone,

I try to add the ios platform in my ionic project with capacitor but I have this error:

✔ Copying web assets from www to ios/App/App/public in 1.12s
✔ Creating capacitor.config.json in ios/App/App in 2.02ms
✔ copy ios in 1.14s
✔ Updating iOS plugins in 6.91ms
[info] Found 5 Capacitor plugins for ios:
       @capacitor-community/bluetooth-le@2.0.0
       @capacitor/app@4.0.1
       @capacitor/haptics@4.0.1
       @capacitor/keyboard@4.0.1
       @capacitor/status-bar@4.0.1
✖ Updating iOS native dependencies with pod install - failed!
✖ update ios - failed!
[error] ERR_SUBPROCESS_COMMAND_NOT_FOUND

But for Android it’s work perfectly!

Do you have an idea for why I have this error?

Thanks

1 Like

It sounds like you don’t have CocoaPods installed.

Hi @twestrick I double checked my CocoaPods with gem which cocoapods and am running /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods.rb

Perhaps it’s not accessible for Capacitor for some reason?
Also, this appears to be a popular issue, maybe we can work on an answer together for the community?

Here’s my output:

 npx cap sync ios   
✔ Copying web assets from sisu-app-mobile to ios/App/App/public in 37.83ms
✔ Creating capacitor.config.json in ios/App/App in 659.13μs
✔ copy ios in 59.25ms
✔ Updating iOS plugins in 4.57ms
[info] Found 2 Capacitor plugins for ios:
       @capacitor/browser@4.1.0
       @capacitor/status-bar@4.1.1
✖ Updating iOS native dependencies with pod install - failed!
✖ update ios - failed!
[error] Command line invocation:
        /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -project App.xcodeproj clean
        
        User defaults from command line:
        IDEPackageSupportUseBuiltinSCM = YES
        
        2023-01-05 16:59:42.788 xcodebuild[34754:2942555] Writing error result bundle to
        /var/folders/q_/6czdd5856cdfr1x767yf5vmw0000gn/T/ResultBundle_2023-05-01_16-59-0042.xcresult
        xcodebuild: error: 'App.xcodeproj' does not exist.

It looks like you are getting a different error. For some reason it cannot find your project file. Maybe try a Clean/Rebuild mentioned here. Otherwise, I don’t have any ideas other than Googling. My daily driver is a Linux machine and only use a Cloud Mac to do my iOS builds :slight_smile: Hopefully someone else can help!

1 Like

try to update you gem to 3.3.11 and then reinstall your dependencies

Hi! I have the same error and I have not idea. Did you can resolved this error?

Ok, I found the reason. My Mac’s arch is M1 and the problem is cocoapods
If you have an M1 - the issue is likely with Cocoapods.
If the other answers here fail, try:

sudo arch -x86_64 gem install ffi
then inside ios/App
arch -x86_64 pod install
then, to see if it works:
cd…
cd…
npx cap sync

1 Like

If you don’t want to fallback to x86_64, you can do the following (this is what I did):

gem install --user-install ffi -- --enable-libffi-alloc

Source

EDIT

--user-install is probably not needed if you have sudo access to the Mac. I use a cloud Mac without sudo access.

This worked great for me, thanks!

What does it mean to show this:
Ignoring ffi-1.15.5 because its extensions are not built. Try: gem pristine ffi --version 1.15.5

Do I have something missing?

This is the error im getting:

:heavy_multiplication_x: Updating iOS native dependencies with pod install - failed!
:heavy_multiplication_x: update ios - failed!
[error] Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -project App.xcodeproj clean

    User defaults from command line:
    IDEPackageSupportUseBuiltinSCM = YES