Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to build Phonegap application for iOS and iPhone on Linux?

Tags:

cordova

I know there are a number of questions similar to this one on the internet, but none of them seems fits my needs, so I will try to get help from StackOverflow.

I have been building an app for Android using Phonegap. I have all set up , eclipse, java and everything and I can test the app on both emulator and on my Android device, which is all great.

The problem is that now I want to test this on iPhone, which I don't have. Is there some step-by-step process or if someone could explain me how can I test the iPhone version of the application using some kind of emulator (the similar like it is used for Android) on my Linux machine (and I am using Phonegap of course)?

And how can I build a test application which I could send to my friends to test, before publishing it to the app store (so I don't need a certificate for now) ?

If this is not possible, I could at the end move to windows if I could do that there?

P.s. I have created iPhone dev account (a free one)

like image 225
Aleks Avatar asked Feb 18 '14 21:02

Aleks


2 Answers

I'm afraid you can only use the iOS SDK, xcode and emulator on a Mac. You can also only build your app locally for iOS on a Mac.

You can use the PhoneGap Build cloud service to build your app for iOS but this doesn't give you access to an emulator; you'd need a iPhone or iPad to run the resulting IPA file on.

Even with PhoneGap Build you would still have to get a paid for apple developer account at around £100 a year in order to provision your app for iOS devices that belong to your friends or for deployment to the app store.

The app provisioning process is too complex to describe in this answer; there are plenty of tutorials online should you wish to go down that route.

like image 144
David Anderson Avatar answered Oct 05 '22 21:10

David Anderson


You can't avoid needing a Mac in order to build an iOS app. You don't necessarily need to own one, you can work with another developer to generate certificates for you, provide you with provisioning profiles and certificates.

Once you have those you could use Phonegap Build, as David Anderson suggested, but you really should be testing on devices. Also simulators and emulators do not give you an accurate representation of how your app performs on a real device. The Xcode simulator uses the Mac's hardware to run the apps, so they run much faster and are not truthful to how it actually runs on the app.

You also want to be able to test touch interactions with the app - you might be building an awkward interface that works with your mouse, not with the thumb and fingers.

Once you have an app built, a good service for distributing it to testers is Test Flight, which lets you upload a profile and an exported build of your app from Xcode to the testflightapp.com website, you can get your friends to sign up and they can download the app from there.

But that still requires you to have built the app in Xcode and exported it as an IPA.

You could try building a "hackintosh" - build a computer yourself to run OS X on it, it can be cheaper, but not by much and apparently it's a real hassle to keep it working. I've not tried that myself.

You can pick up a refurbished second hand 2011 Mac Book Air or Mac Mini from for a decent price from Apple, or even cheaper on eBay, you don't have to pay for the latest shiny models from Apple.

Plus you will need to pay for the full Apple Developer program to release your apps in the app store - that is unavoidable.

In short - if you want to developer iOS apps, the easiest way to do it is get a Mac and a licence. You'll save precious time spent on emulators, simulators and work arounds, that would be better spent developing your apps.

like image 42
Pete Avatar answered Oct 05 '22 21:10

Pete