forked from phonegap/phonegap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathguide_upgrading_ios_index.md.html
547 lines (512 loc) · 33.3 KB
/
guide_upgrading_ios_index.md.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
<!DOCTYPE html>
<!--
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.
--><html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, width=device-width">
<meta name="generator" content="joDoc">
<title>Apache Cordova API Documentation</title>
<link rel="stylesheet" type="text/css" href="index.css">
<link rel="stylesheet" type="text/css" href="mobile.css" media="only screen and (max-device-width: 1024px)">
<link rel="stylesheet" type="text/css" href="prettify/prettify.css">
</head>
<body>
<div id="header">
<h1><a href="index.html">Apache <strong>Cordova</strong> Documentation</a></h1>
<small>
<select><optgroup label="English" value="en">
<option value="edge">edge</option>
<option value="2.0.0rc1">2.0.0rc1</option>
<option selected value="2.0.0">2.0.0</option>
<option value="1.9.0rc1">1.9.0rc1</option>
<option value="1.9.0">1.9.0</option>
<option value="1.8.1">1.8.1</option>
<option value="1.8.0rc1">1.8.0rc1</option>
<option value="1.8.0">1.8.0</option>
<option value="1.7.0rc1">1.7.0rc1</option>
<option value="1.7.0">1.7.0</option>
<option value="1.6.1">1.6.1</option>
<option value="1.6.0rc1">1.6.0rc1</option>
<option value="1.6.0">1.6.0</option>
<option value="1.5.0rc1">1.5.0rc1</option>
<option value="1.5.0">1.5.0</option>
<option value="1.4.1">1.4.1</option>
<option value="1.4.0rc1">1.4.0rc1</option>
<option value="1.4.0">1.4.0</option>
<option value="1.3.0">1.3.0</option>
<option value="1.2.0">1.2.0</option>
<option value="1.1.0">1.1.0</option>
<option value="1.0.0rc3">1.0.0rc3</option>
<option value="1.0.0rc2">1.0.0rc2</option>
<option value="1.0.0rc1">1.0.0rc1</option>
<option value="1.0.0">1.0.0</option>
<option value="0.9.6">0.9.6</option>
<option value="0.9.5.1">0.9.5.1</option>
<option value="0.9.5">0.9.5</option>
<option value="0.9.4">0.9.4</option>
<option value="0.9.3">0.9.3</option>
<option value="0.9.2">0.9.2</option>
</optgroup>
<optgroup label="Español" value="es"><option value="1.0.0">1.0.0</option></optgroup>
<optgroup label="Français" value="fr">
<option value="1.3.0">1.3.0</option>
<option value="1.2.0">1.2.0</option>
<option value="1.1.0">1.1.0</option>
</optgroup>
<optgroup label="Japanese" value="jp">
<option value="1.8.1">1.8.1</option>
<option value="1.7.0">1.7.0</option>
<option value="0.9.5">0.9.5</option>
</optgroup></select></small>
</div>
<div id="subheader">
<h1>Upgrading Cordova iOS</h1>
<small><select><option value="Upgrading%2520Cordova%2520iOS">Upgrading Cordova iOS</option>
<option value="Upgrading%20Cordova%20iOS_upgrading_cordova_1_9_0_projects_to_2_0_0"> - Upgrading Cordova 1.9.0 projects to 2.0.0</option>
<option value="Upgrading%20Cordova%20iOS_upgrading_cordova_1_8_x_projects_to_1_9_0"> - Upgrading Cordova 1.8.x projects to 1.9.0</option>
<option value="Upgrading%20Cordova%20iOS_upgrading_cordova_1_7_0_projects_to_1_8_x"> - Upgrading Cordova 1.7.0 projects to 1.8.x</option>
<option value="Upgrading%20Cordova%20iOS_upgrading_cordova_1_6_x_projects_to_1_7_0"> - Upgrading Cordova 1.6.x projects to 1.7.0</option>
<option value="Upgrading%20Cordova%20iOS_upgrading_cordova_1_5_0_projects_to_1_6_x"> - Upgrading Cordova 1.5.0 projects to 1.6.x</option>
<option value="Upgrading%20Cordova%20iOS_upgrading_cordova_1_4_x_projects_to_1_5_0"> - Upgrading Cordova 1.4.x projects to 1.5.0</option>
<option value="Upgrading%20Cordova%20iOS_upgrading_cordova_1_4_0_projects_to_1_4_1"> - Upgrading Cordova 1.4.0 projects to 1.4.1</option>
<option value="Upgrading%20Cordova%20iOS_upgrading_cordova_1_3_0_projects_to_1_4_0"> - Upgrading Cordova 1.3.0 projects to 1.4.0</option>
<option value="Upgrading%20Cordova%20iOS_upgrading_cordova_1_2_0_projects_to_1_3_0"> - Upgrading Cordova 1.2.0 projects to 1.3.0</option>
<option value="Upgrading%20Cordova%20iOS_upgrading_cordova_1_1_0_projects_to_1_2_0"> - Upgrading Cordova 1.1.0 projects to 1.2.0</option>
<option value="Upgrading%20Cordova%20iOS_upgrading_cordova_1_0_0_projects_to_1_1_0"> - Upgrading Cordova 1.0.0 projects to 1.1.0</option>
<option value="Upgrading%20Cordova%20iOS_upgrading_cordova_0_9_6_projects_to_1_0_0"> - Upgrading Cordova 0.9.6 projects to 1.0.0</option></select></small>
</div>
<div id="sidebar">
<div class="vertical_divider"></div>
<h1>API Reference</h1>
<ul>
<li><a href="cordova_accelerometer_accelerometer.md.html#Accelerometer">Accelerometer</a></li>
<li><a href="cordova_camera_camera.md.html#Camera">Camera</a></li>
<li><a href="cordova_media_capture_capture.md.html#Capture">Capture</a></li>
<li><a href="cordova_compass_compass.md.html#Compass">Compass</a></li>
<li><a href="cordova_connection_connection.md.html#Connection">Connection</a></li>
<li><a href="cordova_contacts_contacts.md.html#Contacts">Contacts</a></li>
<li><a href="cordova_device_device.md.html#Device">Device</a></li>
<li><a href="cordova_events_events.md.html#Events">Events</a></li>
<li><a href="cordova_file_file.md.html#File">File</a></li>
<li><a href="cordova_geolocation_geolocation.md.html#Geolocation">Geolocation</a></li>
<li><a href="cordova_media_media.md.html#Media">Media</a></li>
<li><a href="cordova_notification_notification.md.html#Notification">Notification</a></li>
<li><a href="cordova_storage_storage.md.html#Storage">Storage</a></li>
</ul>
<h1>Guides</h1>
<ul>
<li><a href="guide_getting-started_index.md.html#Getting%20Started%20Guides">Getting Started Guides</a></li>
<li><a href="guide_command-line_index.md.html#Command-Line%20Usage">Command-Line Usage</a></li>
<li><a href="guide_upgrading_index.md.html#Upgrading%20Guides">Upgrading Guides</a></li>
<li><a href="guide_plugin-development_index.md.html#Plugin%20Development%20Guide">Plugin Development Guide</a></li>
<li><a href="guide_whitelist_index.md.html#Domain%20Whitelist%20Guide">Domain Whitelist Guide</a></li>
<li><a href="guide_cordova-webview_index.md.html#Embedding%20WebView">Embedding WebView</a></li>
<li><a href="_index.html">Keyword Index</a></li>
</ul>
</div>
<div id="scrollable">
<div id="content">
<h1><a name="Upgrading%20Cordova%20iOS">Upgrading Cordova iOS</a></h1>
<p>Please note that <strong>Xcode 4 is required</strong>. 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.</p>
<h2>
<a name="Upgrading%20Cordova%20iOS_upgrading_cordova_1_9_0_projects_to_2_0_0">Upgrading Cordova 1.9.0 projects to 2.0.0</a>
</h2>
<ol>
<li>
<strong>Install</strong> Cordova 2.0.0</li>
<li>
<strong>Create a new project</strong> from the command-line tools - you will have to grab the assets from this new project</li>
<li>
<strong>Copy</strong> the <strong>www/cordova-2.0.0.js</strong> file from the new project into your <strong>www</strong> folder, and delete your <strong>www/cordova-1.9.0.js</strong> file</li>
<li>
<strong>Update</strong> the Cordova script reference in your <strong>www/index.html</strong> file (and any other files that contain the script reference) to point to the new <strong>cordova-2.0.0.js</strong> file</li>
<li>Copy the <strong>"cordova"</strong> folder from the new project into your project's root folder (if you want the project command-line tools) </li>
<li>
<strong>Add</strong> a new entry under <strong>Plugins</strong> in your <strong>Cordova.plist</strong> file (under the <strong>Supporting Files</strong> group) - the key is <strong><a href="cordova_device_device.md.html#Device">Device</a></strong> and the value is <strong>CDVDevice</strong>
</li>
<li>Remove <strong>Cordova.framework</strong>
</li>
<li>Remove <strong>verify.sh</strong> from the <strong>Supporting Files</strong> group</li>
<li>Select the <strong>project icon</strong> in the Project Navigator, select your project <strong>Target</strong>, then select the <strong>"Build Settings"</strong> tab</li>
<li>Search for <strong>"Preprocessor Macros"</strong>, then remove all <strong>"CORDOVA_FRAMEWORK=1"</strong> values</li>
<li>Locate the <strong>CordovaLib</strong> folder that was installed in your hard-drive under your home folder's <strong>Documents</strong> sub-folder.</li>
<li>Locate the <strong>CordovaLib.xcodeproj</strong> file in the <strong>CordovaLib</strong> folder, then <strong>drag and drop</strong> the file into your project - it should appear as a <strong>sub-project</strong>.</li>
<li>
<strong>Build</strong> your project, you should get some <strong>errors</strong> relating to <strong>#import</strong> directives</li>
<li>
<p>For the <strong>#import errors</strong>, change any <strong>quote-based</strong> imports in this style:</p>
<pre class="prettyprint"><code>#import "CDV.h"
</code></pre>
<p>to this <strong>brackets-based</strong> style:</p>
<pre class="prettyprint"><code>#import <Cordova/CDV.h>
</code></pre>
<p>and remove any <strong>#ifdef</strong> wrappers around any Cordova imports, they are not needed anymore (the imports are <strong>unified</strong> now) </p>
</li>
<li>
<strong>Build</strong> your project again, and it should not have any <strong>#import</strong> errors.</li>
<li>Select the <strong>project icon</strong> in the Project Navigator, select your project <strong>Target</strong>, then select the <strong>"Build Phases"</strong> tab</li>
<li>Expand the <strong>"Target Dependencies"</strong> phase, then select the <strong>"+"</strong> button</li>
<li>Select the <strong>"CordovaLib"</strong> target, then select the <strong>"Add"</strong> button</li>
<li>Expand the <strong>first</strong> <strong>"Link Binary with Libraries"</strong> phase (it should already contain a bunch of frameworks), then select the <strong>"+"</strong> button</li>
<li>Select the <strong>libCordova.a</strong> static library, then select the <strong>"Add"</strong> button</li>
<li>Delete the <strong>"Run Script"</strong> phase.</li>
<li>Select the <strong>project icon</strong> in the Project Navigator, select your project <strong>Target</strong>, then select the <strong>"Build Settings"</strong> tab</li>
<li>Search for <strong>"Other Linker <a href="cordova_file_file.md.html#Flags">Flags</a>"</strong>, and add the values <strong>-all_load</strong> and <strong>-Obj-C</strong>
</li>
<li>Expand the <strong>"CordovaLib" sub-project</strong>
</li>
<li>Locate the <strong>"VERSION"</strong> file, drag it into your main project (we want to create a link to it, not a copy)</li>
<li>Select the <strong>"Create groups for any added folders"</strong> radiobutton, then select the <strong>"Finish"</strong> button</li>
<li>Select the <strong>"VERSION"</strong> file that you just dragged in a previous step</li>
<li>Press the key combination <strong>Option-Command-1</strong> to show the <strong><a href="cordova_file_file.md.html#File">File</a> Inspector</strong> (or menuitem <strong>View -> Utilities -> Show <a href="cordova_file_file.md.html#File">File</a> Inspector</strong>)</li>
<li>Choose <strong>"Relative to CORDOVALIB"</strong> in the <strong><a href="cordova_file_file.md.html#File">File</a> Inspector</strong> for the drop-down menu for <strong>Location</strong>
</li>
<li>
<strong>Build</strong> your project, it should compile and link with <strong>no issues</strong>.</li>
<li>
<strong>Select your project</strong> from the <strong>Scheme</strong> drop-down, and then select <strong>"iPhone 5.1 Simulator"</strong>
</li>
<li>Select the <strong>Run</strong> button</li>
</ol>
<p><strong>NOTE 1:</strong><br>
If your project is <strong>not working</strong> as expected in the Simulator, please <strong>take a note of any errors</strong> in the <strong>console log in Xcode</strong> for clues.</p>
<p><strong>NOTE 2:</strong><br>
For the <strong>unified #import headers</strong> to work, the build products should <strong>build into the same build directory</strong>. You may need to set the preference <strong>"Xcode Preferences -> Locations -> Derived Data -> Advanced…"</strong> to <strong>"Unique"</strong></p>
<h2>
<a name="Upgrading%20Cordova%20iOS_upgrading_cordova_1_8_x_projects_to_1_9_0">Upgrading Cordova 1.8.x projects to 1.9.0</a>
</h2>
<ol>
<li>
<strong>Install</strong> Cordova 1.9.0</li>
<li>
<strong>Create a new project</strong> - you will have to grab assets from this new project</li>
<li>
<strong>Copy</strong> the <strong>www/cordova-1.9.0.js</strong> file from the new project into your <strong>www</strong> folder, and delete your <strong>www/cordova-1.8.x.js</strong> file</li>
<li>
<strong>Update</strong> the Cordova script reference in your <strong>www/index.html</strong> file (and any other files that contain the script reference) to point to the new <strong>cordova-1.9.0.js</strong> file</li>
</ol>
<p><strong>Note:</strong></p>
<p>1.9.0 supports the new <strong>"BackupWebStorage"</strong> 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 <a class="external" href="https://developer.apple.com/library/prerelease/ios/#releasenotes/General/RN-iOSSDK-6_0/_index.html">Release Notes - Safari and UIKit Section</a></p>
<h2>
<a name="Upgrading%20Cordova%20iOS_upgrading_cordova_1_7_0_projects_to_1_8_x">Upgrading Cordova 1.7.0 projects to 1.8.x</a>
</h2>
<ol>
<li>
<strong>Install</strong> Cordova 1.8.0</li>
<li>
<strong>Create a new project</strong> - you will have to grab assets from this new project</li>
<li>
<strong>Copy</strong> the <strong>www/cordova-1.8.0.js</strong> file from the new project into your <strong>www</strong> folder, and delete your <strong>www/cordova-1.7.x.js</strong> file</li>
<li>
<strong>Update</strong> the Cordova script reference in your <strong>www/index.html</strong> file (and any other files that contain the script reference) to point to the new <strong>cordova-1.8.0.js</strong> file</li>
</ol>
<p>If you intend on using the <strong><a href="cordova_media_capture_capture.md.html#Capture">Capture</a> API</strong>, you will need the new <strong>iPad retina-display</strong> assets:</p>
<ol>
<li>
<strong>Copy</strong> the <strong>Resources/<a href="cordova_media_capture_capture.md.html#Capture">Capture</a>.bundle</strong> item from the new project into your project folder, over-writing your existing <strong>Resources/<a href="cordova_media_capture_capture.md.html#Capture">Capture</a>.bundle</strong> item</li>
<li>In your project, select the <strong><a href="cordova_media_capture_capture.md.html#Capture">Capture</a>.bundle</strong> item into Xcode into your Project Navigator, and press the <strong>Delete</strong> key, then select <strong>Remove Reference</strong> from the dialog that pops up.</li>
<li>Drag the new <strong><a href="cordova_media_capture_capture.md.html#Capture">Capture</a>.bundle</strong> from Step 1. above into Xcode into your Project Navigator, and select the <strong>Create groups for any added folders</strong> radio-button</li>
</ol>
<h2>
<a name="Upgrading%20Cordova%20iOS_upgrading_cordova_1_6_x_projects_to_1_7_0">Upgrading Cordova 1.6.x projects to 1.7.0</a>
</h2>
<ol>
<li>
<strong>Install</strong> Cordova 1.7.0</li>
<li>
<strong>Create a new project</strong> - you will have to grab assets from this new project</li>
<li>
<strong>Copy</strong> the <strong>www/cordova-1.7.0.js</strong> file from the new project into your <strong>www</strong> folder, and delete your <strong>www/cordova-1.6.0.js</strong> file</li>
<li>
<strong>Update</strong> the Cordova script reference in your <strong>www/index.html</strong> file (and any other files that contain the script reference) to point to the new <strong>cordova-1.7.0.js</strong> file</li>
</ol>
<h2>
<a name="Upgrading%20Cordova%20iOS_upgrading_cordova_1_5_0_projects_to_1_6_x">Upgrading Cordova 1.5.0 projects to 1.6.x</a>
</h2>
<ol>
<li>
<strong>Install</strong> Cordova 1.6.1</li>
<li>
<strong>Make a backup</strong> of <strong>AppDelegate.m</strong>, <strong>AppDelegate.h</strong>, <strong>MainViewController.m</strong>, <strong>MainViewController.h</strong>, and <strong>Cordova.plist</strong> in your project</li>
<li>
<strong>Create a new project</strong> - you will have to grab assets from this new project</li>
<li>
<p><strong>Copy</strong> these files from the <strong>new</strong> project into your 1.5.0 based project folder on disk, <strong>replacing</strong> any old files (<strong>backup</strong> your files first from step 2 above):</p>
<pre class="prettyprint"><code>AppDelegate.h
AppDelegate.m
MainViewController.h
MainViewController.m
Cordova.plist
</code></pre>
</li>
<li>
<strong>Add</strong> all the new <strong>MainViewController</strong> and <strong>AppDelegate</strong> files into your Xcode project</li>
<li>
<strong>Copy</strong> the <strong>www/cordova-1.6.1.js</strong> file from the new project into your <strong>www</strong> folder, and delete your <strong>www/cordova-1.5.0.js</strong> file</li>
<li>
<strong>Update</strong> the Cordova script reference in your <strong>www/index.html</strong> file (and any other files that contain the script reference) to point to the new <strong>cordova-1.6.1.js</strong> file</li>
<li>
<strong>Add</strong> the new <strong>Cordova.plist</strong> 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). </li>
<li>
<strong>Integrate</strong> any settings, <strong>Plugins</strong> and <strong>ExternalHosts</strong> entries that you had in your <strong>backed-up Cordova.plist</strong> into the new <strong>Cordova.plist</strong>
</li>
<li>
<strong>Integrate</strong> any project specific code that you have in your <strong>backed-up AppDelegate.h and AppDelegate.m</strong> into the new AppDelegate files. Any <strong>UIWebViewDelegate</strong> or <strong>CDVCommandDelegate</strong> code in <strong>AppDelegate.m</strong> will need to go into MainViewController.m now (see commented out sections in that file)</li>
<li>
<strong>Integrate</strong> any project specific code that you have in your <strong>backed-up MainViewController.h and MainViewController.m</strong> into the new MainViewController files</li>
<li>Click on the <strong>project icon</strong> in the Project Navigator, select your <strong>Project</strong>, then select the <strong>"Build Settings"</strong> tab</li>
<li>Enter <strong>"Compiler for C/C++/Objective-C"</strong> in the search field</li>
<li>Select the <strong>"Apple LLVM Compiler 3.1"</strong> value</li>
</ol>
<h2>
<a name="Upgrading%20Cordova%20iOS_upgrading_cordova_1_4_x_projects_to_1_5_0">Upgrading Cordova 1.4.x projects to 1.5.0</a>
</h2>
<ol>
<li>
<strong>Install</strong> Cordova 1.5.0</li>
<li>
<strong>Create a new project</strong> and run it once - you will have to grab assets from this new project</li>
<li>
<strong>Copy</strong> the <strong>www/cordova-1.5.0.js</strong> file from the new project into your <strong>www</strong> folder, and delete your <strong>www/phonegap-1.4.x.js</strong> file</li>
<li>
<strong>Update</strong> the Cordova script reference in your <strong>www/index.html</strong> file (and any other files that contain the script reference) to point to the new Cordova <strong>cordova-1.5.0.js</strong> file</li>
<li>Find <strong>"PhoneGap.framework"</strong> in your Project Navigator, select it</li>
<li>Press the <strong>Delete</strong> key and delete the <strong>"PhoneGap.framework"</strong> reference in the Project Navigator</li>
<li>Press the key combination <strong>Option-Command-A</strong>, which should drop down a sheet to add files to your project (the <strong>"Add Files..." sheet</strong>). Make sure the <strong>"Created groups for any added folders"</strong> radio-button is selected</li>
<li>Press the key combination <strong>Shift-Command-G</strong>, which should drop down another sheet for you to go to a folder (the <strong>"Go to the folder:" sheet</strong>)</li>
<li>Enter <strong>"/Users/Shared/Cordova/Frameworks/Cordova.framework"</strong> in the <strong>"Go to the folder:" sheet</strong> and then press the <strong>"Go"</strong> button</li>
<li>Press the <strong>"Add"</strong> button in the <strong>"Add Files..." sheet</strong>
</li>
<li>
<strong>Select "Cordova.framework"</strong> in the Project Navigator</li>
<li>Press the key combination <strong>Option-Command-1</strong> to show the <strong><a href="cordova_file_file.md.html#File">File</a> Inspector</strong>
</li>
<li>Choose <strong>"Absolute Path"</strong> in the <strong><a href="cordova_file_file.md.html#File">File</a> Inspector</strong> for the drop-down menu for <strong>Location</strong>
</li>
<li>Press the key combination <strong>Option-Command-A</strong>, which should drop down a sheet to add files to your project (the <strong>"Add Files..." sheet</strong>). Make sure the <strong>"Created groups for any added folders"</strong> radio-button is selected</li>
<li>Press the key combination <strong>Shift-Command-G</strong>, which should drop down another sheet for you to go to a folder (the <strong>"Go to the folder:" sheet</strong>)</li>
<li>Enter <strong>"~/Documents/CordovaLib/Classes/deprecated"</strong> in the <strong>"Go to the folder:" sheet</strong> and then press the <strong>"Go"</strong> button</li>
<li>Press the <strong>"Add"</strong> button in the <strong>"Add Files..." sheet</strong>
</li>
<li>
<p>In your <strong>AppDelegate.h, AppDelegate.m, and MainViewController.h</strong> files - replace the whole <strong>#ifdef PHONEGAP_FRAMEWORK</strong> block with:</p>
<pre class="prettyprint"><code>#import "CDVDeprecated.h"
</code></pre>
</li>
<li>Click on the <strong>project icon</strong> in the Project Navigator, select your <strong>Target</strong>, then select the <strong>"Build Settings"</strong> tab</li>
<li>Search for <strong>"Framework Search Paths"</strong>
</li>
<li>Replace the existing value with <strong>"/Users/Shared/Cordova/Frameworks"</strong> </li>
<li>Search for <strong>"Preprocessor Macros"</strong>
</li>
<li>For the first (combined) value, replace the value with <strong>"CORDOVA_FRAMEWORK=YES"</strong>
</li>
<li>Select the <strong>"Build Phases"</strong> tab</li>
<li>Expand <strong>"Run Script"</strong>
</li>
<li>Replace any occurrences of <strong>PhoneGap</strong> with <strong>Cordova</strong>
</li>
<li>Find your <strong>"PhoneGap.plist"</strong> file in the Project Navigator, and click on the filename once to enter name edit mode</li>
<li>Rename <strong>"PhoneGap.plist"</strong> to <strong>"Cordova.plist"</strong>
</li>
<li>Right-click on <strong>"Cordova.plist"</strong> and choose <strong>"Open As" --> "Source Code"</strong>
</li>
<li>Press <strong>Option-Command-F</strong>, choose <strong>"Replace"</strong> from the drop-down on the top left of the Source window</li>
<li>Enter <strong>com.phonegap</strong> for the Find string, and <strong>org.apache.cordova</strong> for the Replace string - then press the <strong>"Replace All"</strong> button</li>
<li>Enter <strong>PG</strong> for the Find string, and <strong>CDV</strong> for the Replace string - then press the <strong>"Replace All"</strong> button</li>
<li>Press <strong>Command-B</strong> to build, you will still have deprecations that you can get rid of in the future (see <strong>CDVDeprecated.h</strong> - replace classes in your code that use PG* to CDV*, for example)</li>
</ol>
<h2>
<a name="Upgrading%20Cordova%20iOS_upgrading_cordova_1_4_0_projects_to_1_4_1">Upgrading Cordova 1.4.0 projects to 1.4.1</a>
</h2>
<ol>
<li>
<strong>Install</strong> Cordova 1.4.1</li>
<li>
<strong>Make a backup</strong> of <strong>MainViewController.m</strong>
</li>
<li>
<strong>Create a new project</strong> - you will have to grab assets from this new project</li>
<li>
<strong>Copy</strong> the <strong>MainViewController.m</strong> file from the <strong>new</strong> project into your 1.4.0 based project folder on disk, <strong>replacing</strong> the old file (<strong>backup</strong> your files first from step 2 above).</li>
<li>
<strong>Add</strong> the <strong>MainViewController.m</strong> file into your Xcode project</li>
<li>
<strong>Integrate</strong> any project specific code that you have in your <strong>backed-up MainViewController.m</strong> into the new file</li>
<li>Updating the phonegap-X.X.X.js file is optional, nothing has changed in the JavaScript between 1.4.0 and 1.4.1</li>
</ol>
<h2>
<a name="Upgrading%20Cordova%20iOS_upgrading_cordova_1_3_0_projects_to_1_4_0">Upgrading Cordova 1.3.0 projects to 1.4.0</a>
</h2>
<ol>
<li>
<strong>Install</strong> Cordova 1.4.0</li>
<li>
<strong>Make a backup</strong> of <strong>AppDelegate.m</strong> and <strong>AppDelegate.h</strong> in your project</li>
<li>
<strong>Create a new project</strong> - you will have to grab assets from this new project</li>
<li>
<p><strong>Copy</strong> these files from the <strong>new</strong> project into your 1.3.0 based project folder on disk, <strong>replacing</strong> any old files (<strong>backup</strong> your files first from step 2 above):</p>
<pre class="prettyprint"><code>AppDelegate.h
AppDelegate.m
MainViewController.h
MainViewController.m
MainViewController.xib
</code></pre>
</li>
<li>
<strong>Add</strong> all the <strong>MainViewController</strong> files into your Xcode project</li>
<li>
<strong>Copy</strong> the <strong>www/phonegap-1.4.0.js</strong> file from the new project into your <strong>www</strong> folder, and delete your <strong>www/phonegap-1.3.0.js</strong> file</li>
<li>
<strong>Update</strong> the Cordova script reference in your <strong>www/index.html</strong> file (and any other files that contain the script reference) to point to the new <strong>phonegap-1.4.0.js</strong> file</li>
<li>
<strong>Add</strong> a new entry under <strong>Plugins</strong> in your <strong>PhoneGap.plist</strong> file - key is <strong>com.phonegap.battery</strong> and the value is <strong>PGBattery</strong>
</li>
<li>
<strong>Integrate</strong> any project specific code that you have in your <strong>backed-up AppDelegate.h and AppDelegate.m</strong> into the new AppDelegate files</li>
</ol>
<h2>
<a name="Upgrading%20Cordova%20iOS_upgrading_cordova_1_2_0_projects_to_1_3_0">Upgrading Cordova 1.2.0 projects to 1.3.0</a>
</h2>
<ol>
<li>
<strong>Install</strong> Cordova 1.3.0</li>
<li>
<strong>Make a backup</strong> of <strong>AppDelegate.m</strong> and <strong>AppDelegate.h</strong> in your project</li>
<li>
<strong>Create a new project</strong> - you will have to grab assets from this new project</li>
<li>
<p><strong>Copy</strong> these files from the <strong>new</strong> project into your 1.2.0 based project folder on disk, <strong>replacing</strong> any old files (<strong>backup</strong> your files first from step 2 above):</p>
<pre class="prettyprint"><code>AppDelegate.h
AppDelegate.m
MainViewController.h
MainViewController.m
MainViewController.xib
</code></pre>
</li>
<li>
<strong>Add</strong> all the <strong>MainViewController</strong> files into your Xcode project</li>
<li>
<strong>Copy</strong> the <strong>www/phonegap-1.3.0.js</strong> file from the new project into your <strong>www</strong> folder, and delete your <strong>www/phonegap-1.2.0.js</strong> file</li>
<li>
<strong>Update</strong> the Cordova script reference in your <strong>www/index.html</strong> file (and any other files that contain the script reference) to point to the new <strong>phonegap-1.3.0.js</strong> file</li>
<li>
<strong>Add</strong> a new entry under <strong>Plugins</strong> in your <strong>PhoneGap.plist</strong> file - key is <strong>com.phonegap.battery</strong> and the value is <strong>PGBattery</strong>
</li>
<li>
<strong>Integrate</strong> any project specific code that you have in your <strong>backed-up AppDelegate.h and AppDelegate.m</strong> into the new AppDelegate files</li>
</ol>
<h2>
<a name="Upgrading%20Cordova%20iOS_upgrading_cordova_1_1_0_projects_to_1_2_0">Upgrading Cordova 1.1.0 projects to 1.2.0</a>
</h2>
<ol>
<li>
<strong>Install</strong> Cordova 1.2.0</li>
<li>
<strong>Make a backup</strong> of <strong>AppDelegate.m</strong> and <strong>AppDelegate.h</strong> in your project</li>
<li>
<strong>Create a new project</strong> - you will have to grab assets from this new project</li>
<li>
<p><strong>Copy</strong> these files from the <strong>new</strong> project into your 1.1.0 based project folder on disk, <strong>replacing</strong> any old files (<strong>backup</strong> your files first from step 2 above):</p>
<pre class="prettyprint"><code>AppDelegate.h
AppDelegate.m
MainViewController.h
MainViewController.m
MainViewController.xib
</code></pre>
</li>
<li>
<strong>Add</strong> all the <strong>MainViewController</strong> files into your Xcode project</li>
<li>
<strong>Copy</strong> the <strong>www/phonegap-1.2.0.js</strong> file from the new project into your <strong>www</strong> folder, and delete your <strong>www/phonegap-1.1.0.js</strong> file</li>
<li>
<strong>Update</strong> the Cordova script reference in your <strong>www/index.html</strong> file (and any other files that contain the script reference) to point to the new <strong>phonegap-1.2.0.js</strong> file</li>
<li>
<strong>Add</strong> a new entry under <strong>Plugins</strong> in your <strong>PhoneGap.plist</strong> file - key is <strong>com.phonegap.battery</strong> and the value is <strong>PGBattery</strong>
</li>
<li>
<strong>Integrate</strong> any project specific code that you have in your <strong>backed-up AppDelegate.h and AppDelegate.m</strong> into the new AppDelegate files</li>
</ol>
<h2>
<a name="Upgrading%20Cordova%20iOS_upgrading_cordova_1_0_0_projects_to_1_1_0">Upgrading Cordova 1.0.0 projects to 1.1.0</a>
</h2>
<ol>
<li>
<strong>Install</strong> Cordova 1.1.0</li>
<li>
<strong>Make a backup</strong> of <strong>AppDelegate.m</strong> and <strong>AppDelegate.h</strong> in your project</li>
<li>
<strong>Create a new project</strong> - you will have to grab assets from this new project</li>
<li>
<p><strong>Copy</strong> these files from the <strong>new</strong> project into your 1.0.0 based project folder on disk, <strong>replacing</strong> any old files (<strong>backup</strong> your files first from step 2 above):</p>
<pre class="prettyprint"><code>AppDelegate.h
AppDelegate.m
MainViewController.h
MainViewController.m
MainViewController.xib
</code></pre>
</li>
<li>
<strong>Add</strong> all the <strong>MainViewController</strong> files into your Xcode project</li>
<li>
<strong>Copy</strong> the <strong>www/phonegap-1.1.0.js</strong> file from the new project into your <strong>www</strong> folder, and delete your <strong>www/phonegap-1.0.0.js</strong> file</li>
<li>
<strong>Update</strong> the Cordova script reference in your <strong>www/index.html</strong> file (and any other files that contain the script reference) to point to the new <strong>phonegap-1.1.0.js</strong> file</li>
<li>
<strong>Add</strong> a new entry under <strong>Plugins</strong> in your <strong>PhoneGap.plist</strong> file - key is <strong>com.phonegap.battery</strong> and the value is <strong>PGBattery</strong>
</li>
<li>
<strong>Integrate</strong> any project specific code that you have in your <strong>backed-up AppDelegate.h and AppDelegate.m</strong> into the new AppDelegate files</li>
</ol>
<h2>
<a name="Upgrading%20Cordova%20iOS_upgrading_cordova_0_9_6_projects_to_1_0_0">Upgrading Cordova 0.9.6 projects to 1.0.0</a>
</h2>
<ol>
<li>
<strong>Install</strong> Cordova 1.0.0</li>
<li>
<strong>Make a backup</strong> of <strong>AppDelegate.m</strong> and <strong>AppDelegate.h</strong> in your project</li>
<li>
<strong>Create a new project</strong> - you will have to grab assets from this new project</li>
<li>
<p><strong>Copy</strong> these files from the <strong>new</strong> project into your 0.9.6 based project folder on disk, <strong>replacing</strong> any old files (<strong>backup</strong> your files first from step 2 above):</p>
<pre class="prettyprint"><code>AppDelegate.h
AppDelegate.m
MainViewController.h
MainViewController.m
MainViewController.xib
</code></pre>
</li>
<li>
<strong>Add</strong> all the <strong>MainViewController</strong> files into your Xcode project</li>
<li>
<strong>Copy</strong> the <strong>www/phonegap-1.0.0.js</strong> file from the new project into your <strong>www</strong> folder, and delete your <strong>www/phonegap-0.9.6.js</strong> file</li>
<li>
<strong>Update</strong> the Cordova script reference in your <strong>www/index.html</strong> file (and any other files that contain the script reference) to point to the new <strong>phonegap-1.0.0.js</strong> file</li>
<li>
<strong>Add</strong> a new entry under <strong>Plugins</strong> in your <strong>PhoneGap.plist</strong> file - key is <strong>com.phonegap.battery</strong> and the value is <strong>PGBattery</strong>
</li>
<li>
<strong>Integrate</strong> any project specific code that you have in your <strong>backed-up AppDelegate.h and AppDelegate.m</strong> into the new AppDelegate files</li>
</ol>
</div>
</div>
<!-- Functionality and Syntax Highlighting -->
<script type="text/javascript" src="index.js"></script><script type="text/javascript" src="prettify/prettify.js"></script>
</body>
</html>