Guide to Developing an App for iOS

This is the second guest post by Jonathan Gagné at Université de Montréal. Jonathan is a graduate student under direction of René Doyon and David Lafrenière. His research topics include the search for young brown dwarfs in the solar neighborhood and the development of methods for direct exoplanet imaging. In his first post, he told us about the Brown Dwarf Converter app he developed.

If you want an iPhone or iPad app to serve a specific research function, odds are, you’re gonna have to develop it yourself. You need three things to get started:

  • Mac OS X for running Xcode
  • either an iPhone or iPad on which to test the applications
  • a $100 / year subscription as an Apple Developer.

First, I downloaded Xcode development tools (free) and installed it on my machine. Then, I followed tutorials on YouTube (search “build my first iPhone app”) and built some “Hello world” apps using Xcode. The user interface is very neat. You even get iPhone and iPad simulators to run your app. There are a lot of forums and web sites dedicated for helping developers (e.g. Stack Overflow). It surely helps to have some coding experience, but you don’t have to know about C, C++ or Objective-C coding at first, since a lot of things can be coded with interactive drag-and-drops or options in Xcode. When you need to code something more specific, then Google searches on Objective-C and looking at the existing code in your application can help. Objective-C is the main coding language for iOS, but it also accepts C and C++, subroutines, but unfortunately not IDL or python.

Submitting the application to the App Store can be the most complicated part. The rest of this paragraph is very technical and only for those who are in the process of submitting. However, I couldn’t find all this information in a single location so here it is:

  1. Subscribe to an Apple Developer account. It costs $100 per year and you can submit any number of applications you wish.
  2. Get an account on iTunes Connect, and create a receiving slot for your application (Manage applications / Add new app). When you complete the forms you’ll see a “waiting for binary” status.
  3. Plug-in your iOS device to your Mac and choose it in Xcode’s “Running Scheme” drop-down menu, instead of the default “iPhone simulator”.
  4. Xcode will help you through the steps of creating certificates for declaring your iOS device as the one you use for development and adding them to your keychain automatically. If you ever want to modify those after, you’ll have to login to your apple developer account created earlier, and click on “Provisioning Portal” in the right menu bar.
  5. Press “Run” (the “play” button in Xcode) and see if your application runs well on your own iOS device. Maybe it could be slower because your iOS device doesn’t have the same technical specifications as your Mac computer.
  6. When it works fine, return to Xcode and choose “Product / Archive” (the Archive menu will be grayed-out if you didn’t choose a valid iOS device as your running scheme). This will compile and archive the binary file for your app, which will be what is sent to the appstore.
  7. If a new window doesn’t immediately appear showing your archived application, click “Window / Organizer” in Xcode.
  8. Choose the binary and click “Validate” to ensure it passes some basic tests, and finally “Distribute”.
  9. Go back to iTunes Connect on the web and check that your app was successfully submitted. You application status should become “Waiting for review”.
  10. An Apple employee will review your app to make sure it doesn’t do “bad” things to the iPhone (such as draining battery power when outside the app). This process took approximately one week for me and most other people I heard from.
  11. Your app status will become “In review” for approximately 1 day and then, hopefully, “Ready for sale”.

Now everyone can start downloading your app!

What apps would you like to see developed for astronomers?  There are plenty of star gazing apps, but what do you need at your fingertips to do your research?

4 comments… add one
  • Erik T Apr 30, 2013 @ 2:10

    I’ve seen a few apps that are useful in a conference or discussion setting that provide estimates of useful analytic relations (e.g. stellar mass-to-halo-mass conversions for galaxies, converters between different photometric scale factors and the like). But I’ve yet to really see an app that strikes me as something really useful for getting work done, because almost all of my real work is done at my computer… And usually it’s easier to write a script there or find something that already does what I want.

    One thing that might be nice would be a skycalc/observing planner tool that’s actually meant for astronomers (rather than stargazing/planetarium stuff). Also, a really good astro-ph reader would be nice, particularly if it interfaced with vox charta (or really any decent journal club platform that might be out there).

    Although all those comments were more hoping for Android (or cross-platform) apps, as that’s what I have… Speaking of which, it’s worth noting that if you want to experiment with such things, Android may be easier because it’s free to develop apps, and it’s only $25 (one time) to post your app on Google Play. They’re written in Java, though, which is either a plus or a minus depending on how well you know/love Java vs. Objective-C. (I’m not intending to start a which is better argument here – just wanted to point out some of the differences that may factor into someone’s decision.)

    I’m not really sure which is the best market for professional astronomy apps, though. Anecdotally, I’m surprised at how many people (myself included me) do the Mac computer with Android phone combo.

  • TMB May 9, 2013 @ 17:26

    Am I right that there’s no way to create any program to run on my own iPad without paying the $100 developer fee, even if I have absolutely no desire to upload it to the App Store? Any workarounds like apps that would let you execute simple user-supplied code? (tty interface would do if necessary)

    • TMB May 10, 2013 @ 18:55

      To answer my own question, it looks like there are a bunch of apps that will let you run your own code… I’m looking into Pythonista right now, which at $7 is a lot better than the $100 developer account fee. Anyone used any of these and have particular suggestions?

Leave a Reply

Your email address will not be published. Required fields are marked *