You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2012/12/11 01:14:35 UTC

docs commit: [CB-1884] Update iOS Upgrading Guide for 2.3.0

Updated Branches:
  refs/heads/master 89943d567 -> 7f8859926


[CB-1884] Update iOS Upgrading Guide for 2.3.0


Project: http://git-wip-us.apache.org/repos/asf/cordova-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-docs/commit/7f885992
Tree: http://git-wip-us.apache.org/repos/asf/cordova-docs/tree/7f885992
Diff: http://git-wip-us.apache.org/repos/asf/cordova-docs/diff/7f885992

Branch: refs/heads/master
Commit: 7f88599269821e748cb5a2f64ba204d9bcc9f0b7
Parents: 89943d5
Author: Shazron Abdullah <sh...@apache.org>
Authored: Mon Dec 10 16:14:28 2012 -0800
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Mon Dec 10 16:14:28 2012 -0800

----------------------------------------------------------------------
 docs/en/edge/guide/cordova-webview/ios.md       |   14 ++++++---
 docs/en/edge/guide/getting-started/ios/index.md |    8 ++++-
 docs/en/edge/guide/upgrading/ios/index.md       |   28 ++++++++++++++++++
 3 files changed, 43 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/7f885992/docs/en/edge/guide/cordova-webview/ios.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/guide/cordova-webview/ios.md b/docs/en/edge/guide/cordova-webview/ios.md
index 8272b51..fc3f6e9 100644
--- a/docs/en/edge/guide/cordova-webview/ios.md
+++ b/docs/en/edge/guide/cordova-webview/ios.md
@@ -29,9 +29,9 @@ Beginning with Cordova 2.0.0 and greater, we only support the sub-project based
 Prerequisites
 -------------
 
-1. **Cordova 2.1.0** or greater
+1. **Cordova 2.3.0** or greater
 2. **Xcode 4.5** or greater
