There are many questions with the error message like mine but I couldn’t find any proper solution for me.
I have a mobile app and I have been using ionic framework with capacitor in version 2. I decided to migrate to version 3 and everything works fine locally on android and ios. The only issue I have is when I wanted to build my app with app center. Android version is built without any issues but iOS built throws me an error like below:
ld: framework not found CapacitorApp
clang: error: linker command failed with exit code 1 (use -v to see invocation)
and somewhere below is the error code:
##[error]Error: /usr/bin/xcodebuild failed with return code: 65
I dont know if it helps you but below you can find my Podfile
platform :ios, '12.0'
use_frameworks!
# workaround to avoid Xcode 10 caching of Pods that requires
# Product -> Clean Build Folder after new Cordova plugins installed
# Requires CocoaPods 1.6 or newer
install! 'cocoapods', :disable_input_output_paths => true
def capacitor_pods
pod 'Capacitor', :path => '../../node_modules/@capacitor/ios'
pod 'CapacitorCordova', :path => '../../node_modules/@capacitor/ios'
pod 'CapacitorApp', :path => '../../node_modules/@capacitor/app'
pod 'CapacitorAppLauncher', :path => '../../node_modules/@capacitor/app-launcher'
pod 'CapacitorBrowser', :path => '../../node_modules/@capacitor/browser'
pod 'CapacitorDevice', :path => '../../node_modules/@capacitor/device'
pod 'CapacitorHaptics', :path => '../../node_modules/@capacitor/haptics'
pod 'CapacitorKeyboard', :path => '../../node_modules/@capacitor/keyboard'
pod 'CapacitorPushNotifications', :path => '../../node_modules/@capacitor/push-notifications'
pod 'CapacitorSplashScreen', :path => '../../node_modules/@capacitor/splash-screen'
pod 'CapacitorStatusBar', :path => '../../node_modules/@capacitor/status-bar'
pod 'CapacitorStorage', :path => '../../node_modules/@capacitor/storage'
pod 'CordovaPlugins', :path => '../capacitor-cordova-ios-plugins'
pod 'CordovaPluginsResources', :path => '../capacitor-cordova-ios-plugins'
end
target 'App' do
capacitor_pods
# Add your Pods here
end
Unfortunately I cannot shouw you all of my code but if you need any peace of it just tell me in the comment.
update:
I was able to reproduce it locally. It is happening only on App staging
schema. The other one App
looks good.
2
Answers
Finally, I've found the solution. For some reason, I had to copy and paste the list of frameworks in
Frameworks Search Paths
. It was filled in Debug and Release schema but for Staging Debug it was empty. Here is the screenshot with what I had to add.If you have multiple schemas you need to add them to the
Podfile
so they can use Capacitor plugins