Today is new iPhone day, always fun for iOS developers. Here are a couple of my findings on updating for iOS 6.
iOS 6 Autorotation
My iPad version of MASH had rotation issues, and wasn’t registering orientation changes. First, I discovered that the shouldAutorotateToOrientation method of UIViewController had been deprecated in iOS 6, but modifying my code to use the new -(BOOL)shouldAutorotate and -(NSUInteger)supportedInterfaceOrientations methods weren’t working either.
After further investigation, I found that I had some legacy code in my app delegate from the days of [window addSubview:viewController.view]. If you have this code in your app delegate, you’ll want to be sure to update that to the newer:
window.rootViewController = viewController;
Doing this will allow your app to either pull rotation preferences from your Info.plist or allow you to set them in code using:
-(NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window;
or using the shouldAutorotate and supportedInterfaceOrientations methods in your view controller code.
Adjusting the height of your iOS apps for the new iPhone 5 can also be a temporary roadblock. Your views might look right in the iOS simulator, but you might find that buttons near the bottom of the screen aren’t tappable/responsive. This is because the view controller’s view isn’t clipping subviews. The view is likely still reading it’s frame size from the NIB, which is sized for the 3.5 inch rather than 4 inch display.
I solved this problem by setting the window frame to the main screen bounds in my app delegate’s didFinishLaunchingWithOptions method like this:
[window setFrame: [[UIScreen mainScreen] bounds]];
Those are a couple of my findings. As you test and update your apps for iPhone 5 and iOS 6, maybe these tips will come in handy. I’d be interested to know if you ran into any issues with updating apps for iPhone 5 and iOS 6, too.
My wife watches a show on Netflix called White Collar, a decent crime-drama-comedy that blurs the lines between good guys and bad guys because one of the main characters is a likeable, sometimes reforming ex-con named Neal. There’s an episode where one of the (truly) bad guys has a safe room that houses his rare comic book collection. In a thinly-veiled threat of an explanation of the room’s fire safety system, the bad guy explains to Neal that in the event of a fire, all of the air will be rapidly sucked out of the room. Take away the air, and the fire has no fuel. Of course, anyone trapped inside the room when the safety system kicks on would quickly die from lack of oxygen.
The tablet rumor mills have been churning lately, and much has been written already about the Microsoft Surface having an extremely low, “we’ll make it up in volume” price-point of $199. With admittedly great sounding specs, and a rumored-to-be-low price, how can Microsoft’s competition hope to compete? And if Amazon is already selling the Kindle Fire at a loss at the same price point with much less impressive hardware, and Google is selling the Nexus 7 at a loss with only slightly less impressive hardware, how can this be sustainable for Microsoft? History suggests that this kind of slippery slope doesn’t end well.
In the time leading up to the release of the original iPad, pundits across the Internet speculated about its price, and the neighborhood of $999 actually seemed reasonably low (granted, this price was mostly touted for a device that would run a brew of OS X closer to a full-fledged desktop version). When Steve Jobs unveiled the iPad, he even made mention of what the pundits had been saying, and asked (rhetorically, of course, as was his way) what everyone thought it should cost. The first-generation iPad was released at the incredibly low price of $499. And Apple’s competitors (like Samsung and Palm/HP) certainly seemed to have trouble introducing anything close to as good for anything approaching that price. Apple had left very little wiggle room under the pricing umbrella to compete.
Now that a couple years have passed, the misrepresentation of Moore’s Law being what it is, competing with the iPad on price seems to be a reasonable proposition. However, the competition has also seemingly (mostly) decided to concede the approximately 10-inch tablet form factor to Apple, and is instead creating approximately 7-inch tablets. These smaller devices are also listing at half the cost of the iPad, leaving very little wiggle room under the pricing umbrella to compete.
But Apple doesn’t compete by making comparable products and pricing them lower.
With regard to the Microsoft Surface, again, it looks like it’s going to be a high-quality, (supposedly) low-cost tablet, and the consensus seems to be that Microsoft is going to try to suck all the air out of the room. If given the choice between a Surface at $199 and an iPad at $499 (or an iPad 2, the previous generation model presently still selling at $399), Microsoft bets you’ll buy a Surface. (And then they bet you’ll buy software, games, music, and movies from them or their partners to make up for their stunning loss on the hardware.)
Apple does have a bit of a reputation for changing the game, though.
So, this is my theory about what Apple might announce at a press event next month: an approximately 8-inch, smaller iPad at $299. Yes, I know, it’s $100 more than the to-be-confirmed price of the approximately 10-inch Surface - given the choice, wouldn’t most people still buy a Microsoft tablet? Maybe.
Apple could very easily take all the air out of the room themselves by introducing a smaller, $299 iPad, and reducing the price of the iPod touch to $149.
The iPad and iPod names have what one might refer to as “street cred”. The word iPad already has exponentially more of the mindshare of today’s youth than the word Surface. Certainly a significant number of young people will be begging for a Microsoft Surface. A more significant number will be clamoring for an iPad.
People make decisions about the brands they’ll stick with for life at a young age, which Apple recognized when introducing the iPod touch, building on the already powerful iPod brand. The iPod touch has been the small tablet of choice for parents of young children for years. This might be a leap, but I’d venture that kids with iPod touches become teenagers with iPads become young adults with iPhones become adults with all-of-the-above (and a MacBook Air). An even lower cost iPod touch could help sell more iOS devices to this key demographic – smaller iPad to those that can afford it, or an iPod touch to those that are looking to enter the Apple ecosystem with minimal pain.
With Surface, Microsoft might have a chance against the iPad at current prices. But if Apple introduces a spectrum of devices with price points for every budget, I believe Apple will re-assert the dominant position it created in 2010.
What might able call a smaller iPad?
EDIT: It seems John Gruber beat me to the iPad Air name possibility. (http://daringfireball.net/2012/08/ipad_mini_even_througher#fnr3-2012-08-14)
UPDATE: Games subcategories are now back, after a few day hiatus. (Thanks Apple!) The following post is kept for posterity.
So Apple announced some new iPods and a new version of iTunes (iTunes 9) yesterday at their annual September music event, and heralded the iPod nano video camera, the larger capacity iPod touch, and the iTunes LP and Home Sharing functionality of iTunes 9. The iTunes Store got a redesign, and in some ways is a major improvement over the last version. The addition of the Top Grossing apps category should provide much needed exposure to the more “expensive” games and apps that were previously buried below a swath of inexpensively produced titles. This change might even make a difference in combating the “race to the bottom” price wars.
But I think something is being lost in the changes to the App Store in particular, and I believe it’s vital for independent developers to consider this change. The desktop version of the iTunes Store no longer (as of this writing) breaks down the Games category into sub-categories (like Action, Arcade, Kids, Word, etc.), meaning that even top ranking titles in those sub-categories are being relegated to less prominent corners of the store.
I’m writing about this because I believe it could affect indie game developers (myself among them). My first iPhone title, MASH (iTunes link), fluctuates between the top 20 and top 10 Kids and Word games, in both paid and free categories, and I believe this is partly due to the continuing visibility it has in the App Store’s Kids and Word Games sections. Likewise, our most recent title, Liberty Boom (iTunes link), could be found in the top 75 Family Games. Liberty Boom was also recently featured in the New and Noteworthy Games category. (New and Noteworthy is now applied to the whole of the App Store.)
Currently users of the device version of the App Store are able to browse by sub-categories in Games, and I’m hopeful that the removal of this functionality from the desktop version (where filtering and refinements make significant sense) is merely an oversight of the iTunes Store redesign and/or a planned update. There’s also an outside chance that it will actually in some way help titles that are primarily marketed apart from the App Store or spread by word of mouth to stay ahead of the throng of (in my opinion) lower quality “me too” apps. But the simple fact is that the majority of people still use iTunes to find new titles to download and purchase.
I believe it’s necessary to provide a means for larger budget titles to stand out (e.g. the Top Grossing category), but burying independent developers, the people who really made the App Store what it is today, shouldn’t be the flip-side of the solution.
I’d love to hear what you think about the changes. Please let me, other developers, and Apple know in the comments.
At the end of January I released MASH for the iPhone and iPod touch, at an introductory price of 99 cents (as of this writing, MASH is on sale in the App Store for 99 cents, but will go back to its regular price of $1.99 in the next week). To date MASH has been met with very good reception, considering I conducted very little marketing, as it were, and no paid advertising - I predominantly used social media outlets like Facebook and Twitter to get the word out.
The real surprise, though, is the response from users for MASH Lite, the free version of the app, available on the App Store for the last week and a half. In that time it rose quickly to the top 20 and now the top 10 of the Kids game and Word game categories, and has had very favorable four and five star reviews in several countries. It’s been downloaded about 11,000 times so far. The app is running sparse advertisements, and this weekend (Saturday and Sunday) had over 50,000 ad impressions.
Additionally, I just discovered that I received my first payment from Apple for the first week MASH was available (the last week in January). Although I won’t disclose the amount, I will say that it took a little under a month for the transfer to be processed and go through.
If you own an iPhone or iPod touch, I really recommend checking it out. More information is on my website, Magnate Interactive.
Hot off the browser press, Safari 4 Beta just released this morning (available to download here). First impressions: love the intro animation, almost like starting up an install of Mac OS X for the first time - I wonder if that’s hinting at the movement toward browsers playing a more central role in acting as your “operating system”?
I can’t help but wonder if Apple is purposefully taking a page from Google by putting Tabs at the top of the interface, or by having a page preview based view of your history (although in a slightly cooler, curved 3D wall than Chrome or Opera’s flat grid). Apple copying Google for UI design? Blasphemy!
The Coverflow style view when searching your browser history is also a nice touch. However, something I don’t like is that form elements and the search field no longer draw the glowing blue Aqua-style focus “rectangle”. This is probably in preparation for the Marble theme said to be coming in Snow Leopard.
Worth noting: On OS X 10.5, Safari 4 seems to have some trouble with Spaces, and switching to the appropriate space when in Top Sites view. It also closes the whole window when hitting Command+W in Top Sites view, regardless of how many other tabs you have open in that window.
Now that MASH, my first game for the iPhone and iPod touch, has been in the App Store awhile (more info here: http://magnatemobile.com/apps/mash), I thought I’d take a moment to jot down some of my thoughts on the experience and what I learned, not having done Cocoa or Mac development previously.
Coming from Eclipse-based IDEs, I was used to having the file and folder structure of my project in the editor match up to the structure I’d see in Finder (or Explorer if I was on Windows) - in XCode, though, you can arrange and re-arrange the files and groups within the editor without actually changing the location of the corresponding item in the filesystem. I’m still not sure if I like this - there are times when I want to re-arrange files (especially the location of graphics) in my project using Finder’s column view instead of XCode’s list view.
Know when to retain and when to release. Releasing an object that you needed to keep will cause your program to crash. Seems like a no-brainer, but not understanding why my app crashed when I would invoke a “Start Over” method I created had caused me to spin my wheels for about a half hour. Additionally, take care not to “over-release” an object - the console will spit out malloc warnings that aren’t self-evident as to their cause.
When it comes to creating an app from the get-go with multiple languages in mind, creating a Strings file first and then using NSLocalizedStringFromTable is one way to do localized strings, but isn’t necessarily the conventional way. After having implemented localized strings that way first, I later learned that XCode has a process for writing your code first with the strings you intend to use, and then allowing the compiler to handle creation of the necessary files.
XCode does a very nice job with HeaderDoc documentation. It’s much easier to use than Flex Builder and ASDoc, in my experience. HeaderDoc doesn’t try to document every class in your project like ASDoc does by default, just those you tell it to.
You may have heard horror stories about long waiting times and applications rejected for seemingly trivial or vague reasons - while that hasn’t been my experience, I will say that the process for submitting an application is less than ideal. It takes a lot of time, forms ask for information in a strange order (this isn’t exactly the process, but on some form pages it’s a little like: enter the information about your app, then choose graphics to upload; after clicking to upload the graphics and the page refreshes, the previously entered form information is wiped out and you have to enter it again - frustrating!). Submission to approval time for my app and updates have been fairly quick so far, less than a week from “In Review” to “Ready for Sale”, so I don’t think I can complain about long waits, although the anticipation of not knowing if your app will be approved or rejected is bad enough.
Overall, I’ve enjoyed the process of learning to develop for the iPhone. I’d imagine the learning curve is probably steepest for those without previous object-oriented development experience, but for anyone with a good idea and a willingness to learn (and shell out for tooling and a developer certificate), I’d say the effort has been worth it.
From the site (http://www.phonegap.com/):
PhoneGap essentially wraps a web view (WebKit on the iPhone) in a native app container, giving the web application access to core device APIs. This should go over well with the Adobe AIR crowd that’s already been sold on the idea of repurposing their web-based apps as “native” desktop apps, who are also interested in bringing that software to various mobile devices.
What will the programs created in this manner be called? Rich Internet Applications? Native Web Applications?
I’m a big proponent of web-based applications, but only inasmuch as they allow fairly ubiquitous access to data across devices. My biggest beef with web apps, though, is that they are much less responsive than native applications. Alright, let me rephrase that - a web application will always be inherently slower than a native app. I/O for the data model aside, a web app also has to contend with the fact that both its data and the presentation logic for the data must trickle over the wire or over the air (and then be rendered) before anything useful can be done with it. Native applications simply do not have to deal with the presentation waiting game.
So the scenario I see PhoneGap being used for is something like: provide as much presentation logic/code as possible in a local data store that gets installed with the app, and only download data for the user when necessary. Cache things that won’t change often. Use device APIs for storing user data locally and for things like geo location.
One of the engineers on my team prefers to use Linux for development (specifically writing Java code in Eclipse), but has been a bit dissatisfied with Adobe’s release lag in pushing out Flash run-times like AIR for Linux (Ubuntu in his case).
A month after the Adobe AIR 1.5 release on the major platforms (Windows and OS X), Adobe has released AIR 1.5 for Linux, which covers the Ubuntu, Fedora, and openSUSE brews. Even 64-bit Linux users can join in on the fun (http://kb.adobe.com/selfservice/viewContent.do?externalId=kb408084&sliceId=1).
More detail is available on the Adobe AIR blog: http://blogs.adobe.com/air/2008/12/adobe_air_15_now_available_for.html
Adobe has updated the Flex 3 Language Reference for Flex 3.2, which covers the new API updates for Flash Player 10 compatibility.
Kontain, the Flash-based blogging and media sharing site from agency powerhouse FI launched its alpha version on November 13th. The evolution of FI’s Propod rich media blogging system, Kontain is a promising and beautifully designed site. The clean design is mildly reminscent of Virb, with a pinch of (new) Facebook thrown in for good measure.
FI is one of few firms that can do full Flash sites very well. However, understanding that it is still an alpha, the site really ought to provide alternate content for computers without Flash installed. And while the site does attempt to redirect to a slimmed down version of the site for iPhone/mobile users, on my iPhone sending to http://i.kontain.com/ failed because of “too many redirects”.
It remains to be seen if the lack of alternate content for search engines will be detrimental (although FI may have plans to provide alternate content in a future release), or if Google’s advancements towards Flash content discover-ability will overcome this sticking point.
As a funny side note, the back-end for Kontain appears to be running JBoss/Apache on a ColecoVision (operating at 3.58 MHz).