Podcast Search

Developing Perspective

#58: Managing new SDKs

Select a time to play from there. The line being spoken is highlighted as the audio plays.

0:00:00Hello and welcome to Developing Perspective. Developing Perspective is a podcast discussing

0:00:04news of note in iOS development, Apple and the like. I'm your host, David Smith. I'm

0:00:08an independent iOS developer based in Herner, Virginia. Today is Thursday, June 21st, and

0:00:13this is show number 58. Developing Perspective is never longer than 15 minutes, so let's

0:00:17get started.

0:00:18All right, so today's topic I'm going to talk about is a response to a question from

0:00:23Naylin B. on Twitter, who's asked a couple of good questions actually, and probably it's

0:00:28It's good to take a moment and say that if you have questions,

0:00:30if you have things that you're struggling with, things

0:00:32that you think I might know about,

0:00:35definitely just send me a reply on Twitter.

0:00:38I'll add it to the list and try and work through them.

0:00:41So what Nalen was asking about is, basically,

0:00:46how do I manage and handle the kind of awkward place we're in

0:00:49now as iOS and actually to the same degree Mac developers,

0:00:54where they have these beta builds that Apple is producing?

0:00:58So currently, there's essentially

0:00:59three versions of Xcode.

0:01:02There's the main shipping gold master in the App Store build.

0:01:06Then there's the mountain line, whatever

0:01:10that they called it, like a near final preview

0:01:12or something like that.

0:01:14And then there's the iOS 6 beta, which is definitely

0:01:17nowhere near final.

0:01:19And it's kind of a tricky thing when you look at that,

0:01:21of like, OK, so what exactly do we--

0:01:25as a developer, how do I manage that?

0:01:27And how do I work on adding new features while still

0:01:32being able to do fixes and updates to the current stuff

0:01:36that you can't ship?

0:01:38So first, probably worth saying is that Apple typically

0:01:43doesn't allow, or at least very strongly discourages,

0:01:47people from submitting applications

0:01:50with anything other than the current gold master Xcode.

0:01:54So currently, that's the iOS 5.1 SDK, I believe.

0:02:00And that's the version that you should

0:02:01be using if you're submitting to the App Store.

0:02:03Similarly, that last-- it's the final version in the Mac App

0:02:07Store of Xcode for if you're submitting an app for Lion.

0:02:11So that's kind of what Apple would recommend.

0:02:13And in some ways, I think they even enforce it.

0:02:15Often, if you try to submit a build that

0:02:19was built against, say, the iOS 6 stuff,

0:02:23I believe they reject it.

0:02:25I think it's an automated rejection rather than having

0:02:28to go through a review one, so it wouldn't be too problematic.

0:02:30It'll just catch it and yell at you.

0:02:32But definitely not something you'd want to do,

0:02:36especially if you're trying to actually ship a build.

0:02:38So instead, it's going to be this funny place of,

0:02:40what do you do?

0:02:42So typically, this is the way that I handle it.

0:02:46And it may not work for everybody.

0:02:48It requires a little bit of extra technology.

0:02:51But I found it worked pretty well.

0:02:53Apple has shifted to this new kind of Xcode as an app

0:02:58approach, where rather than the Xcode being this thing that

0:03:03gets installed into /developer and sticks its fingers all

0:03:06over your system, in theory, Xcode is now entirely bundled

0:03:10into one .app file.

0:03:12So installing multiple copies of it shouldn't interact with

0:03:15each other.

0:03:17But at this point, that approach is a little too new

0:03:20for me to truly trust that if I install the new beta,

0:03:24that it's not going to mess up something

0:03:26about my main shipping version.

0:03:29And that could either prevent me from getting an update out

0:03:31as quickly or fail in some strange, subtle way that

0:03:35takes forever to hunt down.

0:03:37And so that's kind of what I'm looking for to serve

0:03:43with my thing is I want the most reliable developer setup

0:03:47possible for my main machine.

0:03:49I don't want something that has any unexpected behaviors,

0:03:54weird bugs, things like that.

0:03:56What I really want in my main--

0:03:58like my iMac that I sit in front of every day

0:04:01and just pour out the code, I want

0:04:03that to be stable and rock solid.

0:04:05And so I always install the gold master version on that.

0:04:08And that's it.

0:04:09I never install any betas, anything like that.

0:04:11Pretty much that never touches that computer

0:04:14until it's a gold master.

0:04:16And so typically this process works

0:04:18appable at some point release a gold master of Xcode,

0:04:22for example, with Mountain Lion, my guess

0:04:24is that it will probably be in the next couple weeks.

0:04:26They'll be kind of like, here's the GM version of it that

0:04:29includes the Mountain Lion SDK.

0:04:31And at that point, I'll install that and submit

0:04:34the Mountain Lion updates to the Mac App Store

