Archive for the ‘Apple’ Category

Get ’em while you can!

Wednesday, September 28th, 2016

Last week, as part of their initiative to clean up the app store, Apple marked two of my oldest apps as needing updates or they’ll be removed from the store (in 30 days). Since I don’t really have time to update them right now, I’m changed their pricing to free so everyone has a chance to download them before they’re removed. When I do get around to doing updates, I’ll definitely put them back back in the store as paid, so get ’em while they’re free!

The affected games were ActionChess and Oppo-Citrus.

These are games that I’m really proud to have made, so if you haven’t played ’em, please do go check them out. (And let me know what you think!) Enjoy!

Protocols all the way down

Wednesday, June 15th, 2016

As a programmer, one of the things I like to argue against is the concept of “magic code”, code that works because of some unseen bit of code elsewhere. In iOS, the principal is exemplified by “magic” methods you can include in various subclasses that do rather important things. Want to handle touches in your UIView? Just implement the method touchesBegan:withEvent:, touchesMoved:withEvent:, touchesEnded:withEvent:, and touchesCanceled:withEvent:, and you’re good to go. Want to set up your UIViewController‘s visual layout? Make sure you do so in the layoutSubviews method.

But how do you know about all these magic methods? This is definitely one of the questions that I found the most difficult when I first began iOS development. Learning about all this magic is basically the same thing as learning iOS development. Knowing Apple’s APIs is how you develop iOS apps. Knowing their quirks is how you get to be an expert.

But if you’re just starting out, it’s important to know that most of these magic methods are (generally, not always, but generally) defined in a protocol. When an object conforms to a protocol, it basically says that it (or one of its subclasses) will implement some set of methods. Want to know what protocols UIViewController conforms to? In Objective-C, you would simply open up its header and check it out. (Of course, a protocol might be defined even further up the chain, in one of the headers for a class the view controller inherits from.)

But how do you figure out what protocols a class conforms to in Swift? As near as I can tell, the only way is to open up Apple’s documentation. This seems like it would not be enough, since you might be working with a non-apple framework, or worse… it is possible (gasp) for Apple’s documentation to be spotty or outright incorrect. (I’ve done a few google searches, and read about 20 tutorials and blog posts, and I still don’t know how to figure this out from code alone, so I’m really asking this question. I’ve also started a stack overflow question on the topic.)

I don’t want this to be a “I think Objective-C is superior to Swift” post, but I do think there are legitimate reasons for header files, and this is one of them. Once you get beyond a certain level of iOS proficiency, poking around in those header files is akin to using the “view source” as an intermediate web developer. It’s one of the ways you learn how other people approach a problem.

iOS Game Development in UIKit

Wednesday, September 30th, 2015

I had the privilege to present this talk at MN Developer Conference this afternoon.

The talk is partially a re-hash of a talk I did back in 2011 on iPhone Games Programming, and it’s partially a re-focusing of a talk I did last year on Generic Game Model (my small collection of Objective-C classes for game development).

Tetris-like games for iOS

Thursday, October 16th, 2014

I’m backing up my iPhone in prep for a new device, and one of the things I did was spend ten minutes taking screenshots of every folder, just in case I need to restore things “manually” later. (Actually, I may decide to start “from scratch” on this new device, and I’ll use these images as reference if I need them.)

Anyway, nobody probably cares about my home screen, but I thought these screenshots of my “TetrisLike” folder were pretty cool. Enjoy!

IMG_3095IMG_3096IMG_3097IMG_3098IMG_3099

Watching videos — WWDC, Swift, POP, and grid-based games

Thursday, June 5th, 2014

This week has been all about learning, and specifically about watching videos to learn. Mostly because this week is Apple’s big WWDC conference. The list of developer-specific stuff they’ve announced this week is perhaps slightly larger than usual (including a new programming language called Swift — more on that later), and I have been watching a ton of talks pouring out of San Francisco in video form. (Special thanks to Apple for releasing them so expediently!)

Normally I am fairly un-enthusiastic about watching videos to learn. I’m much more of a do-er than a view-er. I’ve got to be working with the code in order to absorb a new programming language, so the Swift videos in particular have been somewhat frustrating. I did spend most of Tuesday with the OSX 10.10 and Xcode 6 betas, and Swift specifically, but after spending a lot of unnecessary time tripping over syntax, grammar, (and copious crashes) decided to go back to videos (and getting some actual work done).

My impressions of Swift are pretty mixed. On one hand, I love that they’re trying to make a language that is simultaneously more accessible and also less prone to bugs. That is as fantastic and commendable as it is self-serving. On the other hand, I’m not yet convinced it’s going to be an instant switch for me. I had lots of little niggling problems with the syntax. For example, I’m not sure the benefit of declaring strongly typed variables using generic keywords (var and let). In the c-based syntax languages I know and love, you declare the variable with the type. So in swift:

var view = UIView()

vs Objective-C:

UIView *view = [UIView new];

Now, the first example isn’t ambiguous or anything, but how about this one:

var views = UIView[]()

This is how you declare an array of UIView objects. I do like that it will always (and can ONLY) be an array filled with UIView objects, but I do think it’d be incredibly easy to miss the brackets. Overall though, most of the problems I had weren’t with the language itself, but with the tools, which I think are just not ready yet. I mostly agree with Austin Zheng when he says (from the comments of his 2048 port to Swift): “Xcode is as unstable as always. The background compiler/code analyzer kept on crashing and restarting itself. Xcode was functional enough to allow the project to be brought to some state of completion. The debugger is horribly broken though.”

