Archive for March, 2009

Poses Volume 2

Excellent, excellent. Apparently whatever it was that held up Poses Volume 1 for almost two months, Apple’s over it now; in a matter of just a few days from submission, we present for your further photographing pleasure, Poses Volume 2: The Second Female Collection!

splashscreen

Pretty much the same code as Volume 1 with new pictures … but there didn’t really seem to be much need to change anything, with reviews like

‘Great app for a photographer like me!’ — Michaelfoy

‘Well worth $9.99 … Thanks for a great app.’ — lerxst 1

‘Great tool for a Photographer.’ — shutterheadnut

‘A great resource for both photographers and artists alike.’ — cedsaid

‘This is a very well thought out and produced app … Well done!’ — Blackswanbazaar

*pat pat* Yes, yes, nice work there, indeed. And we’re sure that this one will do even better. So click the badge and join the fun!

Poses Volume 2

Continue Reading →
1

Sorting NSArray

Here’s an excellent article on how to do optimized NSArray sorting and NSMutable Array sorted inserts.

NSArray admits to sorts being a slow operation, and adds a method pair for comultive sorts using hints. This way the operation is done inO(P*LOG(P)+N) time, instead of O(N*LOG(N)). Where N is number of elements, and P is number of additions and deletions since the last sort. Unfortunately that do not work on NSMutableArray. So even if memory consumption will not hit the roof, release retain cycles will take it’s toll.

So why not add methods to find the insertion points, and insert new objects into already sorted NSArray and NSMutableArray object? Best case for inserting single elements should be O(LOG(N)^2), so lets hit that target. And on the way there, we will learn how to;

  • Add functionality to standard classes using categories.
  • Implement high performant Obj-C code for tight loops.

Good stuff, indeed. Here’s the code; take a look if you do Cocoa programming on either the desktop or iPhone!

h/t: LinkedIn’s Cocoa Touch!

Continue Reading →
1

Advertising & Analytics

So you’ve probably at least pondered putting some advertising and/or analytics into your application releases, and here’s a roundup of the most popular products for that:

