Native extension on Mac OS X (Air 3)

Hi
I have a blocking issue for native extensions when targetting the MacOS-x86 platform. (in my case Snow Leopard)
I succeded in packaging the ANE file, but I have this error when using it in my test app:
[SWF] tekhnia.simpleAirNativeExtension - 2 871 octets après la décompression
[SWF] simpleAirNativeExtensionTest.swf - 2 119 250 octets après la décompression
Context: [object ExtensionContext] in /Users/vandrito/Documents/Projets/o3sui/.metadata/.plugins/com.adobe.flexbuilder.project. ui/ANEFiles/simpleAirNativeExtensionTest/macosx/simpleAirNativeExtension.ane
ArgumentError: Error #3500: The extension context does not have a method with the name isSupported.
          at flash.external::ExtensionContext/_call()
          at flash.external::ExtensionContext/call()
          at tekhnia.org.simpleAirNativeExtension::simpleAirNativeExtension/isSupported()[/Users/vandr ito/Documents/Projets/o3sui/simpleAirNativeExtension/src/tekhnia/org/simpleAirNativeExtens ion/simpleAirNativeExtension.as:16]
          at simpleAirNativeExtensionTest/init()[/Users/vandrito/Documents/Projets/o3sui/simpleAirNati veExtensionTest/src/simpleAirNativeExtensionTest.mxml:15]
          at simpleAirNativeExtensionTest/___simpleAirNativeExtensionTest_WindowedApplication1_creatio nComplete()[/Users/vandrito/Documents/Projets/o3sui/simpleAirNativeExtensionTest/src/simpl eAirNativeExtensionTest.mxml:5]
          at flash.events::EventDispatcher/dispatchEventFunction()
          at flash.events::EventDispatcher/dispatchEvent()
          at mx.core::UIComponent/dispatchEvent()[E:\dev\4.y\frameworks\projects\framework\src\mx\core \UIComponent.as:13151]
          at mx.core::UIComponent/set initialized()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UIComponent.as:1818]
          at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.y\frameworks\projects\framewo rk\src\mx\managers\LayoutManager.as:842]
          at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\4.y\frameworks\projects \framework\src\mx\managers\LayoutManager.as:1180]
In fact it seems that the initializer is not executed. This is my extension declaration file:
<extension xmlns="http://ns.adobe.com/air/extension/3.1">
   <id>tekhnia.simpleAirNativeExtension</id>
   <versionNumber>1.0.0</versionNumber>
   <name>tekhnia.simpleAirNativeExtension</name>
   <copyright>@2011 OpenTekhnia, Techniware</copyright>
   <platforms>
      <platform name="MacOS-x86">
         <applicationDeployment>
             <nativeLibrary>simpleAirNativeExtension.framework</nativeLibrary>
             <initializer>initNativeExtension</initializer>
             <finalizer>doneNativeExtension</finalizer>
         </applicationDeployment>
       </platform>
    </platforms>
