Asserting your way in ActionScript and Objective-C

We often get asked “what’s with all those assert statements in your code”? This concept was hammered in my head when I was a junior programmer, so I feel kind of old every time I am asked to explain it. But hey… An assert is usually defined as a “debug-only macro that aborts execution if its argument is false”. (See Steve Maguire’s Writing Solid Code) In other languages, like ActionScript, where you don’t have macros, you can use other techniques to achieve the same effect. The idea is that you use an assert as a diagnostic tool to help you Read More

Categories: AIR Native Extensions and Tutorials.

How ActionScript data is represented in C

Welcome to the first tutorial of the Translating between ActionScript and Objective-C series. Before we get on with data conversion, we need to have a word about how the ActionScript types are represented in the AIR C API, which is what you use when you make iOS Native Extensions for AIR. Most of the data you will be passing around will be either an argument of a function you call or a result of a function you call. Share on: WhatsApp Read More

Categories: AIR Native Extensions.

Translating between ActionScript and Objective-C

… and how to keep your cool while doing it. So you took the cross-language rout of programming. It’s fun, it provides variety and it often feels as if you are a tour guide for families visiting each other’s countries. Done that in real life, trust me. You have several people tugging at your sleeve and asking things like “So what’s that in Canadian dollars?” or “I don’t speak ounces. Why won’t they use the metric system?!” Usually all at the same time, as everyone knows it isn’t impolite if you interrupt in a foreign language.   Share on: WhatsApp Read More

Categories: AIR Native Extensions and Tutorials.

How to add event handlers to the AppDelegate in Objective-C

When you are working on a Native Extension for iOS, as a rule, you don’t have direct access to your app’s AppDelegate class, which is how you control UIApplication. Suppose you want to intercept events in your app either before they get to the ActionScrip (AIR) side or because they won’t get there in the first place. This tutorial will show you how to do it. Share on: WhatsApp Read More

Categories: AIR Native Extensions and Tutorials.

Easy Native Extensions Book – second edition

The Easy Native Extensions eBook proved itself as a must have in the tool set of an iOS ANE developer for the last couple of years. As some of our readers put it: Read more testimonials here. New edition coming out on June 10th 2015 Keep reading to find out what’s new in the second edition. Free update for first edition readers The new edition of the book comes with a lot of added value and the new prices will reflect that. Share on: WhatsApp Read More

Categories: AIR Native Extensions.