[TIMOB-26344] iOS: Applications Shortcuts crash on SDK 7.3.0+ when triggered from background
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2018-09-20T10:36:39.000+0000 |
Affected Version/s | Release 7.3.0, Release 7.3.1 |
Fix Version/s | Release 7.4.0 |
Components | iOS |
Labels | crash, ios, shortcuts |
Reporter | Andreas Pingas |
Assignee | Hans Knöchel |
Created | 2018-08-29T22:27:24.000+0000 |
Updated | 2018-09-20T10:37:03.000+0000 |
Description
Please check out the following:
var windowA = Ti.UI.createWindow();
var windowB = Ti.UI.createWindow();
var tabA = Ti.UI.createTab({
window:windowA,
title:'Tab A'
});
var tabB = Ti.UI.createTab({
window:windowB,
title:'Tab B'
});
var tabGroup = Titanium.UI.createTabGroup({
tabs:[tabA, tabB]
});
tabGroup.open();
var label = Ti.UI.createLabel({
text: ''
});
windowA.add(label);
if (Ti.UI.iOS.forceTouchSupported) {
Ti.App.iOS.addEventListener('shortcutitemclick', function(e) {
Ti.API.info('shortcutitemclick');
label.text = 'Shortcut icon clicked, with title = ' + e.title;
});
var appShortcuts = Ti.UI.iOS.createApplicationShortcuts();
appShortcuts.removeAllDynamicShortcuts();
appShortcuts.addDynamicShortcut({
itemtype:'itemt_a',
title:'Itemt A',
icon:Titanium.UI.iOS.SHORTCUT_ICON_TYPE_MESSAGE
});
appShortcuts.addDynamicShortcut({
itemtype:'itemt_b',
title:'Itemt B',
icon:Titanium.UI.iOS.SHORTCUT_ICON_TYPE_ADD
});
}
1) Open the app from shortcut
2) Take the app to run on background
3) Open the app from shortcut again
The app terminates instantly
Hello, Thanks for sharing this. Are you experiencing this on device? Have you seen any crash logs during your app termination? If yes, please share the logs here.
I test it on TestFlight for iPhone 6s on iOS 11.4.1
This looks like a valid issue! We refactored big parts of the
UIApplicationDelegate
handling in 7.3.0 and this may be a side-effect of doing it. Fixing today, patching for the next release (likely 7.3.2 as 7.3.1 will be released today already and finished QE-testing by now). *EDIT*: I am able to reproduce it and it indeed is triggered by the queued application delegates from cold boots.PR (master): https://github.com/appcelerator/titanium_mobile/pull/10296 PR (7_4_X): https://github.com/appcelerator/titanium_mobile/pull/10297 PR (7_3_X): https://github.com/appcelerator/titanium_mobile/pull/10298 Test-Case: See above! [~andreas.pingas] You can patch the change today and go for it!
Verified the fix on 7.4.0.v20180906093302 and 7.5.0.v20180906093938. No Crashing occurs. Closing.
[~amukherjee], the fix is not in 7.3.1 GA version.