cordova-ios
cordova-ios copied to clipboard
XCode cannot build : Cordova.h and Info.plist missing files
Bug Report
Problem
I cannot build my XCode project generated by Cordova :
CordovaLib.xcodeproj/Cordova/Cordova.h and CordovaLib.xcodeproj/Cordova/Info.plist files are not generated thus an error is thrown during XCode compilation.
What is expected to happen?
I can build and run my project.
What does actually happen?
Information
I tried to get these files from the cordova-ios repository and add them (and link) manually in the XCode project but others errors are thrown by the compiler
Command or Code
these commands don't show any errors and very few warning (ld file or directory not found for -F… due to the cordova-plugin-firebasex plugin) :
- ionic cordova platofrm add ios --no-resources
- ionic cordova build ios --debug --buildConfig=./resources/ios/build.json --source-map
Environment, Platform, Device
Mac OS X Mojave 10.14.5 (18F132) iOS 12.0
Version information
Ionic: Ionic CLI : 5.4.13 (~/.nvm/versions/node/v10.14.1/lib/node_modules/ionic) Ionic Framework : @ionic/angular 4.11.7 @angular-devkit/build-angular : 0.801.3 @angular-devkit/schematics : 8.1.3 @angular/cli : 8.1.3 @ionic/angular-toolkit : 2.0.0
Cordova: Cordova CLI : 9.0.0 ([email protected]) Cordova Platforms : ios 5.1.1 Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.1.3, (and 9 other plugins)
Utility: cordova-res : 0.8.1 native-run : 0.3.0
System: Android SDK Tools : 26.1.1 (~/Library/Android/sdk) ios-deploy : 1.10.0 ios-sim : 8.0.2 NodeJS : v10.14.1 (~/.nvm/versions/node/v10.14.1/bin/node) npm : 6.13.1 OS : macOS Mojave Xcode : Xcode 11.2.1 Build version 11B500
Checklist
- [X] I searched for existing GitHub issues
- [X] I updated all Cordova tooling to most recent version
- [X] I included all the necessary information above
I just added the help wanted label. It would be extremely helpful for us if you could give us the minimal, reproducible example ([1]) with no use of Ionic. Also this looks like a custom build procedure which we do not have the extra resources to support.
How to embed in an existing application was already documented. I am not sure if anyone has tested this in the past few years.
[1] https://stackoverflow.com/help/minimal-reproducible-example
I have the same error
I am also getting the same error trying to build from the xcode app
A little background. I just recently upgraded to 10.15.4 catalina and am thinking this may be a cause but can't verify that.
I get the same error.
@lucianotrevisanalberti it looks like your Xcode GUI is trying to just build the Cordova subproject, which is not really tested or supported by us. Please click on this control and use it to select your application build project:

