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/02/17 02:38:50 UTC

[27/27] Rename PhoneGap to Cordova.

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/bcff9559/PhoneGapLib/javascripts/core/sms.js
----------------------------------------------------------------------
diff --git a/PhoneGapLib/javascripts/core/sms.js b/PhoneGapLib/javascripts/core/sms.js
deleted file mode 100644
index 5a69933..0000000
--- a/PhoneGapLib/javascripts/core/sms.js
+++ /dev/null
@@ -1,27 +0,0 @@
-if (!PhoneGap.hasResource("sms")) {
-	PhoneGap.addResource("sms");
-
-/**
- * This class provides access to the device SMS functionality.
- * @constructor
- */
-Sms = function() {
-
-}
-
-/**
- * Sends an SMS message.
- * @param {Integer} number The phone number to send the message to.
- * @param {String} message The contents of the SMS message to send.
- * @param {Function} successCallback The function to call when the SMS message is sent.
- * @param {Function} errorCallback The function to call when there is an error sending the SMS message.
- * @param {PositionOptions} options The options for accessing the GPS location such as timeout and accuracy.
- */
-Sms.prototype.send = function(number, message, successCallback, errorCallback, options) {
-	// not sure why this is here when it does nothing????
-};
-
-PhoneGap.addConstructor(function() {
-    if (typeof navigator.sms == "undefined") navigator.sms = new Sms();
-});
-};

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/bcff9559/PhoneGapLib/javascripts/core/splashscreen.js
----------------------------------------------------------------------
diff --git a/PhoneGapLib/javascripts/core/splashscreen.js b/PhoneGapLib/javascripts/core/splashscreen.js
deleted file mode 100644
index 8e4733c..0000000
--- a/PhoneGapLib/javascripts/core/splashscreen.js
+++ /dev/null
@@ -1,22 +0,0 @@
-if (!PhoneGap.hasResource("splashscreen")) {
-	PhoneGap.addResource("splashscreen");
-
-/**
- * This class provides access to the splashscreen
- */
-SplashScreen = function() {
-};
-
-SplashScreen.prototype.show = function() {
-    PhoneGap.exec(null, null, "com.phonegap.splashscreen", "show", []);
-};
-
-SplashScreen.prototype.hide = function() {
-    PhoneGap.exec(null, null, "com.phonegap.splashscreen", "hide", []);
-};
-
-PhoneGap.addConstructor(function() {
-    if (typeof navigator.splashscreen == "undefined") navigator.splashscreen = new SplashScreen();
-});
-
-};

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/bcff9559/PhoneGapLib/javascripts/core/telephony.js
----------------------------------------------------------------------
diff --git a/PhoneGapLib/javascripts/core/telephony.js b/PhoneGapLib/javascripts/core/telephony.js
deleted file mode 100644
index d581e44..0000000
--- a/PhoneGapLib/javascripts/core/telephony.js
+++ /dev/null
@@ -1,23 +0,0 @@
-if (!PhoneGap.hasResource("telephony")) {
-	PhoneGap.addResource("telephony");
-
-/**
- * This class provides access to the telephony features of the device.
- * @constructor
- */
-Telephony = function() {
-	
-}
-
-/**
- * Calls the specifed number.
- * @param {Integer} number The number to be called.
- */
-Telephony.prototype.call = function(number) {
-	// not sure why this is here when it does nothing????
-};
-
-PhoneGap.addConstructor(function() {
-    if (typeof navigator.telephony == "undefined") navigator.telephony = new Telephony();
-});
-};
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/bcff9559/PhoneGapLib/javascripts/plugins/README.md
----------------------------------------------------------------------
diff --git a/PhoneGapLib/javascripts/plugins/README.md b/PhoneGapLib/javascripts/plugins/README.md
deleted file mode 100644
index 3fe82db..0000000
--- a/PhoneGapLib/javascripts/plugins/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-Phonegap Javascript Plugins
-=============================================================
-This is where you would put your Javascript plugin code. TBD
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/bcff9559/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 6ef10a8..f99c4ad 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
-PhoneGap iOS
+Cordova iOS
 =============================================================
