capacitor: bug: App freezes on splash screen with error: Library not loaded: @rpath/Capacitor.framework/Capacitor

Bug Report

Capacitor Version

npx cap doctor output:

Latest Dependencies:

@capacitor/cli: 1.4.0

@capacitor/core: 1.4.0

@capacitor/android: 1.4.0

@capacitor/ios: 1.4.0

Installed Dependencies:

@capacitor/cli 1.2.1

@capacitor/core 1.2.1

@capacitor/android 1.1.0

@capacitor/ios 1.4.0

[success] Android looking great! 👌 Found 11 Capacitor plugins for ios: @jonoj/capacitor-fused-location (1.2.1) cordova-plugin-add-swift-support (2.0.1) cordova-plugin-device (2.0.2) cordova-plugin-file (6.0.2) cordova-plugin-geolocation (4.0.2) cordova-plugin-ionic-keyboard (2.2.0) cordova-plugin-ionic-webview (4.1.2) cordova-plugin-screen-orientation (3.0.2) cordova-plugin-whitelist (1.3.3) cordova-plugin-zeroconf (1.4.0) es6-promise-plugin (4.2.2) [success] iOS looking great! 👌

Affected Platform(s)

  • Android
  • iOS
  • Electron
  • Web

Current Behavior

I tried to build my iOS app with capacitor. The app build and install successfully but when app try to running, it freezes in splash screen and I get this error:

dyld: Library not loaded: @rpath/Capacitor.framework/Capacitor Referenced from: /var/containers/Bundle/Application/9AFD28DC-C86C-426F-BEEE-1A1B6D0EA41E/App.app/App Reason: no suitable image found. Did find: /private/var/containers/Bundle/Application/9AFD28DC-C86C-426F-BEEE-1A1B6D0EA41E/App.app/Frameworks/Capacitor.framework/Capacitor: code signature in (/private/var/containers/Bundle/Application/9AFD28DC-C86C-426F-BEEE-1A1B6D0EA41E/App.app/Frameworks/Capacitor.framework/Capacitor) not valid for use in process using Library Validation: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?) /private/var/containers/Bundle/Application/9AFD28DC-C86C-426F-BEEE-1A1B6D0EA41E/App.app/Frameworks/Capacitor.framework/Capacitor: code signature in (/private/var/containers/Bundle/Application/9AFD28DC-C86C-426F-BEEE-1A1B6D0EA41E/App.app/Frameworks/Capacitor.framework/Capacitor) not valid for use in process using Library Validation: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?) /private/var/containers/Bundle/Application/9AFD28DC-C86C-426F-BEEE-1A1B6D0EA41E/App.app/Frameworks/Capacitor.framework/Capacitor: stat() failed with errno=1 /private/var/containers/Bundle/Application/9AFD28DC-C86C-426F-BEEE-1A1B6D0EA41E/App.app/Frameworks/Capacitor.framework/Capacitor: code signature in (/private/var/containers/Bundle/Application/9AFD28DC-C86C-426F-BEEE-1A1B6D0EA41E/App.app/Frameworks/Capacitor.framework/Capacitor) not valid for use in process using Library Validation: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?) /private/var/containers/Bundle/Application/9AFD28DC-C86C-426F-BEEE-1A1B6D0EA41E/App.app/Frameworks/Capacitor.framework/Capacitor: stat() failed with errno=1

I got this error even with ionic conference app!

Expected Behavior

Just running my app in iOS like in Android!

Sample Code or Sample Application Repo

Reproduction Steps

Other Technical Details

npm --version output: 6.9.0

node --version output: 10.16.0

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

Other Information

ionic info output: Ionic:

ionic (Ionic CLI) : 4.12.0 (/usr/local/lib/node_modules/ionic) Ionic Framework : @ionic/angular 4.11.7 @angular-devkit/build-angular : 0.13.9 @angular-devkit/schematics : 7.3.9 @angular/cli : 7.3.9 @ionic/angular-toolkit : 1.5.1

Capacitor:

capacitor (Capacitor CLI) : 1.2.1 @capacitor/core : 1.2.1

Cordova:

cordova (Cordova CLI) : 8.0.0 Cordova Platforms : none Cordova Plugins : no whitelisted plugins (0 plugins total)

System:

ios-deploy : 1.9.4 NodeJS : v10.16.0 (/usr/local/bin/node) npm : 6.9.0 OS : macOS Mojave Xcode : Xcode 10.2.1 Build version 10E1001

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 17 (3 by maintainers)

Most upvoted comments

Same issue here. Any updates?

Same problem here, I set up a fresh ionic project with the blank template and capacitor support. Everything runs fine on the ios simulators but not on my ios device.

Deleting node_modules and reinstall all packages, helped me.

I have the same issue. I reinstalled and updated Xcode. It doesn’t work. Is the problem with capacitor ? idn what to do…

I don’t know if it’s a capacitor problem or not! @jcesarmobile said that was not capacitor issue. I already installed new version of xcode and then reinstalled CocoaPods with stable version but nothing has changed!
It seems that CocoaPods can’t embed the capacitor and other dependents frameworks.