Under The BridgeUnder The Bridge

Musings
Implementing NSCoding

Yep, we’ve had a bit of a break wandering around some odd bits of the backyard, as you may have noticed from the recent dearth of posts, we’ll get back on track soon no doubt; but here’s a good read from the last week that jumped out at us flipping through what everybody else was posting while we were off playing with the seals (and whales, and dolphins, and leatherback turtles, …):

Friday Q&A 2010-08-12: Implementing NSCoding

Even if you’re pretty sure you know how to implement NSCoding already, it’s probably worth a read for subtleties that may have escaped you so far.

App Exchange

[EDIT: Discontinued.]

Want to buy an app? No, not just a copy of it, the whole app? Well, look what’s here, App Exchange!

Why buy an app?

  • Have an app idea and know how to make the app successful? May be someone already made a basis for your app and is looking to sell it.
  • There are a lot of apps in AppStore, which came close to greatness and require just a touch up (pr, marketing, design) to become bestsellers.

Why sell an app?

  • Have a great app but do not have much time to promote and support it? With App Exchange you may find a new home for your app.
  • Have a technology savvy app, which can become a base for number of other great apps? List your engine for sale at App Exchange.

Indeed. I imagine most of you, Dear Readers, are more interested in selling than buying, so let’s see what the submission process is:

If you have an app for sale, please send an email to contact@iphoneapplicationlist.com describing the app details for potential buyers. Please include history facts such as release date, number of downloads, number of active users (where applied), specify if you provide the app with the source code and whether maintenance is possible.

Note: Apps that have been released more than a year ago and haven’t achieved significant sales/downloads results will not be listed in App Exchange gallery.

Hmmm. Kinda seems that would be the only kind that would be for sale at a reasonable price … but hey, you never know. There’s 14 apps listed there as we type, so maybe one of them is just the kind of thing you’re looking for!

Bandwidth Testing

[EDIT: Discontinued.]

Here’s a handy tool for simulating slow network connections:

speedlimit is a Leopard preference pane for limiting your network bandwidth to one of a couple different speeds—768k DSL, Edge, 3G, and Dialup. This is really handy for testing your iPhone app under normal Edge network conditions in the iPhone Simulator. The new version allows you to restrict the slowdown to only a specific set of hosts.

SpeedLimit.png

Download it here or check out the source code.

h/t: iOS Development Goodies!

Numbers Posts

So in case you missed @rwenderlich‘s tweet, here is an informative article if you’re interested in

Everything You Need to Know About Being an Android App Seller

The money quote, or more appropriately the lack of money quote (Ha-ha! We slay us, we do!) is:

… even high-profile, highly rated Android titles generate “much lower” revenue than iPhone equivalents. Despite having one sustained top-selling $5 game (Retro Defense), a consistent fifth place seller (Battle for Mars) and being highlighted by Google, the company’s daily average revenue was just $62.39 for all its apps combined…

Ouch. Well, that certainly alleviates any annoyance we might have considered feeling that Canadian developers can’t sell Android apps YET (seriously, Google, WTF?) doesn’t it now? By comparison, this article says

… an iPhone app with a fifth place position in the App Store is predicted to earn about $3,500 per day, or more than what the same Android title would generate in 56 days…

Yep, 56x that’s a pretty big difference. Of course, most of us do not have a fifth place position anywhere in the App Store, at least not for very long. Here’s some numbers posts that we’ve idly noted over the last little while to give some more data points than that fifth place seller. Of course, we’d fairly confidently predict that anyone not at fifth place would find Android development just as comparative a massive debacle, but hey you never know.

iPhone App Sales, Exposed

Winning The App Store Lotto: What A Week At No.1 In The App Store Looks Like

Making A Living (Comfortably) On The App Store

Paperless So Far – The Apple App Store

The Anatomy of an Epic App Store Sale: 1.1M downloads in 1 WEEK

Big Mountain Snowboarding history and sales

Camera+ first month sales: Setting Sail in a Sea of Games

UPDATES:

Story Tracker – A Year on the App Store

And for a full post-mortem on a really quite stunning indie game debut, check out

Chopper 2 Postmortem

Our most gracious thanks to all of those sharing their sales for our edification and fascination. And as always, if there’s any recentish posts of this sort we’ve missed, be sure to let us know!

BSPreviewScrollView

[EDIT: Discontinued.]

Here’s a nifty UI enhancement for your scrolling views:

Do you like the way application images are displayed in AppStore or the way Safari flips between tabs? This post contains a complete horizontal, paged UIScrollView with preview control.

Alexander Repty posted a sample on his blog and my sample is based on his work. I’ve encapsulated the solution into one, easy to use, control…

In case you’re drawing a blank, the “preview” bit is to have items right and left show a bit of themselves as opposed to having each item full screen width, like this:

Screen shot 2010-08-06 at 11.34.46 PM.png

If that looks like something you’d like to try, read the post and grab the sample app!

Zeroing Weak References

So a couple of weeks ago there was this post

Friday Q&A 2010-07-16: Zeroing Weak References in Objective-C

… For this week’s Friday Q&A, Mike Shields has suggested that I talk about weak references in Objective-C, and specifically zeroing weak references. I’ve gone a bit further and actually implemented a class that provides zeroing weak references in Objective-C using manual memory management…

