Capacitor: bug: @rpath/capacitor.framework/capacitor library not loaded for iOS 13.3.1

Created on 20 Feb 2020  路  5Comments  路  Source: ionic-team/capacitor

Bug Report

Capacitor Version

npx cap doctor output:

Latest Dependencies:

@capacitor/cli: 1.5.0

@capacitor/core: 1.5.0

@capacitor/android: 1.5.0

@capacitor/ios: 1.5.0

Installed Dependencies:

@capacitor/android not installed

@capacitor/cli 1.5.0

@capacitor/core 1.5.0

@capacitor/ios 1.5.0

Found 12 Capacitor plugins for ios:
cordova-plugin-add-swift-support (2.0.2)
cordova-plugin-datepicker (0.9.3)
cordova-plugin-googlemaps (2.6.2)
cordova-plugin-ionic-keyboard (2.2.0)
cordova-plugin-nativegeocoder (3.2.2)
cordova-plugin-taptic-engine (2.1.0)
cordova-plugin-vibration (3.1.1)
cordova-plugin-device (2.0.3)
cordova-plugin-ionic-webview (4.1.3)
cordova-plugin-splashscreen (5.0.3)
cordova-plugin-statusbar (2.4.3)
cordova-plugin-whitelist (1.3.4)
[success] iOS looking great! 馃憣

Affected Platform(s)

  • [ ] Android
  • [x ] iOS
  • [ ] Electron
  • [ ] Web

Current Behavior


After running Npx cap open ios, when xcode builds and runs the app it breaks on startup on the physical iphone. The splash screen loads and instantly disappears.

Expected Behavior


Expected to launch normally with login screen or main screen.

Sample Code or Sample Application Repo

N/A at the moment

Reproduction Steps


1) ng build
2) npx cap copy
3) npx cap sync
4) npx cap open ios
5) build and run on iphone in xcode

Other Technical Details

npm --version output: 6.13.7

node --version output: v12.9.1

pod --version output (iOS issues only): 1.9.0.beta.2

Other Information


Closed issue on this forum: https://github.com/ionic-team/capacitor/issues/2360

Most helpful comment

See https://github.com/ionic-team/capacitor/issues/2383

This is a bug in Xcode or CocoaPods.

Free Apple dev accounts can't run apps on real devices if they use some CocoaPods frameworks (such as Capacitor, but it's affecting a lot of more frameworks).

So the only solution for now is to pay for an Apple dev account or use the simulator.

You can also try to remove use_frameworks! from ios/App/Podfile and run npx cap sync ios, but not sure if some other thing will break.

All 5 comments

See https://github.com/ionic-team/capacitor/issues/2383

This is a bug in Xcode or CocoaPods.

Free Apple dev accounts can't run apps on real devices if they use some CocoaPods frameworks (such as Capacitor, but it's affecting a lot of more frameworks).

So the only solution for now is to pay for an Apple dev account or use the simulator.

You can also try to remove use_frameworks! from ios/App/Podfile and run npx cap sync ios, but not sure if some other thing will break.

Since multiple people have made github issues about this, I feel like this should be mentioned in the tutorial. I made a pull request to add a notice about this.

Despite creating paid account I am still getting same error:

Capacitor Version :

馃拪 Capacitor Doctor 馃拪

Latest Dependencies:

@capacitor/cli: 2.0.2

@capacitor/core: 2.0.2

@capacitor/android: 2.0.2

@capacitor/electron: 2.0.2

@capacitor/ios: 2.0.2

Installed Dependencies:

@capacitor/android not installed

@capacitor/electron not installed

@capacitor/cli 2.0.2

@capacitor/core 2.0.2

@capacitor/ios 2.0.2

Found 0 Capacitor plugins for ios:
[success] iOS looking great! 馃憣

npm --version:
6.14.4

node --version
v13.13.0

pod --version
1.9.1

`dyld: Library not loaded: @rpath/Capacitor.framework/Capacitor
Referenced from: /private/var/containers/Bundle/Application/CC6F5F2B-1863-4F7A-A848-F049350E1604/App.app/App
Reason: no suitable image found. Did find:
/private/var/containers/Bundle/Application/CC6F5F2B-1863-4F7A-A848-F049350E1604/App.app/Frameworks/Capacitor.framework/Capacitor: code signature invalid for '/private/var/containers/Bundle/Application/CC6F5F2B-1863-4F7A-A848-F049350E1604/App.app/Frameworks/Capacitor.framework/Capacitor'

/private/var/containers/Bundle/Application/CC6F5F2B-1863-4F7A-A848-F049350E1604/App.app/Frameworks/Capacitor.framework/Capacitor: code signature invalid for '/private/var/containers/Bundle/Application/CC6F5F2B-1863-4F7A-A848-F049350E1604/App.app/Frameworks/Capacitor.framework/Capacitor'

/private/var/containers/Bundle/Application/CC6F5F2B-1863-4F7A-A848-F049350E1604/App.app/Frameworks/Capacitor.framework/Capacitor: stat() failed with errno=1
/private/var/containers/Bundle/Application/CC6F5F2B-1863-4F7A-A848-F049350E1604/App.app/Frameworks/Capacitor.framework/Capacitor: code signature invalid for '/private/var/containers/Bundle/Application/CC6F5F2B-1863-4F7A-A848-F049350E1604/App.app/Frameworks/Capacitor.framework/Capacitor'

/private/var/containers/Bundle/Application/CC6F5F2B-1863-4F7A-A848-F049350E1604/App.app/Frameworks/Capacitor.framework/Capacitor: stat() failed with errno=1

(lldb) `

Steps to reproduce:
ionic capacitor run ios

@aaqibkhorasi

Make sure you select the paid account for signing in Xcode and make sure that you run ionic cap sync before you run ionic cap open ios.

I stumbled upon the same issue today.
The solution was just to bump the version of iOS to > 13.4 as described here
Btw, I'm using a free Apple Developer account.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gnesher picture gnesher  路  3Comments

ebk46 picture ebk46  路  3Comments

stripathix picture stripathix  路  3Comments

json-derulo picture json-derulo  路  3Comments

MatanYadaev picture MatanYadaev  路  3Comments