[TIMOB-3432] iOS: Clear app url from App Arguments on resume
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-04-06T17:55:19.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 2.1.0, Sprint 2012-07 |
Components | iOS |
Labels | api |
Reporter | Pedro Enrique |
Assignee | Vishal Duggal |
Created | 2011-04-15T03:45:08.000+0000 |
Updated | 2017-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.
Can somebody please look into this... ? Need to clear app url on resume...
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!
Pull pending https://github.com/appcelerator/titanium_mobile/pull/1914
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.
Closing ticket as fixed, if there are any problems, please file a new ticket.