Installing the ChildBrowser for iOS/xcode with PhoneGap/Cordova 1.8.1 and 1.9.0



Accuracy,I am one of people who are new to  PhoneGap/Cordova and I struggled with getting the ChildBrowser up and running. (I am using Cordova 1.8.1 in xcode 4.3.3)

I've figured out that most of my mistakes were based on those old blog posts, so I wanted to write a blog post to share the newest way to Installing the ChildBrowser for iOS/xcode step by step for you guys...



1、Create a new phonegap project



















Create a new phonegap project in xcode and make sure that "WWW" folder had already included.



2、Download the Childbrowser plugin


To download the Childbrowser plugin, visit here.(which I think is the latest version of ChildBrowser.) and I chose the zip option, then drag the "ChildBrowser folder" from the "Downloads folder" to the desktop.


3、Replace "index.html" and...



Delete the "index.html" on your project’s "WWW" folder and drag the "ChildBrowser.js","index.html" from "ChildBrowser folder" to the your project’s "WWW" folder.

Ps:
if you are using Cordova 1.8.1 like me,your should replace

"<script type="text/javascript" charset="utf-8" src="cordova-1.9.0.js"></script>"

with

"<script type="text/javascript" charset="utf-8" src="cordova-1.8.1.js"></script>"

in your index.html


5、Drag the .h, .m, .bundle, and .xib files..


Dragg the .h, .m, .bundle, and .xib files(6files) into "your project/your project’s folder. "

In my case:ChildBrowser/ChildBrowser.

Then open the your project in Xcode and drag the .h, .m, .bundle, and .xib files (6filesinto the your project name folder in Xcode. 

Ps:Make sure to select "Create folader references for any added folders".





6、Open Cordova.plist and add



In Xcode window, opene Cordova.plist and added the ChildBrowserCommand text to the Plugins section as key and value. (You can see a screenshot of this entry in the Cordova.plist.png image they had thoughtfully included in the ChildBrowser folder. See it below.) Also, for External Hosts, I started a new line, with Item 0 as key at left and * as the value at right (just an asterisk) to allow all URLs.

7、Run app on ios simulator



           You are done .

If you have some questions/suggestions or problems,please comment below and hopefully this helps someone.