1

I am a newbie and I am trying to deploy a IOS project to the store, which uses Cordova version of 3.1.0. When I validate I am getting an error "Itunes store operation failed" as Cordova version 3.1.0 doesn't support arm 64. To upgrade from 3.1.0 to 3.4.1, I followed the below steps:

  1. I used npm command to upgrade: sudo npm update -g cordova
  2. To update the platform : cordova platform update ios

At second step I am facing an error: "Current working directory is not a Cordova-based project."

Am I following the correct way? If right. how to fix the error in the second step? If wrong, what is the best possible way to upgrade my project to be deployed to store with arm 64 support?

Please help me out. Thanks in advance.

1 Answers1

2

First of all check your cordova version with cordova platform version ios. The actual version is 3.8.0.

After you did this, and your version is not 3.8.0 run sudo npm update -g cordova like you did already. When this is finished, you're going to type cordova -v and check, if cordova is at 5.1.1 now (which is the actual cordova version).

So now you're ready to update your version. Move into your project folder with your terminal -> cd desktop -> cd cordovaProject and run cordova platform update ios which will update the iOS Platform.

If this doesn't work for you. Copy the folder content of your iOS folder (yourProjectFolder -> platforms -> iOS -> www), create a new project and paste the copied content into the folder from which you copied it before.

This works like a charme :)

Sithys
  • 3,655
  • 8
  • 32
  • 67
  • When I try to run the command `cordova platform version ios` the same error i.e "the current working directory is not a cordova-based project" came to the picture. I tried running the command in the project directory which contains the following files: "cordova", "CordovaLib", "project_file", "project_name.xcodeproj". – Rakesh Vidya Chandra Jul 24 '15 at 14:34
  • Do it like i said: only move from desktop or documents or sth like that into your folder and than run `cordova platform version ios`. – Sithys Jul 24 '15 at 14:37
  • I came to know that Cordova 3.0+ may still require various changes to project-level directory structures and other dependencies. After running the npm command to update Cordova, and I need to ensure my project's resources conform to the latest version's requirements. Can you help me by letting me know on how I can confirm to the latest version's requirements by modifying the project's resources and the structure. – Rakesh Vidya Chandra Jul 24 '15 at 14:39
  • Update your cordova version and set up a new project. Copy your platform www folder without the cordova parts (cordova.js, cordova-js-src, cordova_plugins.js) and paste them into your new, fresh and up-to-date project - thats all. – Sithys Jul 24 '15 at 14:40
  • I tried your second way, i.e. Copying the folder content and found the things below: 1.When I opened my xcode and built the project "CordovaLib.xcodeproj" was shown red as it was missing. 2. Shell script invocation error with this error stack trace: **line 2: cordova/lib/copy-www-build-step.sh: No such file or directory**.. Can you please tell me how to deal with this? – Rakesh Vidya Chandra Jul 24 '15 at 20:12
  • Also found that my old project which is using the cordova version 3.1.0 doesn't contain the folder "platforms" @Sithys – Rakesh Vidya Chandra Jul 24 '15 at 20:26
  • than you have no platform installed – Sithys Jul 26 '15 at 10:51