I am having a problem using the command line tool cordova-cli.
I have followed every step from the documentation:
$ cordova create ~/test com.test test
In this step I want to change the contents of the www folder:
1-Move the sample web page under a src folder. So the contents of the www are:
--www/ |-- config.xml |-- src/
2-Edit the config.xml with my data and change the content tag to point the correct path of the index.html:
<widget id="com.test" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Test</name>
<description>
Test
</description>
<author email="[email protected]" href="http://sample.com/">
Foo Bar
</author>
<content src="src/index.html"/>
<access origin="*" />
<preference name="fullscreen" value="true" />
<preference name="webviewbounce" value="false" />
<preference name="UIWebViewBounce" value="false" />
</widget>
With this file changed I continue with the general steps (from the root of the project):
Add iOS platform:
$ cordova platform add ios
And then build the project:
$ cordova build
Now, if I open the project under test/platforms/ios/test I see a config.xml with a default content as:
<widget id="io.cordova.helloCordova" version="2.0.0" xmlns="http://www.w3.org/ns/widgets">
<name>Hello Cordova</name>
<description>
A sample Apache Cordova application that responds to the deviceready event.
</description>
<author email="[email protected]" href="http://cordova.io">
Apache Cordova Team
</author>
<content src="index.html" />
<feature name="LocalStorage">
<param name="ios-package" value="CDVLocalStorage" />
</feature>
<access origin="*" />
<preference name="KeyboardDisplayRequiresUserAction" value="true" />
<preference name="SuppressesIncrementalRendering" value="false" />
<preference name="UIWebViewBounce" value="false" />
<preference name="TopActivityIndicator" value="gray" />
<preference name="EnableLocation" value="false" />
<preference name="EnableViewportScale" value="false" />
<preference name="AutoHideSplashScreen" value="true" />
<preference name="ShowSplashScreenSpinner" value="true" />
<preference name="MediaPlaybackRequiresUserAction" value="false" />
<preference name="AllowInlineMediaPlayback" value="false" />
<preference name="OpenAllWhitelistURLsInWebView" value="false" />
<preference name="BackupWebStorage" value="cloud" />
<preference name="fullscreen" value="true" />
<preference name="webviewbounce" value="false" />
</widget>
Notice that UIWebViewBounce preference is correct, but the content tag is incorrect, as well as the author tag, description and name.
If then I run the app it fails, as it tries to open the www/index.html instead of www/src/index.html.
Am I doing something wrong?
NOTE
The contents of the test/www is copied correctly into test/platforms/ios/www.
www/config.xmlfile. - LandonSchropp