If you’ve ended up on this page, you are probably already familiar with what goes into an ANE for iOS and an ANE for Mac OS. You also know that one of the main ingredients for these is the AIR SDK and its interface for these two platforms: the AIR C API.
Now, when you try to include that in your iOS or Mac OS native library, Xcode helpfully asks you whether you want the API’s header file, FlashRuntimeExtensions.h, copied into your project. What should you do?
Yes, but why?
If at this point you are asking yourself:
- ‘What is AIR SDK and why do I need it?’ Then check out this post: What goes in your iOS Native Extension?
- ‘Yeah, but why does it matter?’ Then read on.
- ‘Well, I seem to get confusing advice in every blog post I read. What do I do?’ Keep reading.
I seem to mostly run into articles that religiously advice to NOT copy the file without telling you why. That’s a bit like telling you not to eat cucumbers. Fine, but why?
So, what’s your situation?
a) work alone and always check your project out and build it on the same machine;
b) work on a team where everyone has the same setup and the AIR SDK is installed in the same location for everyone, then by all means don’t copy the file to your project.
This will save your repository 20KB.
If you, on the other hand,
c) work with your cousin Jimmy or have a couple of differently set up development machines and don’t want to waste time supplicating Xcode every time you check the code out and it complains that it can’t find FlashRuntimeExtensions.h, then do yourself a favour and add those monstrous 20KB to your project. And your repository.
Over to you
So. Did you copy it? Did you?