Objective:
Little brother is doing java/android for the first time in this iOS, the company has mobile projects that are developed using PHONEGAP and need to develop iOS versions. Nothing can be more than 1.1 to ponder ... The great God crossed over ...
Original link: http://my.oschina.net/jgy/blog/168745
Download phoneGap2.9 and install XCODE5 (currently the latest version)
Create a project using the Phonegap/create command?
1 |
. /create /Users/jiagaoyang/Documents/Workspace/Xcode/iphone com.wislong HelloWorld |
- First enter the Phonegap/ios/bin directory
- ./create+ Project Location (pre-created) + package name + project name. ( Change the number to a space )
A permission (Permission) error was encountered:?
1 |
- bash : . /create : Permission denied |
?
1 |
. /create : line 116: /Users/jiagaoyang/Documents/phoneGap-2 .9.0 /bin/replaces : Permission denied |
The above created project will report no permissions error resolution as follows (because I only give create permission for the first time, so there will be a second error, directly using the following to all the file permissions can be):
?
Because you are in the bin directory, you do not have to switch directories, which means to add 777 permissions to all files under the bin (777 read and Write permissions)
Encountered an error (empty folder)?
1 |
Error: /Users/jiagaoyang/Documents/Workspace/Xcode/iphone is not empty. Please specify an empty folder. |
This is to say that you store the file directory is not empty, it needs an empty folder, go to empty it ~
Then use the Create Project command if nothing is printed and the instructions are successful. Go to the directory you just created and look at it!
A file with a file suffix of. Xcodeproj is found, and a double-click will automatically open the project with Xcode.
The default Open directory structure is as follows:
You can copy the www file of your Android project directly. The cordova.js files that are introduced in the file need to be replaced by iOS
Modify the software name on the desktop after iOS installation
The default is the same as the project name (HelloWorld) found in the Xxx.info.plist file in the bundle display name modified value will be
Such as:
Modify the default boot file configuration www/index.html
Locate the CLASSES/APPDELEGATE.M file and add the following code
?
12 |
self.viewController.wwwFolderName = @ "www/html" ; self.viewController.startPage = @ "index.html" ; |
Will find www/html in index.html this see your own project modified. Such as:
iOS Packaging/.app-.ipa
Find the menu Product-build if the success appears ... Instructions succeeded, to the left to find the products file below to see if there is an. app file.
Drag this file into itunes and then drag it out magically into the. IPA file, which you can put on the jailbreak machine for testing this time.
Archive/Upload
Let's start with the setting: Product-scheme-edit Scheme To change the place marked red to release the default should be debug such as:
When you're done, you can do the filing action. Product-archive
LIBCORDOVA.A file cannot find an error
Reference Link: http://stackoverflow.com/questions/17401478/libcordova-a-file-missing-in-phonegap-2-9
Such as:
Then click Archive again, the middle may encounter some certificate using authorization click Allow OK!!!
The archive interface is then automatically opened (menu Window-organizer)
Select Archives to see the apps that have been archived for upload, click on the Validate verification on the right ... Distribute Submit ... You know.
Such as:
Posted to AppStore Slow
Posted 2 days Upload has been stuck in your application is being uploaded ... At most I waited for 5 hours, almost every time I said the network connection failed or something. Finally adopted the scheme is FQ upload, at that time on the Mac FQ not solve, finally in Winfq, share a WiFi network ... mac connect FQ network and then do upload, not to 10 minutes success!!!
? Treat yourself to a cup of coffee?
OVER!!!!
XCODE5 + phoneGap2.9 Build iOS development environment-configuration-Test-archive upload/phoneg ...