I suspect that this would affect other users. I think this should be documented as a pitfall.
guys, the problem was fixed deleting "ios" folder (inside of "platform" folder) and running "build" again... Build Success
thanks @brodybits , but in older versions "Generic iOS Device" works
same issue i faced now, already did above mentioned things. Not working that, any solutions ? @brodybits @lucianotrevisanalberti @feniquill @mushu8
@Rahulbhutani97 it looks like there is something wrong with your project or installation. I would highly recommend you check that you have all tools updated and start with a new workarea, no plugins
or platforms
folders. For further support please give us the information requested in the template. Thanks.
I have raised https://github.com/apache/cordova-docs/issues/1143 to get the pitfall documented.
@brodybits thanks i update my screenshot there for reference at https://github.com/apache/cordova-docs/issues/1143
![]()
Build succeded :: in VScode
![]()
When i open .xcodeProj file then run build it shows error of info.plist
The screenshot should have been here, https://github.com/apache/cordova-docs/issues/1143 is just to get the pitfall documented for others.
I personally find it easiest to just open the project in platforms/ios in Xcode and build from there.
What I mistaken?? .xcodeproj open in xcode or just open platform/ios folder in xcode?
You should open the .xcodeproj in Xcode (it is in platofrms/ios) then build and run.
Already did
On Sun, 3 Jan, 2021, 5:39 am Chris Brody, [email protected] wrote:
You should open the .xcodeproj in Xcode (it is in platofrms/ios) then build and run.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/apache/cordova-ios/issues/760#issuecomment-753546758, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJOP2B6NDY6GV4WODHGQD4DSX6YVJANCNFSM4KCNXJJA .
Issue resolved... yeah :)
@Rahulbhutani97 how did you solved it?
signin with your team (i.e. apple account) then in xcode under Product > Archive then you will get Build succeeded or failed https://blog.rahulbhutani.com/ connect me here if you want
I managed to fix this by selecting my application build project. It seems that by default, the Cordova subproject is selected in Xcode GUI.
If you have something like in this picture, the wrong build project is selected. Just click on Cordova and select your project from there.
I think this is the correct answer for this issue.
I just ran into this today with an existing Ionic project that worked fine. I am on Big Sur (11.4) and running Xcode 12.5.1, Ionic 6.13.1 and Cordova 10.0.0.
I have removed the iOS platform and the added again. I get a successful build with Ionic/Cordova, but when I open in Xcode and try to build the project it is giving a build error and indicates the Cordova folder, Info.plist & Cordova.h are missing from CordovaLib.xcodeproj.
I have tried set the device to "Any iOS Device" as well as specific platforms, all with the same result. The error seems to be more related to the Cordova build process.
Any suggestions?
Hy
Add info.plist file and cordova.h
And check info.plist was there ??? Actually it is default to be there
On Tue, 20 Jul 2021 at 8:55 PM, Ron Meske @.***> wrote:
I just ran into this today with an existing Ionic project that worked fine. I am on Big Sur (11.4) and running Xcode 12.5.1, Ionic 6.13.1 and Cordova 10.0.0.
I have removed the iOS platform and the added again. I get a successful build with Ionic/Cordova, but when I open in Xcode and try to build the project it is giving a build error and indicates the Cordova folder, Info.plist & Cordova.h are missing from CordovaLib.xcodeproj.
I have tried set the device to "Any iOS Device" as well as specific platforms, all with the same result. The error seems to be more related to the Cordova build process.
Any suggestions?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/apache/cordova-ios/issues/760#issuecomment-883483629, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJOP2BZHNJ5DZR6BEII6NBLTYWIOXANCNFSM4KCNXJJA .
I reopened the project to add the files and and noticed it was giving a conflict on the signing. So first, I unchecked the "Automatically manage signing" and then rechecked it and added the Team back. It now builds successfully.
The two files are missing but Xcode successfully builds and the app runs properly.
Greatt
If any work you have for me like any paid task i am available to you
Shall we connect further ??
On Wed, 21 Jul 2021 at 4:47 AM, Ron Meske @.***> wrote:
I reopened the project to add the files and and noticed it was giving a conflict on the signing. So first, I unchecked the "Automatically manage signing" and then rechecked it and added the Team back. It now builds successfully.
The two files are missing but Xcode successfully builds and the app runs properly.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/apache/cordova-ios/issues/760#issuecomment-883767173, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJOP2B6DYSE4WBFORPAQLQ3TYX72BANCNFSM4KCNXJJA .
No se si aya se encontró la solución, en mi caso era porque estaba abriendo el archivo de .xcodeproj, lo cual no cargaba correctamente el proyecto, opte por cargar el archivo .xcworkspace y cargó a la perfección.
I intermittently get this error in the form of missing Info.plist in the CordovaLib scheme. Selecting the app scheme in XCode does not seem to fix the error. Sometimes the file is generated when running prepare and build, and sometimes it isn't.
已收到您的邮件,会尽快回复
I believe this can happen if you open the project's .xcodeproj
file rather than the project's .xcworkspace
file.
@dpogue thank you that seems to have fixed the issue so far. Will post here if it happens again.
@dpogue it works perfectly 👍🏾 thank you
It seems like opening the project's .xcworkspace works, so I'm going to close this issue.