Project: titanium
Issue TIMOB-23297: Calling Ti.App.getArguments() crashes app when launched via new App Shortcuts
I am testing out the new support for Application Shortcuts as described here: http://www.appcelerator.com/blog/2015/11/ios-9-3d-touch-sample-app/ I have the shortcuts showing when I press on the app icon - perfect. However as soon as the app launches it crashes. And the reason is that when the app is launched or resumed I perform some checks for incoming parameters using the Ti.App.getArguments(). And it seems that whenever the app is *launched* using a App Shortcut, then any subsequent call to Ti.App.getArguments() crashes the app. The crash error message is: {noformat} [UIApplicationShortcutItem boundBridge:withKrollObject:]: unrecognized selector sent to instance 0x137d65370 {noformat} I will attach a sample project which has a App Shortcut set in the tiapp.xml file as follows: {code:xml} UIApplicationShortcutItems UIApplicationShortcutItemIconType UIApplicationShortcutIconTypeSearch UIApplicationShortcutItemTitle Search UIApplicationShortcutItemType search UIApplicationShortcutItemUserInfo {code} And a very simple app.js using native code: {code:javascript} var win = Ti.UI.createWindow({ backgroundColor: 'blue' }); win.open(); Ti.App.getArguments(); {code} Make sure the app is force closed. Then launch the app via the App Shortcut (not the app icon). It will crash with the above error. Tested on my iPhone 6S Plus.
Story points: 5