-3. `Cordova.plist` file (from a [newly created](guide_command-line_index.md.html#Command-Line%20Usage_ios) Cordova project)
+3. `config.xml` file (from a [newly created](guide_command-line_index.md.html#Command-Line%20Usage_ios) Cordova project)
 
 
 Adding Cleaver to your Xcode project (CordovaLib sub-project)
@@ -40,8 +40,8 @@ Adding Cleaver to your Xcode project (CordovaLib sub-project)
 1. **Download and extract the Cordova source** to a **permanent folder location** on your hard drive (say to ~/Documents/Cordova)
 2. **Quit Xcode** if it is running.
 3. **Navigate** to the directory where you put the downloaded source above, using **Terminal.app**.
-4. **Copy** the `Cordova.plist` file into your project folder on disk (see **Prerequisites** above)
-5. **Drag and drop** the `Cordova.plist` file into the Project Navigator of Xcode
+4. **Copy** the `config.xml` file into your project folder on disk (see **Prerequisites** above)
+5. **Drag and drop** the `config.xml` file into the Project Navigator of Xcode
 6. **Choose** the radio-button **"Create groups for any added folders"**, select the **Finish** button
 7. **Drag and drop** the `CordovaLib.xcodeproj` file into the Project Navigator of Xcode (from the permanent folder location above, and it should be in the CordovaLib sub-folder)
 8. Select `CordovaLib.xcodeproj` in the Project Navigator
@@ -96,9 +96,13 @@ Using CDVViewController in your code
 
         viewController.wwwFolderName = @"myfolder";
 
-4. (_OPTIONAL_) Set the `startPage` property (defaults to `"index.html"`):
+4. (_OPTIONAL_) Set the `startPage` property (defaults to `"index.html"`). This can be any URL as well:
 
         viewController.startPage = @"mystartpage.html";
+        
+    OR
+        
+        viewController.startPage = @"http://apache.org";
 
 5. (_OPTIONAL_) Set the `useSplashScreen` property (defaults to `NO`):
 

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/7f885992/docs/en/edge/guide/getting-started/ios/index.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/guide/getting-started/ios/index.md b/docs/en/edge/guide/getting-started/ios/index.md
index a8c81da..294282c 100644
--- a/docs/en/edge/guide/getting-started/ios/index.md
+++ b/docs/en/edge/guide/getting-started/ios/index.md
@@ -70,8 +70,12 @@ Starting with Cordova 2.2, the project will have a copy of CordovaLib within it
 a dependency on the copy of CordovaLib from your Cordova installation.
 
 If you would like your project to depend directly on your Cordova installation's version of CordovaLib, you can use:
-`./create --shared`, or change the project reference after creation using:
-`./update_cordova_subproject path/to/you/project`.
+
+        ./create --shared [the rest of the arguments here]
+        
+or change the project reference after creation using:
+
+        ./update_cordova_subproject path/to/your/project
     
 Deploy to Simulator
 -------------------

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/7f885992/docs/en/edge/guide/upgrading/ios/index.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/guide/upgrading/ios/index.md b/docs/en/edge/guide/upgrading/ios/index.md
index cdf2079..f968b71 100644
--- a/docs/en/edge/guide/upgrading/ios/index.md
+++ b/docs/en/edge/guide/upgrading/ios/index.md
@@ -22,6 +22,34 @@ Upgrading Cordova iOS
 
 Please note that **Xcode 4.5 is required**. To submit to the Apple App Store, you must use the latest shipped version of the iOS SDK, which is iOS 6. The iOS 6 SDK requires Xcode 4.5.
 
+## Upgrading Cordova 2.2.0 projects to 2.3.0 ##
+
+1. **Download and extract the Cordova 2.3.0 source** to a **permanent folder location** on your hard drive (say to ~/Documents/Cordova-2.3.0)
+2. **Quit Xcode** if it is running.
+3. **Navigate** to the directory where you put the downloaded source above, using **Terminal.app**.
+4. [**Create a new project**](guide_command-line_index.md.html#Command-Line%20Usage_ios) from the command-line tools - you will have to grab the assets from this new project
+5. **Copy** the **www/cordova-2.3.0.js** file from the new project into your **www** folder, and delete your **www/cordova-2.2.0.js** file
+6. **Update** the Cordova script reference in your **www/index.html** file (and any other files that contain the script reference) to point to the new **cordova-2.3.0.js** file
+7. Update (or replace, if you never changed the file) your **MainViewController.m** according to the one from the new project.
+8. Delete your **"cordova"** folder, and copy the **"cordova"** folder from the new project into your project's root folder **(in 2.3.0, this has new scripts)** 
+9. Next, update your CordovaLib sub-project reference.
+    1. Launch **Terminal.app**
+    2. Go to the location where you installed Cordova **(see Step 1)**, in the **bin** sub-folder
+    3. Run the script below where the first parameter is the path to your project's **.xcodeproj** file:
+    
+        `update_cordova_subproject path/to/your/project/xcodeproj`
+
+10. Convert your **Cordova.plist** file to **config.xml**, by running the script **bin/cordova\_plist\_to\_config\_xml** on your project file.
+11. Add the InAppBrowser plugin to your **config.xml**, by adding this tag under **&lt;cordova&gt;&lt;plugins&gt;**:
+
+        <plugin name="InAppBrowser" value="CDVInAppBrowser" />
+12. Note that Objective-C plugins are **not** whitelisted anymore. To whitelist your connections with the app whitelist, you will need to set the “User-Agent” header of the connection to the same user-agent as the main Cordova WebView. 
+You can get this by accessing the **userAgent** property off the main view-controller. The main view-controller (CDVViewController) also has a **URLisAllowed** method for you to check whether a URL will pass the whitelist.        
+13. Device API changes: 
+    * For iOS, device.platform used to return “iPhone”, “iPad” or “iPod Touch” — now it returns (correctly) “iOS”. 
+    * For iOS, device.name (now deprecated for all platforms) used to return the name of the user’s device (e.g ‘Shazron’s iPhone 5′) — now it returns what device.platform used to return: ”iPhone”, “iPad” or “iPod Touch”.  
+    * For all platforms, there is a new property called device.model — this returns the specific device model, e.g “iPad2,5″ (for other platforms, this returns what device.name used to return).
+
 ## Upgrading Cordova 2.1.0 projects to 2.2.0 ##
 
 1. **Download and extract the Cordova 2.2.0 source** to a **permanent folder location** on your hard drive (say to ~/Documents/Cordova-2.2.0)