Search code examples
ioscordova-3xcode5.1

What is the need of staging folder in Cordova 3.5.0 iOS application?


We are working on a hybrid iOS application. Previously we were using Cordova 3.2.0 version. Recently we are under the process of upgrading our Cordova version to 3.5.0. After creating a new project with Cordova 3.5.0 and opening it with Xcode 5.1.1, we can see a new folder named "Staging" in the Xcode project structure (it's pretty strange for us).

In the root folder of project, there is no staging folder found. Below is the screenshot.

enter image description here

But after opening it with Xcode, the "www" folder and the "config.xml" are coming under staging directory instead of the root directory. Also, I can see two sets of www folder and config.xml file. The www folder & config.xml file which comes under root folder appears in red color (that may be because I have taken only the my_cordova_project --> platform --> ios directory and copied it to some other place. I am planning to commit only the ios folder to my versioning tool). I have simply deleted those two references.

enter image description here enter image description here

Could someone please explain me if this is an issue. Can I get the old Xcode project structure with Cordova 3.5.0 also? Please let me know in case of any clarifications.


Solution

  • Sorry, I did not understand your question. Staging is simply a link folder to the ios-proj/www folder, and you can edit your code normally modifying the original.

    In a multi-platform project "cordova platform add " will create a different project for each platform, in this case your editing should be done in the common code and sync sources through "cordova build" that will copy and compile code.

    A similar question about the staging purpose: Purpose of Staging folder in PhoneGap 3.4? Only changes to index.html in this folder get recognized? enter image description here