Archive for 'iPhone'

Source: SC68 Player

Here’s another nifty open source project for you to mine for code tips: the SC68 Player!

SC68 Player allows you to browse and play songs from the Atari ST SNDH YM2149 Archive on your iPhone or iPod Touch.The Atari ST music archive consists of old “chip”-music from games, and the Atari ST demo-scene that are in the public domain. A song is generally less than 10k and there is currently over 3000 songs available.

This is from the same fellow who did the sorted insert NSArray code we mentioned a couple days back, and there’s all sorts more interesting stuff in here. You particularly have to take a look at his awesome “VisualMoveQue” cell selection animation. It’s worth downloading the app just to check that out, even if you’re not into Atari ST music. Seriously.

SC68 Player

And once you’re impressed enough to think hey we are so doing something like that in our apps — download the code here and dig away in ‘UIWindow+VisualMoveQue.m’ to figure out just how he’s doing that neat trick!

Continue Reading →
1

Poses Volume 3

Woah. Apparently Apple felt bad about holding up Volume 1 or something, because Volume 3 got approved all but immediately. Cool!

v3splashscreen

So now we’ve got the project to transfer the Guide To Posing The Female Model to the iPhone all complete. w00t! It’s gone pretty pleasingly well — not a single negative comment anywhere at all about the application design or code quality. Matter of fact, there haven’t been any negative comments that aren’t either a) whining about price or b) palpably idiotic, like “Poses for porn.” (Mind you, after that last one, sales in that country’s store actually went up, so apparently the right kind of 1-star review is not a problem!) Any-ways, the point is, our work seems to be universally agreed to be topnotch, and hey, that’s the important bit. As always, you know you want to check it out for yourself, and here’s your link for that!

Poses Volume 3

Continue Reading →
3

3D Engine Roundup

Here’s a well worth your time to read up-to-date roundup of 3D engines for your iPhone development pleasure. To skip details, the two that came out on top by this fellow’s requirements we’ve mentioned before:

  • SIO2 Interactive, SIO2: An opensource (LGPL) game engine for the iPhone. It uses the Bullet physics library and 3D objects and scenes are prepared using the opensource tool Blender. The project offers many tutorials (16) some of which are screencasts. The project also boasts a healthy number (15) of deployed iPhone applications available in the AppStore. The engine has a free version that imposes a flash screen (advertisement for the engine), an indie version is available without this restriction for $50USD. The volume of developer documentation in the form of tutorials is great, although the seeming dependence on Blender to prepare the 3D models and scenes used by the engine may be a deal breaker if there is no programmatic workaround.
  • Oolong Game Engine (on google code): An opensource (MIT License) game engine for the iPhone with some credibility given that it was developed in large part by Wolfgang Engel, Rockstar Games‘ lead graphics programmer. It uses the Bullet Physics Library for 3D physics and fluid studios for memory management. It has seemingly been used in a small number of titles (3?) currently available in the AppStore and proposes that it was used as the basis for the iTorque Game Builder. The source code comes with a number of demonstrations, although developer support documentation and tutorials are really lacking, and the mailing list is quite empty. This might be an engine for hard core developers.

… but there’s a bunch of others listed which we had not previously been aware of. In particular, the Ston3D engine looks like a worthy alternative to Torque and Unity. If the commercial engine thing is your gig. Personally, we’re more along the mindset of this Jason fellow, so we’re definitely going to follow his experiences with the engines of choice!

Continue Reading →
2

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

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
Page 80 of 96 «...5060707879808182...»