Unable to compile Phonegap application locally

I can not compile my iOS application locally, Android is working fine.

I installed both cordova and phonegap using npm install -g [...] . I am running OSX (10.7.5).

Output version from both:

 $ cordova -v 5.1.1 $ phonegap -v 0.9.4 

I have Xcode installed (v 4.6.2). I also have command line tools installed.

Both cordons and telephone conversations cannot be built, apparently for the same reason. Running phonegap build ios outputs:

 $ phonegap build ios phonegap detecting iOS SDK environment... phonegap using the local environment phonegap compiling iOS... error ENOENT, no such file or directory '/Users/mike/apps/***/platforms/ios/__CLI__/config.xml' 

Here is the result from the same cordova :

 $ cordova build ios cp: copyFileSync: could not write to dest file (code=ENOENT):/Users/mike/apps/***/platforms/ios/__CLI__/config.xml cp: no such file or directory: /Users/mike/apps/***/platforms/ios/platform_www/* Parsing /Users/mike/apps/***/platforms/ios/__CLI__/config.xml failed Error: ENOENT, no such file or directory '/Users/mike/apps/***/platforms/ios/__CLI__/config.xml' at Error (native) at Object.fs.openSync (fs.js:500:18) at Object.fs.readFileSync (fs.js:352:15) at Object.module.exports.parseElementtreeSync (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/util/xml-helpers.js:118:27) at Object.ConfigParser (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/configparser/ConfigParser.js:33:24) at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/prepare.js:115:32 at Array.map (native) at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/prepare.js:70:40 at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:787:54) at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:816:30) 

It seems to me that in a way that does not happen, there should be some kind of replacement with __CLI__ , but it's hard to say. Below is a screenshot of the structure of the file that it generates:

Filestructure

I can build using the remote build service, but it’s quite difficult, since the application does not load properly, so I need to do quite a bit of debugging to figure it out.

Node is installed in version 0.12.5. NPM is installed in version 2.11.2.

I reinstalled the platform many times and always get this error.

+7
ios cordova phonegap-build
source share
1 answer

This question is a little old, but I will throw a few things:

  • I have a command line assembly of my ios platform - it does not have a __CLI__... subdirectory. Just a data point.
  • I am wondering if there is anything strange about how Xcode is set up with respect to its build path. See this answer to make sure the output directory is set correctly: while still getting the <Cordova / CDVViewController.h> file not found in xcode . I have a desktop and mobile application configured in Xcode, and I must remember to toggle this setting back and forth.
  • PhoneGap / Cordova is phasing out older versions of ios with their new versions. I would not be surprised if Cordova 5.1.1 did not support Xcode 4.6.2. You might want to try an older version of the cordova library.
+1
source share

All Articles