</extension>
That's my *.m file in the xcode framework project:
#import "simpleAirNativeExtension.h"
FREObject isSupported(FREContext ctx,
                void *functionData,
                uint32_t argc,
                FREObject argv[]) {
    FREObject retObj;
    FRENewObjectFromBool(1, &retObj);
    return retObj;
// contextInitializer()
// The context initializer is called when the runtime creates the extension context instance.
void contextInitializer(void* extData, const uint8_t* ctxType, FREContext ctx,
                        uint32_t* numFunctions, const FRENamedFunction** functionsToSet) {
    *numFunctions = 1;
    FRENamedFunction* func = (FRENamedFunction*)malloc(sizeof(FRENamedFunction) * (*numFunctions));
    func[0].name = (const uint8_t*) "isSupported";
    func[0].functionData = NULL;
    func[0].function = &isSupported;
    *functionsToSet = func;   
// contextFinalizer()
// The context finalizer is called when the extension's ActionScript code
// calls the ExtensionContext instance's dispose() method.
// If the AIR runtime garbage collector disposes of the ExtensionContext instance, the runtime also calls
// contextFinalizer().
void contextFinalizer(FREContext ctx) {
    // Nothing to clean up.
    return;
// initMulticastSocket()
// The extension initializer is called the first time the ActionScript side of the extension
// calls ExtensionContext.createExtensionContext() for any context.
void initNativeExtension(void** extDataToSet, FREContextInitializer* ctxInitializerToSet,
                         FREContextFinalizer* ctxFinalizerToSet) {
    *ctxInitializerToSet = &contextInitializer;
    *ctxFinalizerToSet = &contextFinalizer;
// done()
// The extension finalizer is called when the runtime unloads the extension. However, it is not always called.
void doneNativeExtension(void* extData) {
    // Nothing to clean up.
    return;
and that's my .h:
//  simpleAirNativeExtension.h
//  simpleAirNativeExtension
//  Created by Victor Andritoiu on 17/10/11.
//  Copyright (c) 2011 OpenTekhnia. All rights reserved.
#import <Foundation/Foundation.h>
#include "Adobe Air/FlashRuntimeExtensions.h"
void initNativeExtension(void** extDataToSet, FREContextInitializer* ctxInitializerToSet,
                         FREContextFinalizer* ctxFinalizerToSet);
void doneNativeExtension(void* extData);
FREObject isSupported(FREContext ctx,
                      void *functionData,
                      uint32_t argc,
                      FREObject argv[]);
void contextInitializer(void* extData, const uint8_t* ctxType, FREContext ctx,
                        uint32_t* numFunctions, const FRENamedFunction** functionsToSet);
void contextFinalizer(FREContext ctx);
@interface simpleAirNativeExtension : NSObject
@end
And finally my AS3 code for the lib:
package tekhnia.org.simpleAirNativeExtension
          import flash.external.ExtensionContext;
          public class simpleAirNativeExtension {
  /** extension context */
                    protected var context: ExtensionContext;
                    public function simpleAirNativeExtension() {
                              context = ExtensionContext.createExtensionContext("tekhnia.simpleAirNativeExtension", "");
                              trace("Context: " + context + " in " + ExtensionContext.getExtensionDirectory("tekhnia.simpleAirNativeExtension").nativePath);
                    public function isSupported(): Boolean {
                              return context.call("isSupported") as Boolean;
and for the app using it:
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
                                                     xmlns:s="library://ns.adobe.com/flex/spark"
                                                     xmlns:mx="library://ns.adobe.com/flex/mx"
                                                     creationComplete="init()">
  <fx:Script>
                    <![CDATA[
                              import mx.events.FlexEvent;
                              import tekhnia.org.simpleAirNativeExtension.simpleAirNativeExtension;
                              protected function init(): void {
                                        var sane: simpleAirNativeExtension = new simpleAirNativeExtension();
                                        trace(sane.isSupported());
                    ]]>
  </fx:Script>
  <fx:Declarations>
  <!-- Placer ici les éléments non visuels (services et objets de valeur, par exemple). -->
  </fx:Declarations>
</s:WindowedApplication>
If anybody succeeded in using extensions on MacOS, please first tell me that s possible then, maybe help me on getting the error that I make.
Thanks a lot
Victor

Workaround found:
Need to launch adl as a line command (depends on your directory config, of course):
/Applications/Adobe\ Flash\ Builder\ 4.6/sdks/4.6.0/bin/adl -runtime /Library/Frameworks/ -extdir /Users/vandrito/Desktop/simpleAirNativeExtension/launch/extensions -profile extendedDesktop /Users/vandrito/Documents/Projets/o3sui/simpleAirNativeExtensionTest/bin-debug/simpleAirN ativeExtensionTest-app.xml
Pay attention to the library location: it is the one of the Air 3.1 install. Did not check the same trick with Flash Builder 4.6 Air install.
Then use a fake web debugger to connect to the process (if compiled in debug mode). See here how to do (french):
http://www.flex-tutorial.fr/2010/08/05/air-android-debug-sur-mobile-froyo-emulateur-avec-f lash-builder-4/
Victor

Similar Messages

  • AIR 3 RC Native Extensions On Mac OS X Error

    I'm getting an error when trying to compile a native extension (.framework) for Mac OS X 10.7 with XCode 4.1; I've included "FlashRuntimeExtension.h" in the project but not sure if i'm missing something else as there is a lack of documentation for Native Extensions with XCode for a Mac Framework (the error I get is "_FRENewObjectFromBool" - symbol(s) not found for architecture i386.
    I have AIR 3 RC and the latest Flash installed on my machine.
    I'm not sure what i'm missing?
    Thanks!

    Hi lemonility,
    Could you try the following steps out and let me know if they help?
    1) Select the project in the project navigation window which will show project summary on right
    2) Select 4th tab build phases
    3) Select Link binary with library option
    4) Add framework for which you are getting
    5) Move the framework from main folder to the frameworks folder
    6) Build it again and errors should be gone.
    Thanks,
    Chris

  • Exception in C++ air native extension for Mac OS X

    I develop air extension for ios and mac os x.
    I use the same code on ios and mac.
    For ios all good.
    But on mac - have problems.
    In extension I use std::vector. Code example:
    vector<Type*>* types; types = new vector<Type*>();  Type* type = new Type(); types->push_back(type);
    Application crashed by line:
    types->push_back(type);
    I tried add try/catch block - but application crashed too.
    I don't know what wrong. This code is work fine on ios and in console application for mac.

    Workaround found:
    Need to launch adl as a line command (depends on your directory config, of course):
    /Applications/Adobe\ Flash\ Builder\ 4.6/sdks/4.6.0/bin/adl -runtime /Library/Frameworks/ -extdir /Users/vandrito/Desktop/simpleAirNativeExtension/launch/extensions -profile extendedDesktop /Users/vandrito/Documents/Projets/o3sui/simpleAirNativeExtensionTest/bin-debug/simpleAirN ativeExtensionTest-app.xml
    Pay attention to the library location: it is the one of the Air 3.1 install. Did not check the same trick with Flash Builder 4.6 Air install.
    Then use a fake web debugger to connect to the process (if compiled in debug mode). See here how to do (french):
    http://www.flex-tutorial.fr/2010/08/05/air-android-debug-sur-mobile-froyo-emulateur-avec-f lash-builder-4/
    Victor

  • Creating the native extension package

    This question was posted in response to the following article: http://help.adobe.com/en_US/air/extensions/WSf268776665d7970d-2482335412ffea65006-8000.htm l

    Hi,
    I am trying to create a native extension for MAC.
    i am getting the following error in xcode.
    i included flashruntime.h and imported the .h file also.
    other FRE functions are working fine..i am getting error only after adding FREAcquireByteArray.
    Undefined symbols for architecture x86_64:
      "_FREAcquireByteArray", referenced from:
          _saveFile in save.o
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

  • How to open a native PDF file in Android using AIR?

    Hello.I have created a flex mobile project to open and show a native PDF file in Android. I have tried three different methods below , but  I failed.
    1. I created a stagewebview and used "stageWebView.loadURL". I can see the PDF View in emulator but it didn't work in Android Pad (SAMSUNG Galaxy Tab 10.1). It showed blank screen.
    Note that I have installed AIR 3.3.
    stageWebView1.loadURL(new File(new File("app:/assets/ZUGH-2P.pdf").nativePath).url);
    2. I created a stagewebview and used stagewebview to load javascript. The javascript could run in emulator, but it didn't work in Android Pad. I failed again.
    stageWebView1.loadURL(new File(new File("app:/assets/JavaScripthtml.html").nativePath).url);
    3.  I imported stagewebviewbridge, which is the extended version of stagewebviewbridge. I created a stagewebviewbridge , but it could not run in emulator. I failed again.
    stageWebViewbridge1.loadLocalURL( "appfile:/assets/pdf.html");
    could any one give me some suggestions? Many thanks.

    @peterpan_cafuc,
    Sorry to say that I'm not sure of the answer, either.
    One suggestion would be to try something like File.openWithDefaultApplication(), although I've never tried it on mobile.
    Also, I poked around stackoverflow, and it looks like people have done this using Android Intents, but you might have to use a Native Extension  to do this in AIR.
    Apologies that I can't be more helpful.
    -Randy

  • AIR Native Extension Application Crash on Android Emulator when Extension method is invoked

    I have developed a Hello World Application using AIR Native Extension on Android Emulator and When i try to run the application its crashes. I was able to run same application sometimes back on Android Emulator on Mac. Right now I am using a Windows machine (as i dont have Mac anymore). I tried running same apk file which was compiled and running on Android emulator on Mac but it failed. Also i tried to recompile entire application from same code base but still it is failing. As far as i know Mac or windows should not play a part but still mentioning it out in the discussion. Also i tried running the application on various Android SDK version but with same results.
    Following is logcat logs for Android 4.0.3.
    D/gralloc_goldfish(  497): Emulator without GPU emulation detected.
    I/ActivityManager(   84): Displayed air.com.deloitte.helloWorld/.AppEntry: +4s82
    6ms
    W/InputManagerService(   84): Starting input on non-focused client com.android.i
    nternal.view.IInputMethodClient$Stub$Proxy@413e17e0 (uid=10009 pid=179)
    W/ActivityManager(   84): Launch timeout has expired, giving up wake lock!
    W/ActivityManager(   84): Activity idle timeout for ActivityRecord{41534258 air.
    com.deloitte.helloWorld/.AppEntry}
    W/NetworkManagementSocketTagger(   84): setKernelCountSet(10009, 0) failed with
    errno -2
    E/dalvikvm(  497): JNI ERROR (app bug): attempt to use stale local reference 0x5
    d500031
    W/dalvikvm(  497): JNI WARNING: 0x5d500031 is not a valid JNI reference
    W/dalvikvm(  497):              in Lcom/adobe/air/customHandler;.nativeOnTouchCa
    llback:(IFFFIFFZ[FI)Z (CallObjectMethodV)
    I/dalvikvm(  497): "main" prio=5 tid=1 RUNNABLE
    I/dalvikvm(  497):   | group="main" sCount=0 dsCount=0 obj=0x409c1460 self=0x128
    10
    I/dalvikvm(  497):   | sysTid=497 nice=0 sched=0/0 cgrp=default handle=107408295
    2
    I/dalvikvm(  497):   | schedstat=( 12139801627 5119955457 1265 ) utm=1128 stm=85
    core=0
    I/dalvikvm(  497):   at com.adobe.air.customHandler.nativeOnTouchCallback(Native
    Method)
    I/dalvikvm(  497):   at com.adobe.air.customHandler.nativeOnTouchCallback(Native
    Method)
    I/dalvikvm(  497):   at com.adobe.air.customHandler.handleMessage(customHandler.
    java:23)
    I/dalvikvm(  497):   at android.os.Handler.dispatchMessage(Handler.java:99)
    I/dalvikvm(  497):   at android.os.Looper.loop(Looper.java:137)
    I/dalvikvm(  497):   at android.app.ActivityThread.main(ActivityThread.java:4424
    I/dalvikvm(  497):   at java.lang.reflect.Method.invokeNative(Native Method)
    I/dalvikvm(  497):   at java.lang.reflect.Method.invoke(Method.java:511)
    I/dalvikvm(  497):   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.r
    un(ZygoteInit.java:784)
    I/dalvikvm(  497):   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:
    551)
    I/dalvikvm(  497):   at dalvik.system.NativeStart.main(Native Method)
    I/dalvikvm(  497):
    E/dalvikvm(  497): VM aborting
    F/libc    (  497): Fatal signal 11 (SIGSEGV) at 0xdeadd00d (code=1)
    I/DEBUG   (   34): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *
    I/DEBUG   (   34): Build fingerprint: 'generic/sdk/generic:4.0.3/MR1/237985:eng/
    test-keys'
    I/DEBUG   (   34): pid: 497, tid: 497  >>> air.com.deloitte.helloWorld <<<
    I/DEBUG   (   34): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr deadd00
    d
    I/DEBUG   (   34):  r0 00000000  r1 00097bd8  r2 00000000  r3 00000000
    I/DEBUG   (   34):  r4 deadd00d  r5 40872c58  r6 0000020c  r7 49622e39
    I/DEBUG   (   34):  r8 4084ee67  r9 4084e703  10 4084ee73  fp 4084f546
    I/DEBUG   (   34):  ip 00000000  sp bed6a248  lr 4080bc8f  pc 4080bc8e  cpsr 600
    00030
    I/DEBUG   (   34):  d0  3f8000003f800000  d1  4b00106845834000
    I/DEBUG   (   34):  d2  4b0010684b000000  d3  0000000045834000
    I/DEBUG   (   34):  d4  0000000000000000  d5  0000000000000000
    I/DEBUG   (   34):  d6  0000000000000000  d7  0000106800000000
    I/DEBUG   (   34):  d8  3f8000003f800000  d9  0000000000100000
    I/DEBUG   (   34):  d10 0000000000000000  d11 0000000000000000
    I/DEBUG   (   34):  d12 0000000000000000  d13 0000000000000000
    I/DEBUG   (   34):  d14 0000000000000000  d15 0000000000000000
    I/DEBUG   (   34):  scr 68000012
    I/DEBUG   (   34):
    I/DEBUG   (   34):          #00  pc 00050c8e  /system/lib/libdvm.so (dvmAbort)
    I/DEBUG   (   34):          #01  pc 0004486e  /system/lib/libdvm.so
    I/DEBUG   (   34):          #02  pc 000451b0  /system/lib/libdvm.so
    I/DEBUG   (   34):          #03  pc 0004c9a0  /system/lib/libdvm.so
    I/DEBUG   (   34):          #04  pc 000e0e4a  /data/data/com.adobe.air/lib/libCo
    re.so
    I/DEBUG   (   34):
    I/DEBUG   (   34): code around pc:
    I/DEBUG   (   34): 4080bc6c 34b4f8d3 ec54f7cd 26001e73 2f01f813  ...4..T.s..&...
    I/DEBUG   (   34): 4080bc7c 42abb152 d0074416 4798e7f8 f7ff4c0a  R..B.D.....G.L.
    I/DEBUG   (   34): 4080bc8c 7026ffa7 ec4af7cd 2006490c 44794a0c  ..&p..J..I. .Jy
    D
    I/DEBUG   (   34): 4080bc9c f7cd447a 2000eb00 ebc2f7cd 58e54b05  zD..... .....K.
    X
    I/DEBUG   (   34): 4080bcac 2b006c6b e7e9d1e9 deadd00d 0006234c  kl.+........L#.
    I/DEBUG   (   34):
    I/DEBUG   (   34): code around lr:
    I/DEBUG   (   34): 4080bc6c 34b4f8d3 ec54f7cd 26001e73 2f01f813  ...4..T.s..&...
    I/DEBUG   (   34): 4080bc7c 42abb152 d0074416 4798e7f8 f7ff4c0a  R..B.D.....G.L.
    I/DEBUG   (   34): 4080bc8c 7026ffa7 ec4af7cd 2006490c 44794a0c  ..&p..J..I. .Jy
    D
    I/DEBUG   (   34): 4080bc9c f7cd447a 2000eb00 ebc2f7cd 58e54b05  zD..... .....K.
    X
    I/DEBUG   (   34): 4080bcac 2b006c6b e7e9d1e9 deadd00d 0006234c  kl.+........L#.
    I/DEBUG   (   34):
    I/DEBUG   (   34): memory map around addr deadd00d:
    I/DEBUG   (   34): bed23000-bed71000 [stack]
    I/DEBUG   (   34): (no map for address)
    I/DEBUG   (   34): (no map above)
    I/DEBUG   (   34):
    I/DEBUG   (   34): stack:
    I/DEBUG   (   34):     bed6a208  00000000
    I/DEBUG   (   34):     bed6a20c  4001df19  /system/lib/libc.so
    I/DEBUG   (   34):     bed6a210  4004770c  /system/lib/libc.so
    I/DEBUG   (   34):     bed6a214  4004c85c
    I/DEBUG   (   34):     bed6a218  00000000
    I/DEBUG   (   34):     bed6a21c  4001f121  /system/lib/libc.so
    I/DEBUG   (   34):     bed6a220  4004755c  /system/lib/libc.so
    I/DEBUG   (   34):     bed6a224  00000000
    I/DEBUG   (   34):     bed6a228  0000020c
    I/DEBUG   (   34):     bed6a22c  49622e39  /data/data/com.adobe.air/lib/libCore.
    so
    I/DEBUG   (   34):     bed6a230  4084ee67  /system/lib/libdvm.so
    I/DEBUG   (   34):     bed6a234  4001df37  /system/lib/libc.so
    I/DEBUG   (   34):     bed6a238  4086df90  /system/lib/libdvm.so
    I/DEBUG   (   34):     bed6a23c  bed6a44b  [stack]
    I/DEBUG   (   34):     bed6a240  df0027ad
    I/DEBUG   (   34):     bed6a244  00000000
    I/DEBUG   (   34): #00 bed6a248  00000038
    I/DEBUG   (   34):     bed6a24c  6c756e28
    I/DEBUG   (   34):     bed6a250  0000296c
    I/DEBUG   (   34):     bed6a254  00000000
    I/DEBUG   (   34):     bed6a258  00000000
    I/DEBUG   (   34):     bed6a25c  00000000
    I/DEBUG   (   34):     bed6a260  00000000
    I/DEBUG   (   34):     bed6a264  00000000
    I/DEBUG   (   34):     bed6a268  00000000
    I/DEBUG   (   34):     bed6a26c  00000000
    I/DEBUG   (   34):     bed6a270  00000000
    I/DEBUG   (   34):     bed6a274  00000000
    I/DEBUG   (   34):     bed6a278  00000000
    I/DEBUG   (   34):     bed6a27c  00000000
    I/DEBUG   (   34):     bed6a280  00000000
    I/DEBUG   (   34):     bed6a284  00000000
    I/DEBUG   (   34):     bed6a288  00000000
    I/DEBUG   (   34):     bed6a28c  00000000
    I/DEBUG   (   34):     bed6a290  00000000
    I/DEBUG   (   34):     bed6a294  00000000
    I/DEBUG   (   34):     bed6a298  00000000
    I/DEBUG   (   34):     bed6a29c  00000000
    I/DEBUG   (   34):     bed6a2a0  00000000
    I/DEBUG   (   34):     bed6a2a4  00000000
    I/DEBUG   (   34):     bed6a2a8  00000000
    I/DEBUG   (   34):     bed6a2ac  00000000
    I/DEBUG   (   34):     bed6a2b0  00000000
    I/DEBUG   (   34):     bed6a2b4  00000000
    I/DEBUG   (   34):     bed6a2b8  00000000
    I/DEBUG   (   34):     bed6a2bc  00000000
    I/DEBUG   (   34):     bed6a2c0  00000000
    I/DEBUG   (   34):     bed6a2c4  00000000
    I/DEBUG   (   34):     bed6a2c8  00000000
    I/DEBUG   (   34):     bed6a2cc  00000000
    I/DEBUG   (   34):     bed6a2d0  00000000
    I/DEBUG   (   34):     bed6a2d4  00000000
    I/DEBUG   (   34):     bed6a2d8  00000000
    I/DEBUG   (   34):     bed6a2dc  00000000
    I/DEBUG   (   34):     bed6a2e0  00000000
    I/DEBUG   (   34):     bed6a2e4  00000000
    I/DEBUG   (   34):     bed6a2e8  00000000
    I/DEBUG   (   34):     bed6a2ec  00000000
    I/DEBUG   (   34):     bed6a2f0  00000000
    I/DEBUG   (   34):     bed6a2f4  00000000
    I/DEBUG   (   34):     bed6a2f8  00000000
    I/DEBUG   (   34):     bed6a2fc  00000000
    I/DEBUG   (   34):     bed6a300  00000000
    I/DEBUG   (   34):     bed6a304  00000000
    I/DEBUG   (   34):     bed6a308  00000000
    I/DEBUG   (   34):     bed6a30c  00000000
    I/DEBUG   (   34):     bed6a310  00000000
    I/DEBUG   (   34):     bed6a314  00000000
    I/DEBUG   (   34):     bed6a318  00000000
    I/DEBUG   (   34):     bed6a31c  00000000
    I/DEBUG   (   34):     bed6a320  00000000
    I/DEBUG   (   34):     bed6a324  00000000
    I/DEBUG   (   34):     bed6a328  00000000
    I/DEBUG   (   34):     bed6a32c  00000000
    I/DEBUG   (   34):     bed6a330  00000000
    I/DEBUG   (   34):     bed6a334  00000000
    I/DEBUG   (   34):     bed6a338  00000000
    I/DEBUG   (   34):     bed6a33c  00000000
    I/DEBUG   (   34):     bed6a340  00000000
    I/DEBUG   (   34):     bed6a344  00000000
    I/DEBUG   (   34):     bed6a348  00000000
    I/DEBUG   (   34):     bed6a34c  00000000
    I/DEBUG   (   34):     bed6a350  00000000
    I/DEBUG   (   34):     bed6a354  00000000
    I/DEBUG   (   34):     bed6a358  00000000
    I/DEBUG   (   34):     bed6a35c  00000000
    I/DEBUG   (   34):     bed6a360  00000000
    I/DEBUG   (   34):     bed6a364  00000000
    I/DEBUG   (   34):     bed6a368  00000000
    I/DEBUG   (   34):     bed6a36c  00000000
    I/DEBUG   (   34):     bed6a370  00000000
    I/DEBUG   (   34):     bed6a374  00000000
    I/DEBUG   (   34):     bed6a378  00000000
    I/DEBUG   (   34):     bed6a37c  00000000
    I/DEBUG   (   34):     bed6a380  00000000
    I/DEBUG   (   34):     bed6a384  00000000
    I/DEBUG   (   34):     bed6a388  00000000
    I/DEBUG   (   34):     bed6a38c  00000000
    I/DEBUG   (   34):     bed6a390  00000000
    I/DEBUG   (   34):     bed6a394  00000000
    I/DEBUG   (   34):     bed6a398  00000000
    I/DEBUG   (   34):     bed6a39c  00000000
    I/DEBUG   (   34):     bed6a3a0  00000000
    I/DEBUG   (   34):     bed6a3a4  00000000
    I/DEBUG   (   34):     bed6a3a8  00000000
    I/DEBUG   (   34):     bed6a3ac  00000000
    I/DEBUG   (   34):     bed6a3b0  00000000
    I/DEBUG   (   34):     bed6a3b4  00000000
    I/DEBUG   (   34):     bed6a3b8  00000000
    I/DEBUG   (   34):     bed6a3bc  00000000
    I/DEBUG   (   34):     bed6a3c0  00000000
    I/DEBUG   (   34):     bed6a3c4  00000000
    I/DEBUG   (   34):     bed6a3c8  00000000
    I/DEBUG   (   34):     bed6a3cc  00000000
    I/DEBUG   (   34):     bed6a3d0  00000000
    I/DEBUG   (   34):     bed6a3d4  00000000
    I/DEBUG   (   34):     bed6a3d8  00000000
    I/DEBUG   (   34):     bed6a3dc  00000000
    I/DEBUG   (   34):     bed6a3e0  00000000
    I/DEBUG   (   34):     bed6a3e4  00000000
    I/DEBUG   (   34):     bed6a3e8  00000000
    I/DEBUG   (   34):     bed6a3ec  00000000
    I/DEBUG   (   34):     bed6a3f0  00000000
    I/DEBUG   (   34):     bed6a3f4  00000000
    I/DEBUG   (   34):     bed6a3f8  00000000
    I/DEBUG   (   34):     bed6a3fc  00000000
    I/DEBUG   (   34):     bed6a400  00000000
    I/DEBUG   (   34):     bed6a404  00000000
    I/DEBUG   (   34):     bed6a408  00000000
    I/DEBUG   (   34):     bed6a40c  00000000
    I/DEBUG   (   34):     bed6a410  00000000
    I/DEBUG   (   34):     bed6a414  00000000
    I/DEBUG   (   34):     bed6a418  00000000
    I/DEBUG   (   34):     bed6a41c  00000000
    I/DEBUG   (   34):     bed6a420  00000000
    I/DEBUG   (   34):     bed6a424  00000000
    I/DEBUG   (   34):     bed6a428  00000000
    I/DEBUG   (   34):     bed6a42c  00000000
    I/DEBUG   (   34):     bed6a430  00000000
    I/DEBUG   (   34):     bed6a434  00000000
    I/DEBUG   (   34):     bed6a438  00000000
    I/DEBUG   (   34):     bed6a43c  00000000
    I/DEBUG   (   34):     bed6a440  00000000
    I/DEBUG   (   34):     bed6a444  00000000
    I/DEBUG   (   34):     bed6a448  00000000
    I/DEBUG   (   34):     bed6a44c  342b19f5
    I/DEBUG   (   34):     bed6a450  00000000
    I/DEBUG   (   34):     bed6a454  4086df90  /system/lib/libdvm.so
    I/DEBUG   (   34):     bed6a458  5d500031
    I/DEBUG   (   34):     bed6a45c  407ff873  /system/lib/libdvm.so
    I/DEBUG   (   34): #01 bed6a460  bed6a54c  [stack]
    I/DEBUG   (   34):     bed6a464  408001b5  /system/lib/libdvm.so
    D/Zygote  (   37): Process 497 terminated by signal (11)
    I/WindowManager(   84): WIN DEATH: Window{41462cb0 SurfaceView paused=false}
    I/ActivityManager(   84): Process air.com.deloitte.helloWorld (pid 497) has died
    W/ActivityManager(   84): Force removing ActivityRecord{41534258 air.com.deloitt
    e.helloWorld/.AppEntry}: app died, no saved state
    W/NetworkManagementSocketTagger(   84): setKernelCountSet(10041, 0) failed with
    errno -2
    I/WindowManager(   84): WIN DEATH: Window{41590db8 SurfaceView paused=false}
    I/WindowManager(   84): WIN DEATH: Window{4158b920 air.com.deloitte.helloWorld/a
    ir.com.deloitte.helloWorld.AppEntry paused=false}
    I/BootReceiver(   84): Copying /data/tombstones/tombstone_06 to DropBox (SYSTEM_
    TOMBSTONE)
    E/InputDispatcher(   84): Received spurious receive callback for unknown input c
    hannel.  fd=209, events=0x8
    D/dalvikvm(   84): GC_FOR_ALLOC freed 928K, 13% free 11284K/12871K, paused 84ms
    W/NetworkManagementSocketTagger(   84): setKernelCountSet(10009, 1) failed with
    errno -2
    D/dalvikvm(   84): GC_CONCURRENT freed 141K, 10% free 11601K/12871K, paused 6ms+
    14ms
    D/dalvikvm(   84): GC_FOR_ALLOC freed 177K, 11% free 11552K/12871K, paused 128ms
    D/dalvikvm(   84): GC_FOR_ALLOC freed 128K, 10% free 11616K/12871K, paused 84ms
    D/dalvikvm(   84): GC_FOR_ALLOC freed 427K, 12% free 11445K/12871K, paused 79ms
    W/InputManagerService(   84): Got RemoteException sending setActive(false) notif
    ication to pid 497 uid 10041
    D/dalvikvm(  136): GC_FOR_ALLOC freed 5544K, 37% free 9812K/15495K, paused 47ms
    D/dalvikvm(  179): GC_FOR_ALLOC freed 2416K, 21% free 17911K/22535K, paused 77ms
    D/dalvikvm(  179): GC_FOR_ALLOC freed 659K, 17% free 18828K/22535K, paused 100ms
    D/dalvikvm(  179): GC_CONCURRENT freed 941K, 12% free 19900K/22535K, paused 6ms+
    20ms
    D/dalvikvm(  179): GC_CONCURRENT freed 3259K, 18% free 18684K/22535K, paused 12m
    s+23ms

    I am not able to solve this yet. Is anybody else facing this this problem.

  • Native Extension for AIR publishing error : framework not found

    Hello,
    I'm trying to build an iOS app using native extensions for AIR, but when I publish, I've an error message saying : framework not found
    I tried with this ANE for GameCenter integration : https://github.com/StickSports/ANE-Game-Center
    it says " ld: framework not found GameKit "
    Same problem with GREE Platform SDK for AIR :
    https://docs.developer.gree.net/en/globaltechnicalspecs/#sdkforair
    it says " ld: framework not found CoreTelephony "
    The thing is that these frameworks are already included, I guess.
    I'm using flash cs6 on mac, and I've included the path to iOS SDK in the publishing settings.

    Are you using the ANE from there or are you recompiling the ANE at your end?
    If you are recompiling, please make sure that you are using the platform.xml file they have provided.
    If you are using their precompiled ANEs, probably, the path to iOS SDK is not correct. It should be upto the folder iPhoneOSx.y.sdk.

  • Air Native Extension for OS X. Cant call functions from native code.

    Hi, I am trying to build native extension for OS X.
    After creating context, I try to call native function with "call" method, but always I have an error "The extension context does not have a method with the name ..."
    In as3 code my ExtensionContext is not null, so it's okay. And in native objective-c code I have a function, which I call in as3 code.
    What should I do?
    Here my code.
    Objective-c:
    FREContext AirContext = nil;
        FREObject init(FREContext ctx, void* funcData, uint32_t argc, FREObject argv[])
            return nil;
        FREObject someFunction(FREContext ctx, void* funcData, uint32_t argc, FREObject argv[])
            FREDispatchStatusEventAsync(AirContext ,(uint8_t*) "SOME_EVENT", (uint8_t*) "some information" );
            return nil;
        void ANEContextInitializer(void* extData, const uint8_t* ctxType, FREContext ctx, uint32_t* numFunctionsToTest, const FRENamedFunction** functionsToSet)
            NSLog(@"Entering ContextInitinalizer()");
            *numFunctionsToTest = 5;
            FRENamedFunction* func = (FRENamedFunction*) malloc(sizeof(FRENamedFunction) * *numFunctionsToTest);
            func[0].name = (const uint8_t*) "init";
            func[0].functionData = NULL;
            func[0].function = &init;
            func[1].name = (const uint8_t*) "someFunction";
            func[1].functionData = NULL;
            func[1].function = &someFunction
            // other blank functions
            *functionsToSet = func;
            AirContext = ctx;
            FREDispatchStatusEventAsync(AirContext ,(uint8_t*) "SOME_EVENT", (uint8_t*) "some information" );
        void ContextFinalizer(FREContext ctx) {
            NSLog(@"Entering ContextFinalizer()");
            NSLog(@"Exiting ContextFinalizer()");
        void ANEInitializer(void** extDataToSet, FREContextInitializer* ctxInitializerToSet, FREContextFinalizer* ctxFinalizerToSet )
            NSLog(@"Entering ExtInitializer()");
            *extDataToSet = NULL;
            *ctxInitializerToSet = &ContextInitializer;
            *ctxFinalizerToSet = &ContextFinalizer;
            NSLog(@"Exiting ExtInitializer()");
        void ANEFinalizer(void* extData)
            return;
    ActionScript3:
    public class MyANE extends EventDispatcher{
            private static var _instance:MyANE;
            private var extCtx:ExtensionContext;
            public function MyANE()
                if (!_instance)
                    if (this.isSupported)
                        extCtx = ExtensionContext.createExtensionContext("my.awesome.ane", null);
                        if (extCtx != null)
                            trace('context is okay'); //this trace works
                            extCtx.addEventListener(StatusEvent.STATUS, onStatus);
                        } else
                            trace('context is null.');
                _instance = this;
                else
                    throw Error('singleton');
        public static function getInstance():MyANE
                return _instance != null ? _instance : new MyANE();
        public function get isSupported():Boolean
                var value:Boolean = Capabilities.manufacturer.indexOf('Macintosh') > -1;
                trace(value ? 'supported' : 'not supported ');
                return value;
        private function onStatus(event:StatusEvent):void
                trace('Event', event, 'code', event.code, 'level', event.level); //this traсе does not works
         private function test(): void
              extCtx.call("someFunction"); //this throws error
    XML:
        <extension xmlns="http://ns.adobe.com/air/extension/3.9">
            <id>my.awesome.ane</id>
            <versionNumber>1.0.0</versionNumber>
            <platforms>
                <platform name="MacOS-x86">
                    <applicationDeployment>
                        <nativeLibrary>MyANE.framework</nativeLibrary>
                        <initializer>ANEInitializer</initializer>
                        <finalizer>ANEFinalizer</finalizer>
                    </applicationDeployment>
                </platform>
            </platforms>
        </extension>
    And this script Im using for build ANE:
        mv ../as3/bin/MyANE.swc .
        unzip MyANE.swc
        mv library.swf mac/
        rm catalog.xml
        rsync -a ../Obective-C/ANE/Build/Products/Debug/ANE.framework/ mac/ANE.framework/
        adt -package -target ane MyANE.ane extension.xml -swc MyANE.swc -platform MacOS-x86 -C mac .
        mv MyANE.ane ~/Work/_Projects/test/libs-ane/

    I haven't done Objective C in a long time, but if I'm not mistaken, it requires the semicolon to terminate a line of code. The line containing "func[1].function = &someFunction" does not have that termination and since that is the function you are trying to execute, maybe that is the source of the error.

  • Publishing air apps with native extension with Flash CS6 on Windows

    Hi all,
    is there any trick to publish air apps with Flash CS6 on Windows?
    I tried all native extensions from devnet, but nothing work to me.
    I read on Mac is possibility to specify the iOS SDK folder in publish
    settings, but on Windows it´s missing. 
    Is there anybody who has some experiences with publishing apps
    with native extensions for iOS and Android with windows Flash CS6?
    Thanks for all advices.

    I sympathize. I recently found a native alert for iOS and Android that's working with Flash CS6 on Windows with AIR 3.2.0.2070 but not AIR 3.2.0.2060. You can get the ANE here:
    http://www.jampot.ie/ane/
    Haven't tried the other ones. Let us know if you decide to try them.
    The sample code they have on the page doesn't work with the native alert. Here's the code I created - it's a document class for a .fla that has one dynamic TextField and one Button component on the stage :
    http://pastebin.com/DsxR9nJ4

  • Pass C++ Class Member Function as a callable function in AIR Native Extension

    I'm writing an ANE and I'd like to know if anyone has been able to pass a C++ class member function pointer as a callable function from AIR? I have tried this so far with a little bit of C++11 trickery and it's crashing. I've also statically linked the libstdc++ into my library, according to the documentation, in order to ensure that these features I use work correctly. I have code like so:
    FakeWorld* world = new FakeWorld();
    *numFunctions = 1;
    memberFunctions = (FRENamedFunction*) malloc(sizeof(FRENamedFunction) * (*numFunctions));
    ANEMemberFunction mCreateFakeBody = std::tr1::bind(&FakeWorld::createFakeBody, world, std::tr1::placeholders::_1, std::tr1::placeholders::_2, std::tr1::placeholders::_3, std::tr1::placeholders::_4);
    ANEFunction* createFakeBody = mCreateFakeBody.target<ANEFunction>();
    memberFunctions[0].name = (const uint8_t*) "createFakeBody";
    memberFunctions[0].functionData = NULL;
    memberFunctions[0].function = createFakeBody;
    FRESetContextNativeData(ctx, (void*)world);
    I just realized I'm using C here for allocating the member functions array.. silly me, but I don't think this is the cause of my issue. I refuse to believe that Adobe has built to the Native Extensions portion of the runtime in such a way that I have to cram every single function I want to create (natively) into a global, C formatted namespace (Especially since the documentation says that C is only required for the extenion and context initializing function interfacing and the rest of the code can be done in C++ or objective-C). So please let me know if and how this is possible and I thank you so much in advance for your time!P.
    P.S. Currently when I run this code, I can do the object initialization just fine. As soon as I invoke the "createFakeBody" method on the native side, the runtime dies and simply says:
    Problem signature:
      Problem Event Name: BEX
      Application Name: adl.exe
      Application Version: 3.1.0.4880
      Application Timestamp: 4eb7612e
      Fault Module Name: StackHash_0a9e
      Fault Module Version: 0.0.0.0
      Fault Module Timestamp: 00000000
      Exception Offset: 00000000
      Exception Code: c0000005
      Exception Data: 00000008
      OS Version: 6.1.7601.2.1.0.256.48
      Locale ID: 1033
      Additional Information 1: 0a9e
      Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
      Additional Information 3: 0a9e
      Additional Information 4: 0a9e372d3b4ad19135b953a78882e789
    Read our privacy statement online:
      http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409
    If the online privacy statement is not available, please read our privacy statement offline:
      C:\Windows\system32\en-US\erofflps.txt
    Thanks again for your assitance.

    It's been a little while since i've dealt with C++ and not up to speed on tr1 or C++0x, so forgive me if i'm not helping.
    The the examples of std::tr1::bind that i'm seeing out there seem to be either dereferencing the bound 'this' pointer when creating the bound method, i.e. in your case *world instead of world, or using std::tr1::ref(*world), therefore i believe that bind expects the bound parameters to be passed by reference.
    Given that the result of std::tr1::bind is callable (basing that on http://stackoverflow.com/questions/3678884/virtual-member-functions-and-stdtr1function-how -does-this-work) could you simplify to the following:
    memberFunctions[0].name = (const uint8_t*) "createFakeBody";
    memberFunctions[0].functionData = NULL;
    memberFunctions[0].function = std::tr1::bind(&FakeWorld::createFakeBody, *world, std::tr1::placeholders::_1, std::tr1::placeholders::_2, std::tr1::placeholders::_3, std::tr1::placeholders::_4);
    Or for an even simpler starting point, creating a test member function 'helloWorld' in FakeWorld that takes no arguments and using:
    memberFunctions[0].name = (const uint8_t*) "helloWorld";
    memberFunctions[0].functionData = NULL;
    memberFunctions[0].function = std::tr1::bind(&FakeWorld::helloWorld, *world);
    Hope this helps.

  • Adobe Air for iOS and Android: FlasCC or Native Extension?

    Hi all,
    Who know - what provide better perfomance. FlasCC or Native Extension? For example for Math calculations, bitmapdata modification and etc.

    Well nothing prevent you from mixing flascc with native extension.
    Also, I think that you can also use domain memory in AS3 with the Bytearray class (not sure about that).
    Flascc vs normal as3 is mostly a question of language (portability) Do you want to write as3 or c++?
    Native extension give you speed and native platform access(platform specific feature).
    So, you should think about it this way:
    AS3, run in flash and air. Is sandboxed. Can use domain memory, but it's a bit harder to leverage than flascc.
    Flascc, run in flash and air. Is sandboxed, Can use domain memory. Give you the potential of leveraging the hundreds of opensources lib already out there.
    Native extension, run ONLY in air. Is not sandboxed. Native memory management. Also let you leverage the c++ lib. 
    The best (in my opinion) is to write native code for mobile and desktop (no air or flascc involve) and use flascc for the flash/web platform. It's harder, because you have write portable native code (lots of abstraction), but you mostly have the same problem with native extension.

  • Adobe AIR Native Extensions

    We are planning to choose a new platform of our new convergent media device. Like to know whether we can develop our platform using Adobe AIR Native Extension for Linux OS?
    I came to know that Adobe has subscription based suuport for developers. If that is the case we can purchase support for development assistance on Linux based AIR Native Extensions. What we need are the FRE libraries and C code to run the Native extensions on Linux. I had acces to AIR 3.0 for Linux sometime back. Unfortunately our project look some time to mature.
    Please let us know about this so that we can base our plans on AIR/Linux native extensions.

    Four part Series, this is link to first part
    http://quetwo.com/2011/10/31/creating-an-windows-air-native-extension-with-eclipse-part-1/
    Another one
    http://www.flexjunk.com/2011/11/30/developing-an-air-native-extension-for-osx-and-windows- in-c/
    Hope those help.

  • Adobe Air native extension for admob

    Dear Adobe Team,
    We have recently purchased Adobe Air native extension for admob for android & ios
    but every time we upload our app to an ipad or iphone, the app crashes.
    We have carefully followed your instructions, and we're sure we've not made a mistake writing the action script 3 code.
    We need your help in solving this problem urgently, as we are now running behind schedule in uploading our app.
    Thanks very much,
    Amir Steklov and Dorit Leshnick

    Before I was also searched a lot to find good  add network and also Admob.
    Finally we done successfull integration using..  working fine in all IOS devices. not yet released to Apple app store
    http://code.google.com/p/flash-air-admob-ane-for-ios/source/browse/trunk/admobaneiphone/sr c/admobtest.as?r=2
    You can check our add setups using Air ANE's for our android game ExpressTrain.
    https://play.google.com/store/apps/details?id=air.timuzsolutions.expresstrain&feature=sear ch_result#?t=W251bGwsMSwyLDEsImFpci50aW11enNvbHV0aW9ucy5leHByZXNzdHJhaW4iXQ..
    you no need to buyAdobe Air ANE's everything is free but all u need to do is googling,
    hope this will help.
    Bala
    Message was edited by: vamsibalu

  • Developing and using Adobe AIR native extensions for Android devices

    I was using this tutorial:
    "Developing and using Adobe AIR native extensions for Android devices"
    http://www.adobe.com/devnet/air/articles/ane-android-devices.html
    When packing the Flex mobile ANESampleTest to deploy on an Android device, the below error happens
    Error occurred while packaging the application:
    aapt tool failed:invalid resource directory name: /private/var/folders/k8/1thhvkf92h947n_g22hg_v9m0000gn/T/52ba05aa-9001-4d46-9438-db81ef83 06f0/res/drawable-xxhdpi
    invalid resource directory name: /private/var/folders/k8/1thhvkf92h947n_g22hg_v9m0000gn/T/52ba05aa-9001-4d46-9438-db81ef83 06f0/res/values-sw600dp
    invalid resource directory name: /private/var/folders/k8/1thhvkf92h947n_g22hg_v9m0000gn/T/52ba05aa-9001-4d46-9438-db81ef83 06f0/res/values-sw720dp-lan
    Does anyone know what the issue might be?

    Did you find a workaround for the Error? I'm getting the same and I can't seem to find any solution.

  • UDP in Air native extensions (ANE) on mobile devices

    i understand that UDP is not supported in Air on mobile devices (in actionscript). so i tried to make an air native extension (ANE) that sends UDP packets. however, i'm finding that this also does not work. the exception i'm getting seems to suggest that sending UDP packets from a ANE is being blocked due to a permissions issue. i'm testing on android, and i do have the INTERNET permission in my manifest. is this a known issue? is UDP blocked in ANEs as well?

    Hello Mr,
    Sorry for my poor English...
    I also try to make ane with java.
    But I'm totally stuck at include resouce things in java.
    Did you try to R.resource when you make jar-library.

Maybe you are looking for

  • Apex and LDAP - Worked on 4.0.1 , no longer works on 4.1

    We recently upgrated from 4.0.1 to 4.1 (current version), and all of our LDAP authentications have failed. DN Field: cn=%LDAP_USER%,CN=USERS,DC=MYDOMAIN,DC=COM This was working fine on 4.0.1, and converted properly during the upgade. Anyone have a si

  • Installing Solaris 8 on Dell C600 (Keyboard problems)

    I am trying to install Solaris 8 on my Dell Latitude C600. When it gets to the "Select Language" screen, my keyboard is inoperable and I can not continue. Does anyone know a workaround. I teied a PS/2 keyboard and have the latest BIOS update. Thanks

  • Acrobat Pro CS6 onn OSX scroll speed

    Hi all, This is a strange one... I installed CS6 on my Macbook Pro, updating from CS5.5. All is ok except for one weird issue. Scrolling up and down PDF files in Acrobat Pro is super slow. Like mollases. It's very annoying. I have always assumed scro

  • New iPad3 and it's not letting me send text messages.....the "send" button is not high lighted....

    New iPad3 and it's not letting me send text messages.....the "send" button is not high lighted....

  • About archive log issue

    DB version: 11.1.0.7 when I issue cmd " alter system archive log current", the alertlog raise error "Thread 1 cannot allocate new log, sequence 149, Private strand flush not complete". I think it's normal, because in the log file , here some dirty da