-PhoneGapLib is a static library that enables users to include PhoneGap in their iOS application projects easily, and also create new PhoneGap based iOS application projects through a Xcode project template.
+CordovaLib is a static library that enables users to include Cordova in their iOS application projects easily, and also create new Cordova based iOS application projects through a Xcode project template.
 <br />
 
 Pre-requisites
@@ -18,28 +18,28 @@ You don't need to do this if you downloaded the installer from [phonegap.com](ht
 
 <br />
 
-The installer should build "PhoneGapInstaller.dmg" into the **dist** folder, mount the .dmg, then:
+The installer should build "CordovaInstaller.dmg" into the **dist** folder, mount the .dmg, then:
 
 1. Quit Xcode
-2. Launch "PhoneGapInstaller.pkg" from the mounted .dmg, to install PhoneGapLib, the PhoneGap framework and the PhoneGap Xcode Templates.
+2. Launch "CordovaInstaller.pkg" from the mounted .dmg, to install CordovaLib, the Cordova framework and the Cordova Xcode Templates.
 
 <br />
 
-Create a PhoneGap project (Xcode 3)
+Create a Cordova project (Xcode 3)
 -------------------------------------------------------------
 
 1. Launch Xcode, then under the File menu, select "New Project...".
-2. Navigate to the "User Templates" section, select PhoneGap, then in the right pane, select "PhoneGap-based Application"
+2. Navigate to the "User Templates" section, select Cordova, then in the right pane, select "Cordova-based Application"
 3. Select the "Choose..." button, name your project and choose the location where you want the new project to be.
 4. Modify the contents of the "www" directory to add your HTML, CSS and Javascript.
 
 <br />
 
-Create a PhoneGap project (Xcode 4)
+Create a Cordova project (Xcode 4)
 -------------------------------------------------------------
 
 1. Launch Xcode, then under the File menu, select "New Project...".
-2. Navigate to the "iOS" section, under "Applications" - then in the right pane, select "PhoneGap-based Application"
+2. Navigate to the "iOS" section, under "Applications" - then in the right pane, select "Cordova-based Application"
 3. Select the "Next" button, name your project and company idenfifier, then select the "Next" button again.
 4. Choose the location where you want the new project to be.
 5. Run the project at least once to create the "www" folder in your project folder.
@@ -48,10 +48,10 @@ Create a PhoneGap project (Xcode 4)
 
 <br />
 
-Uninstalling PhoneGapLib, PhoneGap.framework and the Xcode Templates
+Uninstalling CordovaLib, Cordova.framework and the Xcode Templates
 --------------------------------------------------------------------
 
-Use the "Uninstall PhoneGap" app included in the PhoneGap iOS DMG file, OR:
+Use the "Uninstall Cordova" app included in the Cordova iOS DMG file, OR:
 
 1. Launch "Terminal.app"
 2. Navigate to the folder where Makefile is (this folder)
@@ -61,13 +61,13 @@ Use the "Uninstall PhoneGap" app included in the PhoneGap iOS DMG file, OR:
 
 **NOTE:** 
 
-It will ask you to confirm whether you want to delete the installed PhoneGapLib directory (just in case you made changes there) as well as the PhoneGap framework. It will not ask for confirmation in deleting the installed Xcode templates.
+It will ask you to confirm whether you want to delete the installed CordovaLib directory (just in case you made changes there) as well as the Cordova framework. It will not ask for confirmation in deleting the installed Xcode templates.
 
 Unit Tests
 --------------------------------------------------------------------
