license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Please note that Xcode 4 is required. To submit to the Apple App Store, you must use the latest shipped version of the iOS SDK, which is iOS 5.1. The iOS 5.1 SDK requires Xcode 4.
Note:
1.9.0 supports the new “BackupWebStorage” boolean setting in Cordova.plist. By default, this setting is turned on, set it to “false” to turn it off - especially for iOS 6 - see Release Notes - Safari and UIKit Section
If you intend on using the Capture API, you will need the new iPad retina-display assets:
Install Cordova 1.6.1
Make a backup of AppDelegate.m, AppDelegate.h, MainViewController.m, MainViewController.h, and Cordova.plist in your project
Create a new project - you will have to grab assets from this new project
Copy these files from the new project into your 1.5.0 based project folder on disk, replacing any old files (backup your files first from step 2 above):
AppDelegate.h AppDelegate.m MainViewController.h MainViewController.m Cordova.plist
Add all the new MainViewController and AppDelegate files into your Xcode project
Copy the www/cordova-1.6.1.js file from the new project into your www folder, and delete your www/cordova-1.5.0.js file
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-1.6.1.js file
Add the new Cordova.plist file into your project - this is because the core plugin service names needed to be changed to match the ones from Android and Blackberry, for a unified Cordova JavaScript file (cordova-js).
Integrate any settings, Plugins and ExternalHosts entries that you had in your backed-up Cordova.plist into the new Cordova.plist
Integrate any project specific code that you have in your backed-up AppDelegate.h and AppDelegate.m into the new AppDelegate files. Any UIWebViewDelegate or CDVCommandDelegate code in AppDelegate.m will need to go into MainViewController.m now (see commented out sections in that file)
Integrate any project specific code that you have in your backed-up MainViewController.h and MainViewController.m into the new MainViewController files
Click on the project icon in the Project Navigator, select your Project, then select the “Build Settings” tab
Enter “Compiler for C/C++/Objective-C” in the search field
Select the “Apple LLVM Compiler 3.1” value
Install Cordova 1.5.0
Create a new project and run it once - you will have to grab assets from this new project
Copy the www/cordova-1.5.0.js file from the new project into your www folder, and delete your www/phonegap-1.4.x.js file
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 cordova-1.5.0.js file
Find “PhoneGap.framework” in your Project Navigator, select it
Press the Delete key and delete the “PhoneGap.framework” reference in the Project Navigator
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
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)
Enter “/Users/Shared/Cordova/Frameworks/Cordova.framework” in the “Go to the folder:” sheet and then press the “Go” button
Press the “Add” button in the “Add Files...” sheet
Select “Cordova.framework” in the Project Navigator
Press the key combination Option-Command-1 to show the File Inspector
Choose “Absolute Path” in the File Inspector for the drop-down menu for Location
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
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)
Enter “~/Documents/CordovaLib/Classes/deprecated” in the “Go to the folder:” sheet and then press the “Go” button
Press the “Add” button in the “Add Files...” sheet
In your AppDelegate.h, AppDelegate.m, and MainViewController.h files - replace the whole #ifdef PHONEGAP_FRAMEWORK block with:
#import "CDVDeprecated.h"
Click on the project icon in the Project Navigator, select your Target, then select the “Build Settings” tab
Search for “Framework Search Paths”
Replace the existing value with “/Users/Shared/Cordova/Frameworks”
Search for “Preprocessor Macros”
For the first (combined) value, replace the value with “CORDOVA_FRAMEWORK=YES”
Select the “Build Phases” tab
Expand “Run Script”
Replace any occurrences of PhoneGap with Cordova
Find your “PhoneGap.plist” file in the Project Navigator, and click on the filename once to enter name edit mode
Rename “PhoneGap.plist” to “Cordova.plist”
Right-click on “Cordova.plist” and choose “Open As” --> “Source Code”
Press Option-Command-F, choose “Replace” from the drop-down on the top left of the Source window
Enter com.phonegap for the Find string, and org.apache.cordova for the Replace string - then press the “Replace All” button
Enter PG for the Find string, and CDV for the Replace string - then press the “Replace All” button
Press Command-B to build, you will still have deprecations that you can get rid of in the future (see CDVDeprecated.h - replace classes in your code that use PG* to CDV*, for example)
Install Cordova 1.4.0
Make a backup of AppDelegate.m and AppDelegate.h in your project
Create a new project - you will have to grab assets from this new project
Copy these files from the new project into your 1.3.0 based project folder on disk, replacing any old files (backup your files first from step 2 above):
AppDelegate.h AppDelegate.m MainViewController.h MainViewController.m MainViewController.xib
Add all the MainViewController files into your Xcode project
Copy the www/phonegap-1.4.0.js file from the new project into your www folder, and delete your www/phonegap-1.3.0.js file
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 phonegap-1.4.0.js file
Add a new entry under Plugins in your PhoneGap.plist file - key is com.phonegap.battery and the value is PGBattery
Integrate any project specific code that you have in your backed-up AppDelegate.h and AppDelegate.m into the new AppDelegate files
Install Cordova 1.3.0
Make a backup of AppDelegate.m and AppDelegate.h in your project
Create a new project - you will have to grab assets from this new project
Copy these files from the new project into your 1.2.0 based project folder on disk, replacing any old files (backup your files first from step 2 above):
AppDelegate.h AppDelegate.m MainViewController.h MainViewController.m MainViewController.xib
Add all the MainViewController files into your Xcode project
Copy the www/phonegap-1.3.0.js file from the new project into your www folder, and delete your www/phonegap-1.2.0.js file
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 phonegap-1.3.0.js file
Add a new entry under Plugins in your PhoneGap.plist file - key is com.phonegap.battery and the value is PGBattery
Integrate any project specific code that you have in your backed-up AppDelegate.h and AppDelegate.m into the new AppDelegate files
Install Cordova 1.2.0
Make a backup of AppDelegate.m and AppDelegate.h in your project
Create a new project - you will have to grab assets from this new project
Copy these files from the new project into your 1.1.0 based project folder on disk, replacing any old files (backup your files first from step 2 above):
AppDelegate.h AppDelegate.m MainViewController.h MainViewController.m MainViewController.xib
Add all the MainViewController files into your Xcode project
Copy the www/phonegap-1.2.0.js file from the new project into your www folder, and delete your www/phonegap-1.1.0.js file
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 phonegap-1.2.0.js file
Add a new entry under Plugins in your PhoneGap.plist file - key is com.phonegap.battery and the value is PGBattery
Integrate any project specific code that you have in your backed-up AppDelegate.h and AppDelegate.m into the new AppDelegate files
Install Cordova 1.1.0
Make a backup of AppDelegate.m and AppDelegate.h in your project
Create a new project - you will have to grab assets from this new project
Copy these files from the new project into your 1.0.0 based project folder on disk, replacing any old files (backup your files first from step 2 above):
AppDelegate.h AppDelegate.m MainViewController.h MainViewController.m MainViewController.xib
Add all the MainViewController files into your Xcode project
Copy the www/phonegap-1.1.0.js file from the new project into your www folder, and delete your www/phonegap-1.0.0.js file
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 phonegap-1.1.0.js file
Add a new entry under Plugins in your PhoneGap.plist file - key is com.phonegap.battery and the value is PGBattery
Integrate any project specific code that you have in your backed-up AppDelegate.h and AppDelegate.m into the new AppDelegate files
Install Cordova 1.0.0
Make a backup of AppDelegate.m and AppDelegate.h in your project
Create a new project - you will have to grab assets from this new project
Copy these files from the new project into your 0.9.6 based project folder on disk, replacing any old files (backup your files first from step 2 above):
AppDelegate.h AppDelegate.m MainViewController.h MainViewController.m MainViewController.xib
Add all the MainViewController files into your Xcode project
Copy the www/phonegap-1.0.0.js file from the new project into your www folder, and delete your www/phonegap-0.9.6.js file
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 phonegap-1.0.0.js file
Add a new entry under Plugins in your PhoneGap.plist file - key is com.phonegap.battery and the value is PGBattery
Integrate any project specific code that you have in your backed-up AppDelegate.h and AppDelegate.m into the new AppDelegate files