AppsFlyerSDK / AdobeAirExtension-AppsFlyer

Adobe Air Extension for AppsFlyer
24 stars 22 forks source link

Crash on ios 6.0.1 on minimize/interrupt #8

Closed shanmichu closed 8 years ago

shanmichu commented 9 years ago

Using the latest AppsFlyer ANE i came across a crash if the app is minimized/interrupted. It is easily reproducible even on a hello world app.

Environment :

iPad 2 running iOS 6.0.1 (not encountered on iOS 7.x and later)

Crash Logs :

s-iPad TestAppsFlyerNative[1756] : -[CTApplication beginBackgroundTaskWithName:expirationHandler:]: unrecognized selector sent to instance 0x1e5b0260

s-iPad TestAppsFlyerNative[1756] : * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[CTApplication beginBackgroundTaskWithName:expirationHandler:]: unrecognized selector sent to instance 0x1e5b0260' * First throw call stack: (0x37ea02a3 0x32f8797f 0x37ea3e07 0x37ea2531 0x37df9f68 0x6ab87d 0x37df1037 0x330ddd91 0x35f35101 0x35eab1e7 0x35eaa6cd 0x35eaa11b 0x39ce75a3 0x39ce71d3 0x37e75173 0x37e75117 0x37e73f99 0x37de6ebd 0x37de6d49 0x39ce62eb 0x35efe2f9 0x209e68 0x6a62d4)

Code:
package
{
    import flash.display.Sprite;
    import flash.display.StageAlign;
    import flash.display.StageScaleMode;
    import flash.events.Event;

    public class TestAppsFlyerNative extends Sprite
    {
        private const DEVELOPER_KEY:String = "6aBJD2XbkHGPcLfQQ64cxE"; //"TcFCTFC4BdMYAqmBaeqXSN";//
        private const APP_ID:String = "201420144";
        private const USER_ID:String = "orenorensdfasdfasdf";

        private var appsFlyer:AppsFlyerInterface;
        private var log:String;

        public function TestAppsFlyerNative()
        {
            super();

            // support autoOrients
            stage.align = StageAlign.TOP_LEFT;
            stage.scaleMode = StageScaleMode.NO_SCALE;

            this.addEventListener(flash.events.Event.ADDED_TO_STAGE, onAddedToStage);
        }

        protected function onAddedToStage(event:flash.events.Event):void
        {
            appsFlyer = new AppsFlyerInterface();

            appsFlyer.addEventListener(AppsFlyerEvent.INSTALL_CONVERSATION_DATA_LOADED, onSuccess);
            appsFlyer.addEventListener(AppsFlyerEvent.CURRENT_ATTRIBUTION_DATA_LOADED, onSuccess);
            appsFlyer.addEventListener(AppsFlyerEvent.INSTALL_CONVERSATION_FAILED, onSuccess);

            appsFlyer.setDeveloperKey(DEVELOPER_KEY, APP_ID); // first param is developer key and second (NA for Android)is Apple app id.
            appsFlyer.setAppUserId(USER_ID);
            appsFlyer.setCurrency("EUR");
            appsFlyer.sendTracking();

        }

        protected function onSuccess(event:Event):void
        {
            trace("Track >> success : ",event.toString())           
        }       

    }
}
SmorkalovG commented 9 years ago

I wrote about this issue at support@appsflyer.com few days ago. The bug was fixed yesterday. Now everything works.

dregerATiTD commented 8 years ago

needs closing then.

shanmichu commented 8 years ago

closed as fixed