What is the need for an intermediate folder in the Cordova 3.5.0 iOS app?

We are working on a hybrid iOS application. We used to use Cordova version 3.2.0. Recently, we are in the process of updating our version of Cordova to version 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 called "Staging" in the structure of the Xcode project (this is rather strange for us).

There is no staging folder in the project root folder. Below is a screenshot.

enter image description here

But after opening with Xcode, the folder "www" and "config.xml" fall into the intermediate directory instead of the root directory. In addition, I see two sets of the www folder and the config.xml file. The www folder and the config.xml file, which is included in the root folder, are displayed in red (possibly because I took only the directory my_cordova_project → platform → ios and copied it to another location. Planning to transfer only the ios folder to my version control tool) . I just deleted these two links.

enter image description hereenter image description here

Can someone please explain to me if this is a problem. Can I get the old Xcode project structure with Cordova 3.5.0? Please let me know in case of any clarification.

+5
source share
3 answers

Sorry, I did not understand your question. Staging is just a folder with links to the ios-proy / www folder, and you can edit your code, usually changing the original

In the multi-platform proyect, “adding a cord platform” will create a different project for each platform, in which case your editing should be done in the common code and synchronization sources through the “cord assembly”, which will copy and compile the code.

A similar question about the setting: The purpose of creating a folder in PhoneGap 3.4? Only changes in index.html in this folder are recognized? enter image description here

+6
source

I had the same problem as understanding the relationship / www and / platform / ios / www. I realized that the former should contain a source common to all platforms, and the latter should contain modifications to the platform. The Staging folder displayed in the Xcode project is a link to the last folder. Changing the contents in the previous folder and launching the application did not seem to have any effect - there were no changes.

What I was missing was that after the modifications, I still needed to complete the build on the command line:

cordova build ios 

After this, the changes in the shared folder are copied to certain folders of the platform, and the launch of the project in Xcode shows the changed content.

+4
source

You must sudo cordova build after making any changes before creating / running in Xcode.

This will force Cordoba to update the folder / staging folder with a “delivered” (ie assembled for production) version of your assets that has some Cordoba magic, such as device-specific plugins. Compare / put in / www and you will see some additional files in the first.

+1
source

Source: https://habr.com/ru/post/1201081/


All Articles