Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-3432] iOS: Clear app url from App Arguments on resume

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-04-06T17:55:19.000+0000
Affected Version/sn/a
Fix Version/sRelease 2.1.0, Sprint 2012-07
ComponentsiOS
Labelsapi
ReporterPedro Enrique
AssigneeVishal Duggal
Created2011-04-15T03:45:08.000+0000
Updated2017-03-31T22:21:13.000+0000

Description

A http://developer.appcelerator.com/helpdesk/view/76659">helpdesk ticket encounter a problem while coming back to the app after it has been in the background (multitasking).

If the app is opened from being close, Ti.App.getArguments().url return nothing, and if it is opened again from backgrounding, it also returns nothing. This is fine, but when the app is launched from Safari (for example: app://), getArguments().url returns "app://" (or whatever the name of the app is) as expected. If the app is placed in the background again and reopened normally, the same url appears as if it was opened through safari.

More details and sample app.js in helpdesk ticket http://developer.appcelerator.com/helpdesk/view/76659">76659.

Comments

  1. asghar ali 2011-08-03

    Can somebody please look into this... ? Need to clear app url on resume...
  2. kelly redd 2012-03-26

    Please. Experiencing same behavior when launching app from Mail. Arguments persist regardless of who/what launched the app, so if any actionable code is in place to fire based on the url it's fired over and over...not really trivial, imo. Been waiting on a fix for over a year, thanks!
  3. Vishal Duggal 2012-04-03

    Pull pending https://github.com/appcelerator/titanium_mobile/pull/1914
  4. kosso 2015-09-07

    This issue appears to have returned. When app isn't fully backgrounded (double-home-tap) After launching or resuming the app via an appname:// url scheme (which works fine), if you *fully* background the app, then resume it, the launchOptions url and source are cleared (which resolved this initial issue). *BUT*, if you launch the app via a url, then double-tap home (or Shift+CMD+H twice quickly in the simulator) to display the swipeable app closer/selector - ie: not *fully* backgrounded - then re-focus the initial app, the launchOptions are still present in Ti.App.getArguments as the app is 'resumed'. Update: Looking the fix made in TiApp.m, the launchOptions are cleared when the app "applicationWillEnterForeground" fires. However, when you double-tap the home button to show the swipeable app chooser, the apps 'pause' event fires, but not the (fully) 'paused' event. Would this be related to why the options are not being cleared when returning from this state? Update 2 : It appears that when the app goes to the multitasking app-switcher and back again, only 'applicationWillResignActive' and 'applicationDidBecomeActive' is fired. ie : applicationWillEnterForeground is never fired.
  5. Lee Morris 2017-03-31

    Closing ticket as fixed, if there are any problems, please file a new ticket.

JSON Source