All my video learning this week actually started on Monday (while waiting for the WWDC keynote to start) with watching Facebook’s video on building the paper app. This is also the one in which they announced their open-source animation framework pop. (And was recommended to me to learn about why it might be useful.) At an hour and a half, it’s a long video, but worth watching not just for the pop stuff (which is absolutely interesting, particularly if you already use Core Animation in your code), but for a multitude of other insights into how Facebook writes it’s apps. (There is some seriously interesting iOS engineering going on over there, something I did not expect given their history and track record, particularly in the quality department.)

Finally, yesterday (after fully maxing out on more WWDC videos), I randomly stumbled onto a talk about SpriteKit and grid-based games. The first half of the talk, by Scott Kim goes into great detail about several different kinds of grid-based puzzle games (on iOS specifically). He more or less breaks the talk into categories organized by gesture, which I think is an arbitrary distinction. (I’ve talked before about how I think the best games provide both tap and drag control schemes that are not incompatible.) Otherwise I think he does a really great job with the topic, and while it’s nowhere near comprehensive, it’s a very nice introduction / survey of the topic. This is very close to a talk that I’ve been thinking seriously about writing. (I first mentioned this idea in a previous blog post.) But since I haven’t (yet) written my taxonomy of grid-based games, Kim’s talk is, at the moment, much better than mine.

For The Win app — relaunching soon & app store rejection

Friday, April 4th, 2014

003.ftw_splash@2xSo I mentioned in a previous post that the For The Win app I worked on for Tasty Minstrel Games was removed from the app store, (embarrassingly right before I spoke about it at GDC). When I emailed Michael at TMG, he revealed that it was just not making enough money to justify paying the $99 to apple to keep it there, and he was happy to let me put it back in the app store under my own account.

So I spent some time last Friday and updated it for iOS 7, fixing a few minor cosmetic bugs here and there, finally submitting it around the end of the day.

Long story short, Apple rejected the app, for the following reason: “11.1: Apps that unlock or enable additional features or functionality with mechanisms other than the App Store will be rejected” They clarified with the following statement: “We found your app inappropriately unlocks or enables additional functionality with mechanisms other than the App Store, which is not in compliance with the App Store Review Guidelines. Specifically, your app allows users to unlock avatars by subscribing to a newsletter, following on Twitter, or liking on Facebook.”

Okaaaay… So a couple of reactions: 1. Obviously, this functionality was approved in the original app. But maybe they just didn’t catch it then. And 2. Doesn’t like every 3rd game in the app store do this? I mean, seriously, I see games giving extra currency for FB likes or even just twitter comments ALL THE TIME. Doesn’t candy crush unlock each level pack with Facebook interactions? (Although now that I think about it, those interactions take their friends back into the app, which is maybe how they get around this issue.)

Alright, so my arguments probably amount to “But everybody else does it!” I’ll be making some changes to just give everyone the avatars all the time (and probably re-word the achievements) and upload a new binary… probably sometime later today.

Oh, and by the way, since the app was in the store for about a year, and presumably some people paid for it in that time, I’m just going to put it up again for free. So the folks who downloaded it before can get it again without having to pay. I am considering adding the following functionality in an update: making it Universal, and asynchronous multiplayer. If and when I do that, I’ll probably shout about it some, and then make it paid again.

Five Years in the App Store

Saturday, March 29th, 2014

It’s pretty amazing that it’s been five years today since I had my first app approved.

Screen Shot 2013-11-21 at 11.23.05 AM

It’s been a fun ride.

What kickstarter could teach Apple about app discovery

Thursday, May 17th, 2012

A few weeks ago, Kickstarter fairly quietly launched the ability to “follow” other Kickstarter users. I can’t find a blog post to link to, though the feature is mentioned in their “This week in kickstarter” post just before they had their 3rd anniversary post. I’m fairly certain I noticed it, but didn’t think much of it until they called out the “friend finder” they had also created (with some kind of notification in the site’s header).

The long and the short of it is that I linked-up my facebook account and now receive an email when certain of my friends back a project on kickstarter. So far, sometimes this is just noise, but sometimes, as with the AmplifiEar project a couple of days ago, I find a new project that a friend is backing that I’ve never even heard about.

Obviously, the conclusion here is that I want this feature for the app store. Apple already put “social” into iTunes with Ping, and I’m a bit worried that they’re going to say that experiment failed, and not carry it forward into the app store. On the other hand, they bought Chomp recently, presumably acknowledging that they have a problem with app discovery.

Maybe the correct place for this type of thing is in Game Center, where we already have game recommendations. (Although there is no indication why those games are recommended.) Of course we also have a friends list there. You can even see what games they own, and the ones they’ve played most recently! Why not add the option to get notified when they actually buy these games? Ideally, I want this in email form, because I’m not going to remember to open up the Game Center app with any real regularity. (And a push notification is just silly, for this, I think.)

While I’m requesting Game Center features. (Don’t get me started.) I sure wish I could embed my Game Center profile in this blog post. (I’ll just include a screenshot here instead.)