-1. **Create** a new PhoneGap-based Application project
+1. **Create** a new Cordova-based Application project
 2. **Download** the code from the **[mobile-spec](https://github.com/apache/incubator-cordova-mobile-spec)** and put all of it in the root of your **www** folder
-3. **Modify phonegap.js** to point to your correct phonegap-X.X.X.js version
+3. **Modify cordova.js** to point to your correct cordova-X.X.X.js version
 4. **Run** the project
 
 Installer Notes
@@ -77,17 +77,17 @@ This installer will only install items under your home folder (signified by ~)
 Items that will be installed:
 
 1. Xcode global var in _~/Library/Preferences/com.apple.Xcode.plist _ (which will be listed under Xcode Preferences -> Source Trees)
-2. PhoneGapLib Xcode static library project under _~/Documents/PhoneGapLib_
-3. Xcode project template in _~/Library/Application Support/Developer/Shared/Xcode/Project Templates/PhoneGap_
+2. CordovaLib Xcode static library project under _~/Documents/CordovaLib_
+3. Xcode project template in _~/Library/Application Support/Developer/Shared/Xcode/Project Templates/Cordova_
 4. Xcode 4 project template in _~/Library/Developer/Xcode/Templates/Project Templates/Application_
-5. PhoneGap Xcode static framework under _/Users/Shared/PhoneGap/Frameworks/PhoneGap.framework_ (may change in future updates)
+5. Cordova Xcode static framework under _/Users/Shared/Cordova/Frameworks/Cordova.framework_ (may change in future updates)
 6. Symlink to the framework in (5) under _~/Library/Frameworks_
 
 <br />
 
 To uninstall:
 
-Delete the files listed above, or use the "Uninstall PhoneGap" app included in the PhoneGap iOS DMG file.
+Delete the files listed above, or use the "Uninstall Cordova" app included in the Cordova iOS DMG file.
 
 FAQ
 ---
@@ -106,7 +106,7 @@ Check your Xcode Run Log for clues.
 
 This can be because of:
 
-1. You did not add the plugin mapping in __PhoneGap.plist/Plugins__ (contact the plugin creator for the proper mapping). The __key__ is the service name used in the JavaScript interface and the __value__ is the classname used in the Objective-C interface. Often the key and value are the same.
+1. You did not add the plugin mapping in __Cordova.plist/Plugins__ (contact the plugin creator for the proper mapping). The __key__ is the service name used in the JavaScript interface and the __value__ is the classname used in the Objective-C interface. Often the key and value are the same.
 2. You did _not_ add the plugin code as a "group" (__yellow__ folder) but added it as a "folder reference" (blue folder) 
 3. You are having #import problems - see [this article](http://wiki.phonegap.com/PhoneGap%20iOS%20Plugins%20Problems). 
 
@@ -116,7 +116,7 @@ This can be because of:
 
 This error occurs because of the new white-list feature in version 1.1.
 
-You will have to add any hosts your app uses or connects to (hostnames/IP addresses only, **without** the protocol) in __PhoneGap.plist/ExternalHosts__. Wildcards are supported.
+You will have to add any hosts your app uses or connects to (hostnames/IP addresses only, **without** the protocol) in __Cordova.plist/ExternalHosts__. Wildcards are supported.
 
 This includes external http/https/ftp/ftps links in:
 
@@ -128,7 +128,7 @@ This includes external http/https/ftp/ftps links in:
 
 **5. How do I effectively upgrade my project?**
 
-Starting with PhoneGap 1.4, follow the instructions in the **"PhoneGap Upgrade Guide"** document that is included with the distribution.
+Starting with Cordova 1.4, follow the instructions in the **"Cordova Upgrade Guide"** document that is included with the distribution.
 
 <br />
 
@@ -144,7 +144,7 @@ Starting with version 1.1, when creating a new project, the weak-linking is adde
 
 **7. How do I override the location of the start page www/index.html?** 
 
-Starting with PhoneGap **1.4**, you can set this directly in the function **application:didFinishLaunchingWithOptions:** in your project's **AppDelegate.m** file.
+Starting with Cordova **1.4**, you can set this directly in the function **application:didFinishLaunchingWithOptions:** in your project's **AppDelegate.m** file.
 
 Modify these lines appropriately:
 
@@ -153,9 +153,9 @@ Modify these lines appropriately:
 
 **8. What's the difference between the Xcode 3 and Xcode 4 templates?**
 
-The PhoneGapLib static library is only used by the Xcode 3 template. The Xcode 4 template uses PhoneGap.framework (a static framework) because of Xcode 4's template limitations. Both are based off the same code, just packaged differently.
+The CordovaLib static library is only used by the Xcode 3 template. The Xcode 4 template uses Cordova.framework (a static framework) because of Xcode 4's template limitations. Both are based off the same code, just packaged differently.
 
-You can still create projects using the command line if you want to use the Xcode 3 Template in Xcode 4. This is particularly useful for developers debugging the PhoneGap core.
+You can still create projects using the command line if you want to use the Xcode 3 Template in Xcode 4. This is particularly useful for developers debugging the Cordova core.
 
 Link:
 
@@ -163,25 +163,25 @@ Link:
 
 <br />
 
-**9. In Xcode 3, I want to have a project-specific copy of PhoneGapLib for my project, not a global one. How do I do this?** 
+**9. In Xcode 3, I want to have a project-specific copy of CordovaLib for my project, not a global one. How do I do this?** 
 
-In your project, there should be a _PhoneGapBuildSettings.xcconfig_ file. Modify the _PHONEGAPLIB_ variable in the file to point to your project specific PhoneGapLib folder. You can use relative paths, off $(PROJECT_DIR).
+In your project, there should be a _CordovaBuildSettings.xcconfig_ file. Modify the _CORDOVALIB_ variable in the file to point to your project specific CordovaLib folder. You can use relative paths, off $(PROJECT_DIR).
 
-**10. In Xcode 4, I want to have a project-specific copy of PhoneGap.framework for my project, not a global one. How do I do this?** 
+**10. In Xcode 4, I want to have a project-specific copy of Cordova.framework for my project, not a global one. How do I do this?** 
 
-A. Remove the existing PhoneGap.framework from your project, and drag and drop your own PhoneGap.framework in, that's all there is to it. To compile your own version of PhoneGap.framework, go to _~/Documents/PhoneGapLib_ and run the Xcode project with the _UniversalFramework_ target. You might need to modify the _USER_FRAMEWORK_SEARCH_PATHS_ in your project as well.
+A. Remove the existing Cordova.framework from your project, and drag and drop your own Cordova.framework in, that's all there is to it. To compile your own version of Cordova.framework, go to _~/Documents/CordovaLib_ and run the Xcode project with the _UniversalFramework_ target. You might need to modify the _USER_FRAMEWORK_SEARCH_PATHS_ in your project as well.
 
-**11. I've got other PhoneGap-specific issues not covered here?**
+**11. I've got other Cordova-specific issues not covered here?**
 
-A. Older pre-1.0 issues have been put in the [PhoneGap iOS FAQ](http://wiki.phonegap.com/w/page/41631150/PhoneGap-for-iOS-FAQ) on the [Wiki](http://wiki.phonegap.com).      
+A. Older pre-1.0 issues have been put in the [Cordova iOS FAQ](http://wiki.phonegap.com/w/page/41631150/PhoneGap-for-iOS-FAQ) on the [Wiki](http://wiki.phonegap.com).      
 
 **12. On an iOS 3.2 iPad, and launching an iPhone only app, when I use the Media Capture API, the user interface shown is iPad sized, not iPhone sized?**
 
 A. You must delete the *~ipad.png images from **Capture.bundle** if they want to build an iPhone only app and have captureAudio() display properly on an iPad. This additional fix is just for iPad running iOS 3.2 - if the requested *~ipad.png is not available it returns the iPhone sized image.  
 
-**13. I get this linker error: "ld: warning: ignoring file libPhoneGap.a, file was built for archive which is not the architecture being linked (armv7)"** 
+**13. I get this linker error: "ld: warning: ignoring file libCordova.a, file was built for archive which is not the architecture being linked (armv7)"** 
 
-A. In your project's Build Settings, set **"Build for Active Architecture Only"** to **NO**. This has been fixed in PhoneGap 1.2 for newly created projects. This is usually because Xcode 4 will only build for armv7 by default, and not armv6.
+A. In your project's Build Settings, set **"Build for Active Architecture Only"** to **NO**. This has been fixed in Cordova 1.2 for newly created projects. This is usually because Xcode 4 will only build for armv7 by default, and not armv6.
 
 BUGS?
 -----

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/bcff9559/Uninstall Cordova.applescript
----------------------------------------------------------------------
diff --git a/Uninstall Cordova.applescript b/Uninstall Cordova.applescript
new file mode 100644
index 0000000..712eac4
--- /dev/null
+++ b/Uninstall Cordova.applescript	
@@ -0,0 +1,64 @@
+-- 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.
+
+set question to display dialog "Uninstall Cordova?" buttons {"Yes", "No"} default button 2 with icon caution
+set answer to button returned of question
+
+if answer is equal to "Yes" then
+	tell application "Finder" to set home_path to home as text
+	tell application "Finder" to set startup_hd to startup disk as string
+	
+	-- delete Xcode 3 Template
+	set source to (home_path & "Library:Application Support:Developer:Shared:Xcode:Project Templates:Cordova")
+	tell application "Finder"
+		if exists folder source then
+			delete source
+		end if
+	end tell
+	-- delete Xcode 4 Template
+	set source to (home_path & "Library:Developer:Xcode:Templates:Project Templates:Application:Cordova-based Application.xctemplate")
+	tell application "Finder"
+		if exists folder source then
+			delete source
+		end if
+	end tell
+	-- delete CordovaLib (used by Xcode 3 Template, and generating Cordova.framework if need be)
+	set source to (home_path & "Documents:CordovaLib")
+	tell application "Finder"
+		if exists folder source then
+			delete source
+		end if
+	end tell
+	-- delete Cordova.framework (used by Xcode 4 Template) and its parent directories
+	set source to (startup_hd & "Users:Shared:Cordova")
+	tell application "Finder"
+		if exists folder source then
+			delete source
+		end if
+	end tell
+	-- delete symlink to Cordova.framework
+	set source to (home_path & "Library:Frameworks:Cordova.framework")
+	tell application "Finder"
+		if exists file source then
+			delete source
+		end if
+	end tell
+	-- end
+	display dialog "Cordova uninstalled." buttons {"Goodbye ☹"} with icon note
+else
+	display dialog "Phew!" buttons {"That was close ☺"} with icon note
+end if

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/bcff9559/Uninstall PhoneGap.applescript
----------------------------------------------------------------------
diff --git a/Uninstall PhoneGap.applescript b/Uninstall PhoneGap.applescript
deleted file mode 100644
index 9b1e762..0000000
--- a/Uninstall PhoneGap.applescript	
+++ /dev/null
@@ -1,64 +0,0 @@
--- 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.
-
-set question to display dialog "Uninstall PhoneGap?" buttons {"Yes", "No"} default button 2 with icon caution
-set answer to button returned of question
-
-if answer is equal to "Yes" then
-	tell application "Finder" to set home_path to home as text
-	tell application "Finder" to set startup_hd to startup disk as string
-	
-	-- delete Xcode 3 Template
-	set source to (home_path & "Library:Application Support:Developer:Shared:Xcode:Project Templates:PhoneGap")
-	tell application "Finder"
-		if exists folder source then
-			delete source
-		end if
-	end tell
-	-- delete Xcode 4 Template
-	set source to (home_path & "Library:Developer:Xcode:Templates:Project Templates:Application:PhoneGap-based Application.xctemplate")
-	tell application "Finder"
-		if exists folder source then
-			delete source
-		end if
-	end tell
-	-- delete PhoneGapLib (used by Xcode 3 Template, and generating PhoneGap.framework if need be)
-	set source to (home_path & "Documents:PhoneGapLib")
-	tell application "Finder"
-		if exists folder source then
-			delete source
-		end if
-	end tell
-	-- delete PhoneGap.framework (used by Xcode 4 Template) and its parent directories
-	set source to (startup_hd & "Users:Shared:PhoneGap")
-	tell application "Finder"
-		if exists folder source then
-			delete source
-		end if
-	end tell
-	-- delete symlink to PhoneGap.framework
-	set source to (home_path & "Library:Frameworks:PhoneGap.framework")
-	tell application "Finder"
-		if exists file source then
-			delete source
-		end if
-	end tell
-	-- end
-	display dialog "PhoneGap uninstalled." buttons {"Goodbye ☹"} with icon note
-else
-	display dialog "Phew!" buttons {"That was close ☺"} with icon note
-end if