4

firstly I have reviewed previous similar questions, but there were either old and or contradictory in their answers, so I’m asking what is the current (May ’14) requirements to build/test/deploy iPhone/iPad apps?

Longer version – I’ve been asked by a client to develop an app for iOS/Android and as I’m completely new to this I was hoping to use PhoneGap to use my existing web skills to develop the apps. I currently just own an Android phone so installed the Android SDK and PhoneGap onto Ubuntu (everything download this week inc Ubuntu so all current versions) and eventually got the PhoneGap “hello world” example to run on the emulator and actual phone (not via play store, just local copy of APK file)

I’ve found many guides here and elsewhere detailing how you can publish to App Store using a PC (or Ubuntu I assume) – mostly talking about certs etc. But, from my experience of setting up my tools to build my first hello world app, PhoneGap requires the SDKs for each device you target, so would thus require the Apple SDK to enable you to run an emulator? Or can you emulate an iPhone on Ubuntu?

So it seems to me, that even thought you can deploy to the App Store without a Mac, you will need one during development to run the emulator – is this correct or what am I missing?

Thanks in advance!

KevInSol
  • 2,560
  • 4
  • 32
  • 46
  • If you're using the phonegap build, you just need a valid developer account to build you application. It will generate an IPA which you can upload on testflightapp.com to install it on your device. But it's really ennoying to do it for a single test ! – Clement Dungler May 15 '14 at 13:46
  • Thanks Clem - I had a look at testflightapp.com. But I can see this as being a lot slower than just firing off an emulator during development. An I correct to say I must have a Mac to use an emulator? Or is there any way to run one on Ubuntu? – KevInSol May 15 '14 at 14:14
  • You're right, If you need to do the development using testflightapp it will take ages... And yes you need a Mac to use the emulator.. – Clement Dungler May 15 '14 at 15:56
  • Thanks Clem, it seems that while technically possible to get away without a Mac, it is not a practical solution – KevInSol May 15 '14 at 16:01

1 Answers1

5

Short answer: You don't need to have the iOS SDK on Ubuntu (nor could you anyway). build.phonegap.com takes care of that for you. There don't seem to be iOS emulators for Ubuntu but there may be some online services that you can leverage. But I believe you still need a Mac to publish to the app store.

Long answer:

You will need:

  • An Apple Developer account for the certificate files
  • You probably need an iOS device for testing. There don't seem to be iOS emulators for Ubuntu though there may be some good online services. (Some good threads on this: 1, 2) See Kerri's comment below highly recommending you test on a real device and not an emulator.

Here's how you would do it:

  1. Using your Apple Developer account, create a certificate and provisioning file in the Certificates, Identifiers & Profiles section.
  2. Create a .p12 file from the certificate. (You should be able to use OpenSSL but I'm not sure of the exact steps.)
  3. Register an account with build.phonegap.com.
  4. Create a signing key using your .p12 and provisioning files.
  5. Upload your code and build.phonegap.com will create the .ipa file for you.
  6. If you use an iOS device for testing, you can browse to build.phonegap.com on the device and install the app from there.
  7. To publish to the app store I believe you still need a Mac with Xcode. (Maybe there's a 3rd party service that does this but I couldn't find any.) An alternative to buying a Mac is to buy just the OS and either dual boot or create a virtual machine.
Keith
  • 20,636
  • 11
  • 84
  • 125
  • Keith, many thanks for that. According to this http://www.tipsfromsiliconvalley.com/2013/09/18/developp-and-build-an-ios-apple-application-on-windows-with-phonegap/ you do not need a MAc to publish to the app store. Does this seem correct? I can see how you can develop though from your anawer. – KevInSol May 15 '14 at 15:30
  • @user602088 Based on the comments at the link you posted, you do indeed need a Mac to upload to the store. Given that it's the only *supported* method, and renting a mac isn't very expensive, especially if you just need it for occasional uploading. – Kerri Shotts May 15 '14 at 17:35
  • 1
    Oh, you really, really, really want a real device for testing. The iOS simulator doesn't in any way reflect how your app will work on a real device, so it can't be used as a reliable indicator. That said, once you get hold of a real device, you can use the Phonegap Developer App to test your app on a real device without going through the build process at all (See http://phonegap.com/blog/2014/04/23/phonegap-developer-app/). This works as long as you don't use more than the core plugins, but assuming that's the case, it's a really slick addition to the workflow. – Kerri Shotts May 15 '14 at 17:49
  • Thanks Kerri, it looks like I will have to invest in an mac and iphone. The mini mac looks really good value, a little over 530 euro here in ireland plus tax. I'll get a iphone 4S with IOS 7, does that seem ok? – KevInSol May 15 '14 at 18:22