0:04:36for my applications.

0:04:39Typically, they don't really allow--

0:04:41like I said before, you can't link against the new stuff

0:04:45in a version until typically the Google GM's released.

0:04:50And so you can do some kind of forward compatibility updates.

0:04:54So this is like-- you'll probably

0:04:56have heard a bunch of this recently, where people

0:04:58need to make updates to their 5.1 SDK apps

0:05:03to make them compatible with iOS 6.

0:05:06What they have to do there is not necessarily taking the--

0:05:09they're not linking against the new stuff to make it work.

0:05:12It's usually that they are--

0:05:14they're doing something in their 5.1 code that is broken on iOS 6.

0:05:19And so they're sort of fixing it in almost like a future proofing

0:05:23way, if that makes sense, rather than actually adding

0:05:26in the future stuff.

0:05:28And so you can kind of do those, but you'll just

0:05:30use those with your main versions of Xcode.

0:05:33So anyway, so that's kind of the process that I'll do is,

0:05:35on my main machine, it's whatever the latest is,

0:05:37pretty much all the time.

0:05:39Really, the only exception is, unless I really

0:05:41need to rush out an update, I often will--

0:05:45I typically wait like maybe 18 hours, almost a day,

0:05:49maybe before I install the new version once it's released,

0:05:53just because you kind of are waiting for that Twitter

0:05:55feedback of, wait, the new version of Xcode

0:05:58totally destroys XYZ.

0:06:00And I try not to be an early adopter with my job,

0:06:06because if something goes weird and wrong,

0:06:08that could be very problematic to me.

0:06:11So I usually wait a little bit.

0:06:12And one nice thing about the new Xcode being shipped as an app

0:06:16file is it's very easy to back up.

0:06:19So typically what I'll do is I'll just grab that .app bundle,

0:06:22create a zip file, throw it on a big hard drive I have,

0:06:25and just in case.

0:06:27If I ever need to bring it back, I can.

0:06:29Because it's very hard to get the old past versions.

0:06:32You can't get them in the Mac App Store, I don't think.

0:06:35There may be some somewhere available on the dev portal,

0:06:38but I'm not even sure about that.

0:06:40So I always just back them up and have a whole bunch of

0:06:42archives of my old Xcode installs, just in case.

0:06:47So then that begs the question, what do I do with

0:06:49the new stuff?

0:06:50And so for that, I'm going to walk through some of the

0:06:52changes I've been making to Five Live, one of my Mac

0:06:57applications that I've recently been making

0:06:59Mountain Lion ready.

0:07:00So Mountain Lion includes this new notification center, which

0:07:03is great for something like Five Live, whose purpose is to

0:07:07monitor the 5x5 live stream status

0:07:11and alert you when shows are being recorded.

0:07:13And so that's a great thing for Notification Center

0:07:15to be able to pop up an alert and say,

0:07:17hey, build and analyze, hey, Hypercritical

0:07:20are being recorded, would you like to listen to them?

0:07:22And so I've been working on that.

0:07:23And for me, what I do is I have an old Mac laptop.

0:07:27It's an old MacBook Pro.

0:07:28It's fairly performant, does a pretty good job.

0:07:30And I use that as my--

0:07:32I guess you could almost call it my sandbox.

0:07:35That's where I go to work on stuff that is beta, that is

0:07:39volatile, that I want to play with without having any risk

0:07:42to my main machine.

0:07:44And so right now, that's running the latest developer

0:07:47preview of Mountain Lion.

0:07:48It's running the absolute latest Xcode.

0:07:50It's got all the iOS 6 stuff in it.

0:07:52And that's kind of my sandbox.

0:07:53And I can really do whatever I want on that machine.

0:07:56And I don't have to worry that I'm going to be messing up

0:07:59my production, important for shipping, actual money

0:08:03machine.

0:08:05And I'll work on that.

0:08:06And so I've got notification center support all baked in

0:08:10and ready to go in the new 5 Live

0:08:12as soon as Apple starts accepting Mountain Lion apps.

0:08:14It'll be one of the things that I submit.

0:08:16But by segregating those machines,

0:08:18it just gives me such peace of mind.

0:08:20And I may be overly paranoid with this,

0:08:22but I've been bitten by it so many times, especially

0:08:25in the old days, where you'd install some new beta

0:08:29and it would mess up some weird thing.

0:08:30And you couldn't build, and you couldn't submit for two days.

0:08:33You had to find the old version and install it.

0:08:35And it's just one of those things that--

0:08:38if you were a carpenter, it's like having a sharp ax,

0:08:43or I guess maybe if you're a lumberjack, having a sharp ax.

0:08:47But your tools are important to you,

0:08:51and so I take very good care of them.

0:08:52And so I'm very conscious and very careful

