8 Replies Latest reply: Jul 26, 2013 3:05 PM by almatrudi RSS

    How to exit your applications for AIR for iOS in ActionScript 3

    clavin007 Community Member

      Hi everybody,

       

      I have created a game for iOS. I wanted to terminate the application once the person presses the back button within the iPhone. Does anyone know how to achieve that?

       

      I have searched and they only have the command for the Android using this method :

       

      if(Capabilities.cpuArchitecture=="ARM"){

       

      NativeApplication.nativeApplication.addEventListener(Event.DEACTIVATE, handleDeactivate, false, 0, true);

       

      }

       

      function handleDeactivate(event:Event):void

       

          {

       

          NativeApplication.nativeApplication.exit();

       

          }

       

      How about iOS devices?

       

      Thanks!