Cannot build iOS Ionic Capacitor project
zarko-tg opened this issue · comments
Building for iOS using cordova-plugin-inappbrowser 6.0.0 fails.
...
/Users/user/project/ios/capacitor-cordova-ios-plugins/sources/CordovaPluginInappbrowser/CDVWKInAppBrowser.m:22:9: fatal error: 'Cordova/CDVWebViewProcessPoolFactory.h' file not found
#import <Cordova/CDVWebViewProcessPoolFactory.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/user/project/ios/capacitor-cordova-ios-plugins/sources/CordovaPluginInappbrowser/CDVWKInAppBrowser.m:22:9: note: did not find header 'CDVWebViewProcessPoolFactory.h' in
framework 'Cordova' (loaded from
'/Users/user/Library/Developer/Xcode/DerivedData/App-dhqnmyemtxyfryeexvhkkexwfcbw/Build/Intermediates.noindex/ArchiveIntermediates/App/BuildProductsPath/Release-iphoneos/CapacitorCordova')
1 error generated.
...
** ARCHIVE FAILED **
Ionic:
Ionic CLI : 7.1.5
Ionic Framework : @ionic/angular 6.7.1
@angular-devkit/build-angular : 17.0.3
@angular-devkit/schematics : 17.0.3
@angular/cli : 17.0.3
@ionic/angular-toolkit : 10.0.0
Capacitor:
Capacitor CLI : 5.5.1
@capacitor/android : 5.5.1
@capacitor/core : 5.5.1
@capacitor/ios : 5.5.1
Utility:
cordova-res : not installed globally
native-run (update available: 2.0.0) : 1.7.4
System:
NodeJS : v20.10.0
npm : 10.2.3
OS : macOS Unknown
Checklist
- [x ] I searched for existing GitHub issues
- I updated all Cordova tooling to most recent version
- [ x] I included all the necessary information above
Does it build with a vanilla cordova-ios?
@breautek I did a quick test, it seems fine on a vanilla project, no iOS build failure.
Thanks, then it seems the issue is within the capacitor/ionic framework. I don't think there is anything actionable by Cordova.
I am facing the same issue and it looks like it is coming from this PR https://github.com/apache/cordova-plugin-inappbrowser/pull/1031/files#diff-3a6f80dde729cc2827f9bb45fed1ba49af846f71424cc0567c754309ea1798dcR22
when reverting this change, the error stops and the build succeeds on Capacitor.
@jcesarmobile any chance that we can add a similar condition which will skip this import on a capacitor app?
FYI, it looks like this issue will be addressed in the next Capacitor version:
ionic-team/capacitor#7096