0:08:54about what I do with them.

0:08:56So that's kind of my process.

0:08:58I'd say it's a little overly paranoid,

0:09:00but I think it works.

0:09:01And I think it really--

0:09:02if this is your job, this is your profession,

0:09:04you've got to be careful about this.

0:09:06Similarly, related to this on the side

0:09:08is how I manage the betas on my devices.

0:09:11And so what I always do with this is--

0:09:13what works pretty well is I typically

0:09:16am installing the new iOS.

0:09:19So in this case, iOS 6.

0:09:20I install it on my previous generation iPhone.

0:09:25I own one of almost every iPhone since the iPhone 3G, I think.

0:09:30So what I do is I'll install one before.

0:09:32So currently, it's on my iPhone 4.

0:09:34And I tend to prefer iPhones rather than iPod touches

0:09:36for playing around with it, primarily because I can

0:09:39actually then use it as my phone, which

0:09:41is really convenient.

0:09:42I can pop the SIM out of my current iPhone.

0:09:44I can pop it in.

0:09:45And I can get a sense of those features in day-to-day use

0:09:47without the risk of actually-- if somehow it

0:09:50breaks my phone or something weird,

0:09:52I'm not totally out of luck.

0:09:53I can just probably take the SIM out,

0:09:55put it in my main phone, which is running--

0:09:56I think now it's iOS 5.1.1.

0:09:59and that's you know i can

0:10:00pick that up right at right where i left off no problem

0:10:03and

0:10:03you know that seems to work pretty well for me i'll do that and that you know

0:10:06and the i_m_ the ipad side is kinda pick a device

0:10:10it any matters as much there just because it's they're all kind of the

0:10:13same in many ways

0:10:15so i think on stall i was six probably on one of my

0:10:18problem i've had three

0:10:20that it's

0:10:21i think that i'll probably where i go just because

0:10:24going to be wanting iOS 5 on my older devices, probably more

0:10:29than iOS 6 on my older devices.

0:10:31So that's probably what I'll do.

0:10:33It's kind of interesting, of course,

0:10:35because iOS 6 is not compatible with the first-gen iPad.

0:10:39So those will be stuck forever on iOS 5.1.1.

0:10:45But that's not really a big deal.

0:10:47I still actually even have an iPad running 3.2,

0:10:49the absolute original build.

0:10:52I just can't bear to update it because that machine is

0:10:56irreplaceable.

0:10:57Not that I even have many users stuck on that.

0:11:01There's just something kind of hard.

0:11:02It's almost like if I had an original iPad or iPhone

0:11:05running like iOS 1.

0:11:06I'd just-- there's something kind of cool.

0:11:08At some point, I'll probably break down and install iOS 5.1,

0:11:10put 1 on it.

0:11:11That may just be when I want to sell it or something like that.

0:11:15Though I mentioned it here.

0:11:16In case you have some weird bug on someone running an iOS 3.2,

0:11:21you need me to try something out,

0:11:22just let me know.

0:11:23I've got it sitting there, and it hardly ever gets any use.

0:11:26Anyway, so that's kind of my version strategy.

0:11:28It seems to work for me.

0:11:29And so hopefully that's helpful.

0:11:30Hopefully it's a useful thing to kind of be thinking about.

0:11:33A little pro tip, if you don't have another computer that you

0:11:35can kind of make your sandbox, I'd

0:11:37definitely recommend just getting it, whatever,

0:11:39the cheapest external hard drive you can,

0:11:41and just installing Mac OS on that and booting from that.

0:11:44And you can, since you completely

0:11:47reproduce your-- it's as though you have a new computer,

0:11:49even if it's running on your main computer.

0:11:51So you just boot from the external drive.

0:11:53You can do what you want.

0:11:54You could even start from a super duper backup or copy

0:11:57of your main computer.

0:11:58So all your applications and stuff are there.

0:12:00And then you can just upgrade it,

0:12:01as long as you're just kind of careful.

0:12:03It's like, whenever I do something like that,

0:12:05I always change the desktop on my new computer

0:12:07to something really obvious and gaudy,

0:12:10so that I'm very aware of what machine I'm on.

0:12:13So that's it for today's show.

0:12:15Hopefully that's helpful.

0:12:16As I said, if you have any questions, thoughts,

0:12:18comments, definitely the best place--

0:12:20Just reply me on Twitter.

0:12:21I'm @_DavidSmith there, and I'll do my best to respond.

0:12:26I think it's really helpful when I

0:12:27get a sense of what people are actually interested in,

0:12:30what people want to hear about.

0:12:31It just helps hopefully makes the show more engaging

0:12:33and more kind of a dialogue rather than just a monologue.

0:12:37But yeah, otherwise, have a good week, happy coding,

0:12:39and I'll talk to you later.

0:12:40Bye.