For Revenue:

  • Medialets : Insert ads into your application using easy to drop in Objects, also track your users interaction with your application, earn a CPM.
  • AdMob : Offers ads for your iPhone using Javascript” code. AdMob has been around for a while and has publisher solutions for mobile phones, not just iPhone applications.
  • PinchMedia : Offers ads and analytics for your iPhone application, exclusively for iPhone applications.
  • [EDIT: You knew it was coming ... Google AdSense for Mobile Applications Beta!
  • [EDIT: And here's yet another ... Greystripe!]
  • [EDIT: Oh look, they just keep coming ... Smaato!]
  • [EDIT: Quattro! VideoEgg! Millennial Media! JumpTap! MdotM! They're everywhere! EVERYWHERE, I tell you!]

Mediation layers:

For Ad Swapping:

  • PurpleTalk : PurpleTalk allows you to join an advertising exchange with other iPhone developers. You earn advertising views of an advertisement for your application when you advertise others. You do not make money with these ads however it is a free way to increase the adoption of your own application.
  • [EDIT: Social Gaming Network has an exchange program now!]
  • [EDIT: And Admob has AdMob Download Exchange!]
  • [EDIT: And some indies started their own little App Treasures exchange club!]
  • [EDIT: Flurry is beta-ing Flurry AppCircle™!]
  • [EDIT: How about Chartboost?]

For Analytics:

  • PinchMedia : Offers analytics for your iPhone application, exclusively for iPhone applications.

And as time goes on, there’s an ever expanding cornucopia of choices in the analytics category:

POSTSCRIPT:

And don’t miss reading this white paper from Skyhook Wireless about all monetization strategies, not just ad serving!

Continue Reading →
10

Ad Hoc icon

Isn’t it annoying when you do your Ad Hoc distributions that your pretty application icon doesn’t show up in iTunes? Well, here’s the trick — fake yourself a folder that looks like an iTunes distribution:

iPhone developer Malcolm Hall explained how he sets up his Ad Hoc applications so they’ll display the proper image. He creates a folder in which he places two items: the first is a JPEG image called iTunesArtwork, the second is a folder called Payload. He adds the app bundle (Whatever.app) into the Payload subfolder, zips up the entire thing and renames the zip file toAppname.ipa.

This ipa package (ipa stands for iPhone application) mimics the way that Apple provides applications for iTunes. When iTunes sees the iTunesArtwork file, it uses it to create the image seen in the Applications library.

The iTunesArtwork file should be added without an explicit extension. Hall suggests you use Get Info (Command-I) and remove the file extension before zipping it up. (You can also remove the extension at the command line.) Use a 512×512 image for the art.

Which describes the layout

- yourapp.ipa (zip renamed to ipa for iPhone Application)
        - iTunesArtwork (512x512 JPEG with no extension)
        - Payload (Folder)
                - yourapp.app (as produced by Xcode)

There you go. Now you can look properly professional with your Ad Hoc distributions! And it’s all about the looks, isn’t it now?

Continue Reading →
0

Code: The Three20 Project

Chances are you’ve heard that Facebook Connect for iPhone was released as open source. No, we’re not going to waste a post on that; there’s a much more interesting piece of news from Joe Hewitt, the maestro responsible for that and the Facebook iPhone application; he’s gone to the trouble of refactoring all sorts of goodies developed for Facebook into The 320 Project. Goodies like:

TTPhotoViewController emulates Apple’s Photos app with all of its flick’n'pinch delight. You can supply your own “photo sources”, which work similarly to the data sources used by UITableView. Unlike Apple’s Photos app, it isn’t limited to photos stored locally. Your photos can be loaded from the network, and long lists of photos can be loaded incrementally. This version also supports zooming (unlike the version in the current Facebook app).

TTMessageController emulates the message composer in Apple’s Mail app. You can customize it to send any kind of message you want. Include your own set of message fields, or use the standard “To:” and “Subject:”. Recipient names can be autocompleted from a data source that you provide.

TTImageView makes it as easy to display an image as it is in HTML. Just supply the URL of the image, and TTImageView loads it and displays it efficiently. TTImageView also works with the HTTP cache described below to avoid hitting the network when possible.

TTTableViewController and TTTableViewDataSource help you to build tables which load their content from the Internet. Rather than just assuming you have all the data ready to go, like UITableView does by default, TTTableViewController lets you communicate when your data is loading, and when there is an error or nothing to display. It also helps you to add a “More” button to load the next page of data, and optionally supports reloading the data by shaking the device…

Wow! And there’s much more too. Source is all up on github under the Apache license, and there’s a Google group with pages here. Great stuff, and we recommend you check it out!

h/t: InfoWorld!

Continue Reading →
1

Contextual UIToolbars

Here’s an excellent post on how to manage UIToolbars in nested views … at least if you need to do it right now; we note that the quote below includes some NDA-breaking statements [EDIT: Apparently this was actually mentioned on the public slides at the OS 3.0 dog and pony show -- in which case it's not under NDA, pardon our paranoia] if it is indeed correct, which of course we therefore have no statement on ourselves. But we’ll cheerfully pass along what other people say!

The new release of iPhone OS 3.0 adds some nice API:s for managing a contextual toolbar. This is well needed as toolbars in the current iteration of iPhone OS is not only poorly documented, it is also quite hard to do right. So I will go over how to do toolbars the right way, for all who want to implement them the old way before this summer, and for all who think they need to support older versions after then …

Looks more or less along the same lines as how we’ve done this kind of thing, but rather more elegant. So if you have a design like this,

layout_correct

 

download the code and take a look! 

h/t: LinkedIn’s Cocoa Touch!

Continue Reading →
2

Vonage Pro Companion

Always nice to see a project we worked on finally emerge blinking and shuffling into the light of day, and today we’d like to draw your attention to Vonage Companion™ for the Mac!

vonagecompanion

This is the latest in a long series — waaay back in the day when CounterPath was still known as Xten Networks, we came on board as employee #3 to do the port of the original X-Lite SIP phone to the Mac to fulfill their new contract with, wait for it, Vonage. And several product cycles later, after Vonage having a brief flirtation with an other, lesser, SIP softphone provider, there we were sorting out a Vonage client for them again. Nothing new under the sun, and all that.

Any-ways, we certainly encourage you to check it out if you’re a Vonage using person!

Continue Reading →
0

Source: Wolf3D

Wow. Not only has His Awesomeness John Carmack ported Wolfenstein 3D to the iPhone

… he’s released the code as open source.

There’s a 5100-word development document which you can read at the official website, but here’s the short readme:

The original Wolfenstein 3D code was written in late 1991 / early 1992 using 16 bit Turbo C and the TASM assembler and targeted at 286 based MSDOS systems with VGA graphics and ideally a bit of extended or expanded memory.

I released the original source for Wolfenstein 3D many years ago, originally under a not-for-commercial purposes license, then later under the GPL.  The old code is still available in various places ( http://www.btinternet.com/~belowe/ ) but it isn’t very useful on modern platforms.  There are several open source projects that have modernized the code so that it works on 32 bit systems and can take advantage of OpenGL acceleration.  I started the iphone version with the Wolf3D Redux codebase ( http://wolf3dredux.sourceforge.net/ ), which apparently incorporated a lot of code from NewWolf ( http://newwolf.sourceforge.net/ ).

At first, I considered trying to build the iphone version as a patch, but when I decided to turn the little research project into a commercial release (and do it in a hurry), I started making more wholesale changes.  The Redux codebase had basically gutted the Quake 2 codebase and grafted Wolfenstein into it, which had some nice points, but it meant that the system code was many times as large as the actual Wolfenstein game code.  It wasn’t really hurting anything, and I considered leaving it all in, but it was such a mess that I finally flattened everything out and cut out about half of the environment code.  No attempt was made to make this project portable, although it wouldn’t be very hard to clean that up.

In the past, Id source releases did not include any data files, and you had to extract data files from a commercially obtained version of the game if you wanted to experiment with the original game data.  Because it isn’t possible for users to tear open an app bundle from the App Store to get at the data, I am including it with the source code to make it easy.  You are on-your-honor to buy a copy at the App Store before using the data. :-)  The source code is under the GPL, but the data is still strictly copyright Id Software with no license given to distribute outside this code release package or to use for any commercial purpose.  You are certainly free to replace all the data and make commercial applications, as long as the code is made available under the GPL.

/newCode/wolf The 32 bit Wolfenstein code

/newCode/env The Quake 2 derived code

/newCode/iphone The newly written iphone code and xcode project files

/newCode/Tremor Unodified ogg Tremor code for the background music

/base Game data

I can’t say there is a lot of really good code here — the wolf code is mutated, the quake 2 code is vestigial, and the new code was written in a hurry, but it does all hang together as a pretty fun game to play, and a good testbed for various things.

If anyone does build another quality commercial application based on this code, let us know, and we can probably do some kind of cross linking.

John Carmack

2009/03/20

There you go. From the hands of the master to you!

h/t: ipodNN!

Continue Reading →
0

Code: NSDate (Helper)

Ever want to do friendly relative date/time formatting of NSDate timestamps in your application? Like this?

nsdatehelper

Well, here you go, now it’s as easy as

self.dateLabel.text = [NSDate stringForDisplayFromDate:date];

Very cool, indeed! Source on github here.

h/t: iPhoneKicks!

UPDATE:

RelativeDateDescriptor describes relative date intervals!

Continue Reading →
1

Summer of Code

So, do you know any students looking to build up their programming résumé this summer? Or are you a student looking to build up your programming résumé this summer? Well, there’s not too many better ways to go about it we think than applying to Google Summer of Code™ 2009:

Google Summer of Code (GSoC) is a global program that offers student developers stipends to write code for various open source software projects. We have worked with several open source, free software, and technology-related groups to identify and fund several projects over a three month period. Since its inception in 2005, the program has brought together nearly 2500 students and 2500 mentors & co-mentors from nearly 100 countries worldwide, all for the love of code. Through Google Summer of Code, accepted student applicants are paired with a mentor or mentors from the participating projects, thus gaining exposure to real-world software development scenarios and the opportunity for employment in areas related to their academic pursuits. In turn, the participating projects are able to more easily identify and bring in new developers. Best of all, more source code is created and released for the use and benefit of all.

Sounds good, yes? Well, the 150 participating organizations have been selected, and the student application period begins at 12 noon tomorrow and goes until April 3rd … so it’s time to get cracking!

Whilst you can submit any proposal you like to these mentoring organizations, and there’s oodles of proposed projects that are relevant to iPhone development to some degree, here’s some mentions we skimmed of proposed projects on the various idea lists that are targeted directly at the iPhone, so clearly these organizations should be first on your short list if you’re looking to build up an iPhone oeuvre:

Globus:

“Grid Job Submission and Management from a hand-held (like iPhone, BlackBerry etc).”

NUI Group:

“write TUIO server for iPhone (sending TUIO events from your iPhone..)” 

“Touch App – propose innovative multitouch iPhone application or educational game”

“Gesture Implementation – write multitouch gesture recognition library for iPhone (defining your own gestures)

“Audio Analyzer – Basic audio analyst tool for iPhone (spectrum/sonogram/FFT)

“Accelerometer – Collects and sends Acceleration Data out via OSC”

Plan 9:

“Use the iPhone SDK to create a drawterm-like application to run on the iPhone, connecting to a Plan 9 system and making the devices on the iPhone available.”

Rockbox:

“Convert Rockbox to an application that runs on a Windows, Linux or Apple based cellphone, PDA, iPhone, or similar device that allows third party applications.”

OGRE:

“Enable running OGRE on an IPhone.”

XMMS2:

“Go crazy, experimental clients for iPhone, …”

There you go, lots and lots of fine iPhone ideas to write up a proposal for. Good luck, kids!

Continue Reading →
4
Page 1 of 3 123