Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XCode cannot build : Cordova.h and Info.plist missing files #760

Closed
3 tasks done
mushu8 opened this issue Jan 3, 2020 · 28 comments
Closed
3 tasks done

XCode cannot build : Cordova.h and Info.plist missing files #760

mushu8 opened this issue Jan 3, 2020 · 28 comments
Labels

Comments

@mushu8
Copy link

mushu8 commented Jan 3, 2020

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 (cordova-lib@9.0.1)
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

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above
@brody4hire
Copy link

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

@fwgood
Copy link

fwgood commented May 12, 2020

I have the same error
image

@feniquill
Copy link

feniquill commented May 15, 2020

I am also getting the same error trying to build from the xcode app
Screen Shot 2020-05-15 at 5 18 22 PM

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.

@lucianotrevisanalberti
Copy link

lucianotrevisanalberti commented Jun 17, 2020

I get the same error.

Captura de Tela 2020-06-17 às 17 05 02

@brody4hire brody4hire added info-needed Further information is requested bug and removed info-needed Further information is requested labels Jun 17, 2020
@brody4hire
Copy link

@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:

Screen Shot 2020-06-17 at 4 44 20 PM

I suspect that this would affect other users. I think this should be documented as a pitfall.

@lucianotrevisanalberti
Copy link

lucianotrevisanalberti commented Jun 17, 2020

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

@Rahulbhutani97
Copy link

same issue i faced now, already did above mentioned things. Not working that, any solutions ? @brodybits @lucianotrevisanalberti @feniquill @mushu8

@brody4hire
Copy link

@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 apache/cordova-docs#1143 to get the pitfall documented.

@Rahulbhutani97
Copy link

@brodybits thanks i update my screenshot there for reference at apache/cordova-docs#1143

@brody4hire
Copy link

Screenshot 2020-12-28 at 10 54 08 PM

Build succeded :: in VScode

Screenshot 2020-12-28 at 10 56 03 PM

When i open .xcodeProj file then run build it shows error of info.plist

The screenshot should have been here, apache/cordova-docs#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.

@Rahulbhutani97
Copy link

What I mistaken??
.xcodeproj open in xcode or just open platform/ios folder in xcode?

@brody4hire
Copy link

You should open the .xcodeproj in Xcode (it is in platofrms/ios) then build and run.

@Rahulbhutani97
Copy link

Rahulbhutani97 commented Jan 3, 2021 via email

@Rahulbhutani97
Copy link

Rahulbhutani97 commented Jan 4, 2021

Issue resolved... yeah :)

@andresloopear
Copy link

@Rahulbhutani97 how did you solved it?

@Rahulbhutani97
Copy link

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

@radu2323
Copy link

radu2323 commented May 12, 2021

I managed to fix this by selecting my application build project. It seems that by default, the Cordova subproject is selected in Xcode GUI.

image

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.

@rmeske
Copy link

rmeske commented Jul 20, 2021

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?

@Rahulbhutani97
Copy link

Rahulbhutani97 commented Jul 20, 2021 via email

@rmeske
Copy link

rmeske commented Jul 20, 2021

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.

@Rahulbhutani97

This comment was marked as spam.

@andres199556
Copy link

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.

@chr15m
Copy link

chr15m commented Jan 13, 2023

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.

@fwgood

This comment was marked as spam.

@dpogue
Copy link
Member

dpogue commented Jan 13, 2023

I believe this can happen if you open the project's .xcodeproj file rather than the project's .xcworkspace file.

@chr15m
Copy link

chr15m commented Jan 13, 2023

@dpogue thank you that seems to have fixed the issue so far. Will post here if it happens again.

@Mady-Camara
Copy link

Mady-Camara commented Jan 18, 2023

@dpogue it works perfectly 👍🏾 thank you

@dpogue
Copy link
Member

dpogue commented Apr 16, 2023

It seems like opening the project's .xcworkspace works, so I'm going to close this issue.

@dpogue dpogue closed this as completed Apr 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests