bug: @rpath/capacitor.framework/capacitor library not loaded for iOS 13.3.1
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
- ng build
- npx cap copy
- npx cap sync
- npx cap open ios
- 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
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.
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.