We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.
Dear Adobe community,
Has anyone been able to take an existing FLA file in Flash Pro CS55 and 'publish' an swf file as version 14 (Air 3.1)? I'm trying to use a native extension for iOS on GitHub, but my app has been on Flash Pro and hence have been publishing, then using ADT to compile the native extensions I need. However, to use iOS5 features (and add additional frameworks from Xcode like MessageUI), the swf file has to be version 14.
With the latest Flash Pro CS55 update, my compiled SWF files are version 13, and when I try to publish an ipa-ad-hoc file, it tells me the "root swf file version" is 13 while the extension (I'm assuming library.swf) is in version 14. I've of course tried overlaying the Air 3.1 SDK over the appropriate directories within CS55, as I did with Air 3.0 SDK, but no go?
thank you and with kind regards,
Hm, I overlayed 3.1 using the same old overlay instructions and the XML schema points to 3.1. I assumed that was good enough to be outputting 3.1.
How do you verify the version you're even outputting on the device? I'm interested in if I'm still somehow using 3.0 myself.
I've overlayed 3.1 like you, but when I created a simple button that calls a native extension to pop open an sms or email composer page for iOS5 (per a GitHub repo here: https://github.com/pkoscierzynski/NativeMailExtension), when I use ADT to try to attach it, I get the error that the root swf (I'm assuming that's the compiled test SWF from CS55) version (13) is older than the swf in the extension (version 14). I've also updated my CS55 per adobe's update here: http://blogs.adobe.com/rgalvan/2011/11/adding-fp11-support-to-flash-pro-cs5-and-cs5-5.html, but seems to top off at 13, even with 3.1 overlayed. I wonder what I am doing wrong here.
I know what you mean. I'm wondering if there's a simple way to report what version of AIR was used in compiling an IPA, after you compile it. Not sure if System.capabilities or something similar might have a clue. I have 3.1 overlayed but from your post I wonder if I'm even using it. I'm using FP13. I don't see how the flash player matters when AIR is involved. I don't know where they internally overlap.
Can I ask why you need to use SWF version 14 in the first place?
I have native extenstions running just fine with SWF version 13 (and AIR 3.1).
I need swf-version 14, because (and please correct me if I'm mistaken), Air SDK 3.1 started support for being able to include non iOS-API-calls (beyond stuff like you see here on the samples: vibrate the phone, get battery level, pop up an alert, etc.). For example, being able to include the MessageUI framework to pop open an sms or email composer view, or features new to iOS5. You can now include a platform.xml file in the .ane file where your static library is, and include them like such:
<!-- to use the MessageUI framework -->
Ah, well it looks like you're mostly correct. The extensions I'm using can be built with platform xmlns set to "http://ns.adobe.com/air/extension/2.5", and can run with swf-version 13 (still Air SDK version 3.1 though). The 3.1 namespace does require swf version 14 though.
I'm not sure what functionality was added in the 3.1 namespace, I was under the impression that the native code was already capable of "non iOS-API-calls". If you're the developer of the extension, and not just an inept user of extensions (like me ) I would recommend trying to get the extension running in the 2.5 namespace, at least until Adobe brings all of its software up to date.
Try following this manual: http://kb2.adobe.com/cps/908/cpsid_90810.html
Replace existing AIR files with AIR 3.1 SDK and then change the version attribute of the player tag from 14.
Haven't tested it, but you can give it a try.
The answer is yes.
It took me a few hours to realise what was wrong. A while ago I overlayed SDK 3.1. I changed the version from 11 to 13 as suggested in step 12 in the instructions here:
I remember having some trouble with this, but it finally worked. Now I had to switch up to 14, and I had the same problem. It took me a few hours to solve.
There seem to be an undocumented issue with changing the version number in the players xml-files. It seems like the data from these files actually is stored inside the fla-file. This means that the data for a specific fla-file is not updated until you switch the Player-setting under Document>Publish. It worked for me after switching the setting to Air for Android and then back again to Air for iOS.
Hope this can help.
Switching the publish settings did the trick for me.
So far this is the only forum or place I have seen this suggestion, nice work and thanks for saving me the hours.
Between versions of flash you'll always need to overlay and 'lie' about the version.
Download the lastest 'release' player and debugger, place them, and add to the Common/Configuration/Players XML schemas to point to the correct flash .SWC.
This will probably continue to happen over and over until everyone buys Flash Builder (like I did).
I was able to overlay 3.0 but when I try 3.1, I continue to get this namespace error. Tried flipping it back and forth to different publish options and no success. Seems stuck. Any other way around this issue?
Hello huys, Why does it happenw ith Air Native Extension. I got error: "TypeError: Error #1009: Cannot access a property or method of a null object reference."
I have tried. But it doesn't work with Adobe Air SDK 18 because it hs bug?
I should description of extensions.xml with namepsace 18.0 ??
<?xml version="1.0" encoding="UTF-8"?>
<!-- This is the extension ID: the same unique string
you defined in WindowsExtensionWrapper.as -->
<!-- The name of the DLL file: -->
<!-- The names of the extension initializer
and finalizer functions you defined
in dllMain.cpp: -->
My c script for WindowsLibrary.dll
FREObject isSupported(FREContext ctx, void* funcData, uint32_t argc, FREObject argv)
uint32_t isSupportedThisOS = 1;
// Example C:\\Windows or D:\\Windows
FREObject getWindowsDirectory(FREContext ctx, void* funcData, uint32_t argc, FREObject argv)
const char *str = getenv("windir");
FRENewObjectFromUTF8(strlen(str)+1, (const uint8_t *)str, &result);
void contextInitializer(void* extData, const uint8_t* ctxType, FREContext ctx, uint32_t* numFunctions, const FRENamedFunction** functions)
*numFunctions = 1;
FRENamedFunction* func = (FRENamedFunction*)malloc(sizeof(FRENamedFunction)*(*numFunctions));
func.name = (const uint8_t*)"getWindowsDirectory";
func.functionData = NULL;
func.function = &getWindowsDirectory;
*functions = func;
void contextFinalizer(FREContext ctx)
void initializer(void** extData, FREContextInitializer* ctxInitializer, FREContextFinalizer* ctxFinalizer)
*ctxInitializer = &contextInitializer;
*ctxFinalizer = &contextFinalizer;
void finalizer(void* extData)
* Created on: 10.09.2015
* Author: Jens
__declspec(dllexport) void initializer(void** extData, FREContextInitializer* ctxInitializer, FREContextFinalizer* ctxFinalizer);
__declspec(dllexport) void inalizer(void* extData);
#endif /* WINDOWSLIBRARY_H_ */
public class WindowsLibrary extends EventDispatcher
private var _context:ExtensionContext;
public function WindowsLibrary(target:IEventDispatcher=null)
_context = ExtensionContext.createExtensionContext("net.sourceskyboxer.utils.WindowsLibrary.WindowsLibrary", null);
public function isSupported():Boolean
public function _getWinDir():String
return this._context.call("getWindowsDirectory") as String;
And i have tried with Adobe Air SDK 18.0 and i get ane file okay and i have imported to ane manager from Flash Builder 4.6 and i tested it
<?xml version="1.0" encoding="utf-8"?>
xmlns:mx="library://ns.adobe.com/flex/mx" layout="absolute" creationComplete="onCreationCompleteHandler(event)">
private var _winLib:WindowsLibrary;
protected function onCreationCompleteHandler(event:FlexEvent):void
protected function isSupportHandler(event:MouseEvent):void
txt.text = _winLib.isSupported().toString();
<!-- Platzieren Sie nichtvisuelle Elemente (z. B. Dienste, Wertobjekte) hier -->
<mx:TextInput id="txt" left="30" top="38"/>
<mx:Button x="30" y="69" label="Check Support" click="isSupportHandler(event)"/>
Than i got error:
ypeError: Error #1009: Cannot access a property or method of a null object reference.
Please help solution Thanks!