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/08/02 02:22:09 UTC

docs commit: [CB-1171] Update CordovaWebView Guide for 2.1

Updated Branches:
  refs/heads/master 90dd91ae8 -> 8b8ae8a11


[CB-1171] Update CordovaWebView Guide for 2.1


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

Branch: refs/heads/master
Commit: 8b8ae8a113ea2367d6fe42be6e75c284db8d1da1
Parents: 90dd91a
Author: shazron <sh...@gmail.com>
Authored: Wed Aug 1 17:21:06 2012 -0700
Committer: shazron <sh...@gmail.com>
Committed: Wed Aug 1 17:21:06 2012 -0700

----------------------------------------------------------------------
 docs/en/edge/guide/cordova-webview/ios.md |   64 +++++++++++++-----------
 1 files changed, 35 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/blob/8b8ae8a1/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 c5193b3..30f1509 100644
--- a/docs/en/edge/guide/cordova-webview/ios.md
+++ b/docs/en/edge/guide/cordova-webview/ios.md
@@ -24,40 +24,35 @@ Beginning with Cordova 1.4, you can use Cordova as a component in your iOS appli
 
 New Cordova-based applications created using the Xcode template provided in Cordova 1.4 or greater use Cleaver, and this template is considered the reference implementation for Cleaver.
 
-Beginning with Cordova 2.0.0, we only support the sub-project based Cleaver implementation from now on.
+Beginning with Cordova 2.0.0 and greater, we only support the sub-project based Cleaver implementation from now on.
 
 Prerequisites
 -------------
 
-1. **Cordova 2.0.0** or greater
+1. **Cordova 2.1.0** or greater
 2. **Xcode 4.3** or greater
-3. `Cordova.plist` file
+3. `Cordova.plist` 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)
 -------------------------------------------------------------
 
-0. **Install** Cordova
-1. **Copy** the `Cordova.plist` file into your project folder on disk
-2. **Drag and drop** the `Cordova.plist` file into the Project Navigator of Xcode
-3. **Choose** the radio-button **"Create groups for any added folders"**
-4. Press the key combination **Option-Command-A**, which should drop down a sheet to add files to your project (the **"Add Files..." sheet**). Make sure the **"Created groups for any added folders"** radio-button is selected
-5. Press the key combination **Shift-Command-G**, which should drop down another sheet for you to go to a folder (the **"Go to the folder:" sheet**)
-6. Enter `~/Documents/CordovaLib/` in the **"Go to the folder:" sheet** and then press the **"Go"** button
-7. Select the `VERSION` file in the the **"Add Files..." sheet**
-8. Press the **"Add"** button in the **"Add Files..." sheet**
-9. Press the key combination **Option-Command-A**, which should drop down a sheet to add files to your project (the **"Add Files..." sheet**). Make sure the **"Created groups for any added folders"** radio-button is selected
-10. Press the key combination **Shift-Command-G**, which should drop down another sheet for you to go to a folder (the **"Go to the folder:" sheet**)
-11. Enter `~/Documents/CordovaLib/CordovaLib.xcodeproj` in the **"Go to the folder:" sheet** and then press the **"Go"** button
-12. Press the **"Add"** button in the **"Add Files..." sheet**
-13. Select `CordovaLib.xcodeproj` in the Project Navigator
-14. Press the key combination **Option-Command-1** to show the **File Inspector**
-15. Choose **"Relative to CORDOVALIB"** in the **File Inspector** for the drop-down menu for **Location** 
-16. Click on the **project icon** in the Project Navigator, select your **Project**, then select the **"Build Settings"** tab
-17. Add `-all_load` and `-Obj-C` - for the **"Other Linker Flags"** value
-18. Click on the **project icon** in the Project Navigator, select your **Target**, then select the **"Build Phases"** tab
-19. Expand **"Link Binaries with Libraries"** 
-20. Click on the **"+" button**, and add these **frameworks** (and optionally in the Project Navigator, **move** them under the Frameworks group):
+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. Type **make** and press **Enter**. This will update the $(CORDOVALIB) build setting in Xcode to point to the CordovaLib in the permanent folder location above.
+5. **Copy** the `Cordova.plist` file into your project folder on disk (see **Prerequisites** above)
+6. **Drag and drop** the `Cordova.plist` file into the Project Navigator of Xcode
+7. **Choose** the radio-button **"Create groups for any added folders"**, select the **Finish** button
+8. **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)
+9. Select `CordovaLib.xcodeproj` in the Project Navigator
+10. Press the key combination **Option-Command-1** to show the **File Inspector**
+11. Choose **"Relative to CORDOVALIB"** in the **File Inspector** for the drop-down menu for **Location** 
+12. Select the **project icon** in the Project Navigator, select your **Target**, then select the **"Build Settings"** tab
+13. Add `-all_load` and `-Obj-C` - for the **"Other Linker Flags"** value
+14. Click on the **project icon** in the Project Navigator, select your **Target**, then select the **"Build Phases"** tab
+15. Expand **"Link Binaries with Libraries"** 
+16. Select the **"+" button**, and add these **frameworks** (and optionally in the Project Navigator, **move** them under the Frameworks group):
 
         AddressBook.framework
         AddressBookUI.framework
@@ -70,12 +65,23 @@ Adding Cleaver to your Xcode project (CordovaLib sub-project)
         MobileCoreServices.framework
         CoreMedia.framework
 
-21. Expand **"Target Dependencies"** - the top box labeled like this if you have multiple boxes!
-22. Click on the **"+" button**, and add the `CordovaLib` build product
-23. Expand **"Link Binaries with Libraries"** - the top box labeled like
+17. Expand **"Target Dependencies"** - the top box labeled like this if you have multiple boxes!
+18. Select the **"+" button**, and add the `CordovaLib` build product
+19. Expand **"Link Binaries with Libraries"** - the top box labeled like
     this if you have multiple boxes!
-24. Click on the **"+" button**, and add `libCordova.a`
-
+20. Select the **"+" button**, and add `libCordova.a`
+21. Set the Xcode preference **"Xcode Preferences -> Locations -> Derived Data -> Advanced…"** to **"Unique"**
+22. Select the **project icon** in the Project Navigator, select your **Target**, then select the **"Build Settings"** tab
+23. Search for **"Header Search Paths"**. For that setting, add these three values below (with quotes):
+
+        "$(TARGET_BUILD_DIR)/usr/local/lib/include"
+    
+        "$(OBJROOT)/UninstalledProducts/include"
+    
+        "$(BUILT_PRODUCTS_DIR)"
+
+    With **Cordova 2.1.0**, CordovaLib has been upgraded to use **Automatic Reference Counting (ARC)**. You don't need to upgrade to **ARC** to use CordovaLib, but if you want to upgrade your project to use **ARC**, please use the Xcode migration wizard from the menu: **Edit -> Refactor -> Convert to Objective-C ARC…**, **de-select libCordova.a**, then run the wizard to completion. 
+    
 Using CDVViewController in your code
 ------------------------------------