which was moderately interesting, if something we’d have to have a really clear need for before going to that much trouble; but the followup

Friday Q&A 2010-07-30: Zeroing Weak References to CoreFoundation Objects

is really interesting; there’s information on toll-free bridged objects and the structure of CoreFoundation classes there we hadn’t stumbled across anywhere else, and is most definitely worth a read through to get a better handle on how that black voodoo casting magic actually works behind the scenes. Besides, we just love stuff like this:

… Implementing this solution requires overriding the CoreFoundation finalize function. CoreFoundation has no supported mechanism for this, so I had to get down and dirty with the CF source code and hack my way in. This means that everything I’m doing is not entirely supported and could break, although I believe that this stuff is actually pretty stable…

Doesn’t that just scream ‘famous last words’ candidate to you?

… This kind of hackery is extremely challenging but it’s also a lot of fun. The CoreFoundation source code is a valuable resource for this kind of thing, but as always you must beware of private symbols which may change in the future. Other low-level open source code like the Objective-C runtime can also be a handy read. Finally, otx is an extremely useful tool for when you need to see how a library works when Apple doesn’t provide source…

Priceless. Next time somebody sounds off about our programming obsessiveness, we know exactly who to point to as an example that compared to real programmers, it’s like we’re not even trying.

Joypad Controllers

Here’s a few links for stuff that may be of interest putting together controls for That Next Great Game:

SneakyInput

A collection of input methods for Cocos2d iPhone game development. It includes a Joystick, a dPad, and Buttons, all entirely skinnable and customizable…

The LevelSVG joystick code, separately available.

Good discussion here.

h/t: iPhone Friend via iOS Development Goodies!

UILocalNotification

So if you’ve haven’t looked into these new UILocalNotification thingys in iOS 4 yet, there’s a good introduction here:

iPhone Programming Tutorial – Local Notifications

but there’s a couple somewhat rough edges around them, unless we’re missing something:

1) Recurrence interval must be an CFCalendarUnit flag. Just the flag. So you can set something to recur every day, or every week, but not every three days. That seems rather odd.

2) Seems the application’s badge is always set to the number included in the notification, not the number of notifications that have triggered. So unless you go to the trouble of clearing out the pending queue and fixing the numbers in each of them every time the thing you’re notifying about is handled, or each time that something’s inserted in the queue of notifications, there’s no way to have the application show an accurate number of items pending.

Are we just overlooking stuff that’s completely obvious, Dear Readers, or are these actually the moderately annoying shortcomings which they appear to be?

How Social Games Ate Our Lunch

So you left as baffled as us by this whole Farmville thing? Here is an excellent article for you:

How Social Games Ate Our Lunch

… It’s unintuitive to think that games where you actually do not ever directly interact with another person could have a community, but what social games do is generate an asynchronous cloud of persistent community formed by the constant exchange of gifts, tools, and requests sent by other players. It’s generosity-driven, but transactional – if I send you a gift, I’m feeling happy because I helped you out (especially if I’m responding to a request you’ve put out), but I’m also hoping you’ll send me something back. And the more I send and receive, the more I plant, the more I return every day (or more than once a day) – the more hardcore my play becomes. Watch a hardcore FarmVille player. They move fluidly and attentively around the tiniest change in mechanics, and play not for some whimsical dollhouse experience but for tight, fast, controlled optimizations, seeking the fastest path to a clear goal, and putting in as much time as it takes to get there…

Okay, but we’re still not seeing, like, the point here.

… What World of Warcraft did to Everquest’s mechanics – making them smoother, faster, and more elegant, and so earning unprecedented millions of players – FarmVille, though we don’t like to admit it, did to World of Warcraft. FarmVille distills the active components of a game down to a handful of clicks, and massively leverages social and viral communication channels to create the feelings of shared mission and victory, all while carving out a player-expressed space in the online world. And while it’s doubtful that even its creators would call FarmVille “elegant,” it is the first step in a new evolution of games, new (and resented) the way World of Warcraft was in the beginning – and its mechanics are so powerful that it has compelled a head-popping number of new gamers even without being polished the way WoW was…

Yikes. We’re not completely sure whether to be flabbergasted or horrified at this evolution of gaming, because we sorta have the apparently old school idea that a game ought to be, you know, fun, and these seem a lot more like work, but hey, the argument does hold together well, so if you’re interested in game design it’s definitely worth a read!

h/t: @gaminghorror!

atPeek

[EDIT: Discontinued.]

Feel like snooping around other people’s apps? Hey guess what, there’s an app for that:

atPeek is a developer tool designed to explore and display resources found in iPhone applications. Its simple and intuitive interface allows to effortlessly examine normally unaccessible application details. atPeek can export individual assets or entire folders and its unique feature is its ability to decode both crushed iPhone PNG images and PVR textures back into standard PNGs.

Even if you’re not particularly interested in other people’s stuff, these QuickLook plugins might be handy:

You can separately download the PngUncrush (32-bit and 64-bit Universal) and PvrUncrush (i386 only) QuickLook plugins, which we have developed for atPeek. Simply copy them to /Library/QuickLook folder and you will be able to preview iPhone crushed PNG images and PVR textures right from the Finder (or any other QuickLook enabled applications).

h/t: iOS Development Goodies!