phonegap: IPhone Development with PhoneGap and Windows

crickettachyphagiaMobile - Wireless

Dec 10, 2013 (4 years and 7 months ago)


phonegap: IPhone Development with PhoneGap and
I do not know if this is of interest in this place, but i think there are quite a few users who do not own a mac and still want to
develop for the Iphone using their usual Web development tools on ANY Operating System
Having stumbled upon Phonegap, it took me quite a while to get my mind around XCode, Code signing and the inavaiability of
a Mac Computer.
so, here are my experiences:

1) The Mac Problem:
You can use VMWare player to get a virtual Machine of MacOs running. there are prebuilt sources of this available on the Net.
2) the SDK Problem:
register as a Mac Developer for free, and download XCode with the iphone SDK. This can easily be installed on your Virtual
3) get Phonegap and install.

Up to here this is really tedious and annoying, but not really difficult. Now we get to the tricky bits.

4) Code signing:
If you create a new phonegap project, you can build and run it into the iphone simulator. But Not in a real IPhone, it does not
even compile.
Registering the phone as development phone is not really possible with vmware, and paying 100 Bucks a Year to get the
Apple Developer Registry for app store is out of the Question, considering this is just for poking around a little bit.
So! You can create a certificate on your own! I found this by Googling for "Erstelle einen keychain(Apple-Tutorial)" this is in
german, so i sum it up a little
a) in /Developer/Platforms/iPhoneOS.platform/Info.plist change line 46 and 79 : replace XCiPhoneOSCodeSignContext by
b) create a certificate:
c) open your Phonegap Project and click on the blue (i) icon (Project information) in the tool Bar and select your new Certificate
in Signature where it says "Iphone Developer" (when you click there, it shows a list)
d) build and run for target device and release

5) Getting the app to the Iphone:
now you have created a directory (it looks like a file in finder) called in build/Release-IPhoneos
You can copy thei file / Dir to your IPhone using OpenSSH (Making it necessary to have Openssh on your iphone) using
mucommander or similar. even winscp on windows works, in case you can acces the dir with it..
copy the app to /Applications on the Phone. Important: you have to change the rights to 644 for files and 755 for dirs and 755
for the Phonegap ececutable in the base dir of the app. Reboot the Iphone, and your app should e visible in the springboard

****Now the cool Message: ****
this is your universal Template. Now you can forget about the Macintosh and Emulator and xcode and code signing and all.
you can use your normal sftp capable programming editor (i use jedit) to access the www dir in your project
in this www dir you find the phonegap.js and an index.html.
Just edit the html and use all the cool phonegap functions in it (Thanks, you Phonegap Guys, by the Way) .
I zipped the and use it for my experiments with different names.

If it is ok with the Phonegap Guys, i would be willing to share this app template with you, but I am not sure if it would be OK
with Copyright Laws and so.
Thorough Readers of this may have noticed that there are some Parts that are not really in the Books with Apple, so i will wait
for advice on this.