Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-18179

iOS: Missing app-state-events for fresh launch and background-launch


    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Duplicate
    • Affects Version/s: Release 3.2.3, Release 3.3.0, Release 3.4.0, Release 3.4.1
    • Fix Version/s: None
    • Component/s: iOS
    • Environment:

      SDK 3.2.3 iOS 7
      CLI version 3.3.0
      Titanium SDK version 3.2.3.GA, 3.3.0.GA, 3.4.0.GA, 3.4.1.GA

      iOS 7

    • Story Points:
    • Sprint:
      2017 Sprint 22 SDK


      Problem Description

      1. Titanium mobile app doesn't fire "resumed" event at fresh launch. Based on Apple's doc, "applicationDidBecomeActive:" is called at fresh launch as well. Shouldn't "resumed" be fired at fresh launch?

      2. Based on #1, Shouldn't Titanium mobile app fire "paused" event when app is launched directly into the background? Since "applicationDidEnterBackground:" is called in this case.

      3. There is currently no way to determine whether app is launched into the foreground or the background with Titanium. It is possible with native code, according to Apple's Docs. This feature is highly needed.

      Test case

      1. Create a new mobile project (Classic Titanium)
      2. Copy this code into app.js

      var main_window = Ti.UI.createWindow({
      	backgroundColor: 'green'
      Titanium.App.addEventListener('pause', function (e) {
          Ti.API.info('app.js: Pause event on '+Ti.Platform.osname);
      Titanium.App.addEventListener('paused', function (e) {
          Ti.API.info('app.js: Paused event on '+Ti.Platform.osname);
      Titanium.App.addEventListener('resume', function (e) {
          Ti.API.info('app.js: Resume event on '+Ti.Platform.osname);
      Titanium.App.addEventListener('resumed', function (e) {
          Ti.API.info('app.js: Resumed event on '+Ti.Platform.osname);

      3. Run it into device

      Extra info

      According to the "Apple Doc" The "resumed" event should also called at app fresh launch. According to Apple Doc "applicationDidBecomeActive" is called at fresh launch, which invoke the Titanium.App "resumed" event.


          Issue Links



              • Assignee:
                hknoechel Hans Knöchel
                shawnlan Shawn Lan
              • Watchers:
                1 Start watching this issue


                • Created:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    Sync status:
                    Last received:
                    Last sent:

                    Git Integration