iPhone 5 Optimization Requirement

All applications as of the 1st of May must now support the iPhone 5 resolution.

iPhone 5 Optimization Requirement - Your binary is not optimized for iPhone 5. As of May 1, all new iPhone apps and app updates submitted must support the 4-inch display on iPhone 5. All apps must include a launch image of the appropriate size. Learn more about iPhone 5 support by reviewing the iOS Human Interface Guidelines.

There is a little trick to get your AIR application to use the new resolution, you need to include a new Default image, otherwise you're application will always appear in the iPhone 4's resolution.

This new image must have the following:

  • Named: Default-568h@2x.png
  • Resolution 640w x 1136h

And make sure you package it with your application.

Native Extension Tip // iOS Push Notification Custom Sound

Playing a custom sound when a push notification arrives from the Apple Push Notification Service (APNS) is quite simple.

This tip assumes you're using our extension and that you've already got push notifications running.

Firstly you need to create your sound and export as an iOS supported format, such as caf.

Then you need to include the sound to your AIR application and make sure it's packaged with the application. If you are using adt then you just need to make sure it's included as a packaged resource in your script / command line. In Flash Builder you should make sure the sound is checked to be packaged in the following location:

Project / Properties / Actionscript Build Packaging / Apple iOS / Package Contents

To play this sound you must specify the filename of the sound in the notification payload. For example, lets say you've added a sound file named example.caf into your application, we can play this sound with the notification payload as below:

  1. {
  2. aps =
  3. {
  4. alert = "test example notification message";
  5. sound = "example.caf";
  6. };
  7. }

Then the custom sound will play when your notification arrives.

Native Extension Tip // ld: unknown option

When packaging an iOS AIR application you may encounter the following error:

Error occurred while packaging the application:
ld: unknown option: -ios_version_min
Compilation failed while executing: ld64

As in the following screenshot:

This error simply indicates that the native extension you are attempting to package requires some features from the iOS SDK or a version greater than the one you are currently using. To remedy this, make sure you are using a recent version of the iOS SDK and correctly including it in your packaging options.

Native Extension Tip // ld: framework not found …

Continuing our series of help tips with using ANE's a very common error you'll come across is the one shown below, a linker error:

ld: framework not found ...
Compilation failed while executing : ld64

Continue reading Native Extension Tip // ld: framework not found …

ZAPPP – Mobile Apps

Distriqt has recently entered into a new relationship with One Meaning Communicated Differently. The new entity called ZAPPP will develop a mobile application platform for musicians in Australia.

This represents an exciting new direction for distriqt, and defines new areas of digital development we are now focused on.

We have developed apps for some of Australia's biggest bands, including The Living End, Angus & Julia Stone, Grinspoon, Josh Pyke, and The Getaway Plan - just to name a few.

Says co-founder Jai Al-Attas...

The whole point of starting ZAPPP was that we didn’t want to just create mobile versions of band websites and call them an App. We think that Apps are useless unless they provide value to both the user and the Artist, so we created the ZAPPP feature which allows the Artist to have a direct & meaningful relationship with the User by offering them exclusive incentives and rewards through the functionality of our Apps.

Objective-C // List methods of a class

This simple Objective-C code excerpt prints the methods and arguments of a class instance using the NSLog functionality.

  1. //
  2. // List the methods of the class instance "myClass"
  3. methods = class_copyMethodList([myClass class], &methodCount);
  4. for (int i=0; i<methodCount; i++)
  5. {
  6. char buffer[256];
  7. SEL name = method_getName(methods[i]);
  8. NSLog(@"Method: %@", NSStringFromSelector(name));
  9. char *returnType = method_copyReturnType(methods[i]);
  10. NSLog(@"The return type is %s", returnType);
  11. free(returnType);
  12. // self, _cmd + any others
  13. unsigned int numberOfArguments = method_getNumberOfArguments(methods[i]);
  14. for(int j=0; j<numberOfArguments; j++)
  15. {
  16. method_getArgumentType(methods[i], j, buffer, 256);
  17. NSLog(@"The type of argument %d is %s", j, buffer);
  18. }
  19. }
  20. free(methods);

Objective-C // Runtime Method Injection

While building our Actionscript Native Extensions we've had to learn a lot about Objective C for the iOS versions. One trick that we'd like to share is how to inject a method into an instance of a class at runtime. This is necessary for several of the extensions we've done and it took me a while to figure out how to do this so I thought I'd share.

Quick Links:

Continue reading Objective-C // Runtime Method Injection

Marija Ivkovic Portfolio Application

We've been so busy over the last few months that we haven't had a chance to update any information on what we've been doing.

So here's the first in a series of updates.

One of our clients Marija Ivkovic, an amazing photographer, whose site I did a while ago. In order to show to power of Flash we decided to turn her site into a mobile application, by taking the exact same code base from the site and applying a few small tweaks.

The end result was actually quite surprising for a direct port of a website. We obviously added some touch and swipe based interactions, removed the "mouse over" interactions and added in a nifty little database cache process to cache images for offline access, but overall the code base remained relatively unchanged.

We were very excited to be able to supply this as an option for development. Creating an interactive web and mobile application has never been easier or more powerful.

It's available for free for iPhone, iPod Touch and iPad in the App Store.

Available on the App Store