Converting my app to run on iOS6

This was fairly painless apart from the orientation stuff changing somewhat in iOS 6. The main problem being that preventDefault() is now depreciated as iOS 6 handles things in a different way.

There's some useful stuff here about it:
http://forums.adobe.com/message/4735407

My Unix Time app is set to only be in landscape, but i do want it to auto-rotate between the 2 landscape orientations. As it turns out things are much easier and the old way seems to be much more of a hack. what i did was set the Aspect Ratio to be Landscape (before it was auto), removed all the preventDefault() stuff on the StageOrientationEvent and added the line 'stage.setAspectRatio(StageAspectRatio.LANDSCAPE);' into the constructor function. Everything worked fine after that.

To publish the app and get it to work for iOS 6 I ended up getting a new provisioning profile, though i'm not sure if that was necessary. I also downloaded the new Xcode and the latest Air SDK - this allows you to build the app using the terminal. Or you can use Flash CS6 and add the new SDK very easily using the help menu > manage Air SDK - which is a very very handy addition.

If you're going to use the terminal heres an example of the code you can use:

/Users/alistairmcclymont/Documents/Air/3.5.0.600/bin/adt -package -target ipa-ad-hoc -provisioning-profile /Users/alistairmcclymont/Documents/ios/provisioning\ profile/distrib/adhoc.mobileprovision -storetype pkcs12 -keystore /Users/alistairmcclymont/Documents/ios/certificate/distribution2/mcclymontiOScertificate.p12 -storepass mypassword unixtime.ipa unixtime2-app.xml unixtime2.swf -extdir ext/ -platformsdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk Default.png icons/icon6/512.png icons/icon6/48.png icons/icon6/29.png icons/icon6/57.png icons/icon6/114.png icons/icon6/72.png

i've yet to see which is better the above method or doing it directly through CS6, the only difference as far as i can tell will be with the iPhone SDK version - i'm not sure what flash has (though i've just updated). Anyone want to give me any hints on that...

Tags:

Add new comment