tidev / titanium-sdk

🚀 Native iOS and Android Apps with JavaScript
https://titaniumsdk.com/
Other
2.74k stars 1.21k forks source link

fix(ios): fix various issues related to the scene migration #13981

Closed hansemannn closed 3 months ago

hansemannn commented 4 months ago

This PR fixes the open issues related to lifecycle events using the new scene handling. In detail:

- applicationWillResignActive
+ sceneWillResignActive

- applicationDidBecomeActive
+ sceneDidBecomeActive

- applicationDidEnterBackground
+ sceneDidEnterBackground

- applicationWillEnterForeground
+ sceneWillEnterForeground

In addition, it fixes several issues related to open-arguments (mapped to Ti.App.arguments.

Test Case

const win = Ti.UI.createWindow({ backgroundColor: '#fff' });

Ti.App.addEventListener('resume', () => console.warn('Resuming'));
Ti.App.addEventListener('resumed', () => console.warn('Resumed'));
Ti.App.addEventListener('pause', () => console.warn('Pausing'));
Ti.App.addEventListener('paused', () => console.warn('Paused'));

win.open();
hansemannn commented 4 months ago

@m1ga @cb1kenobi If this works as expected, we could do an RC early next week already (e.g. Tuesday).