TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | Apache 2 |
ReleasedLast Release | Nov 2015 |
Maintained by Holly Schinsky.
The required resources and instructions for embedding a PhoneGap webview into an iOS Native Project quickly.
Add the following to your native iOS project Podfile to get this dependency from the CocoaPods registry:
pod 'ios-webview-www'
Install the pods referenced in the Podfile from the command line using the CocoaPods pod
command:
pod install
Close your native Xcode project and open the newly created .xcworkspace
project in the same folder which now includes
all of the Cordova dependency pods.
You're ready to use any of the Cordova dependencies, for example the CDVViewController
. See below for further details.
NOTE: This project assumes you have previously installed CocoaPods
Podfile
in the root of your project from the command line
pod init
to create a base Podfiletarget
specification lines (see demo video)pod install
from command line to install the Cordova dependencies.xcworkspace
file created from the pod install
.
ViewController
to a CDVViewController
in the Identity InspectorBuild/run the app in Xcode. You should see the custom iOS template version of the PhoneGap Hello world sample running with the Device Ready event firing and some messages indicating the use of some of the dependent plugins to ensure they've been properly referenced.
NOTE: The index.js code in the template project includes references to the device and network information plugins to quickly test plugin setup.
target
name to your native project target name in the Podfile and ensure Podfile is in the root directory of your Xcode projectpod install
again, you must close the Workspace project in Xcode and open the newly generated one.