[TIMOB-28507] iOS: Ti.App "arguments" property and getArguments() method are not defined as of 10.0.0
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2021-07-21T09:59:51.000+0000 |
Affected Version/s | Release 10.0.0 |
Fix Version/s | Release 10.0.1 |
Components | iOS |
Labels | app, arguments, ios, regression |
Reporter | Joshua Quick |
Assignee | Joshua Quick |
Created | 2021-07-14T04:26:36.000+0000 |
Updated | 2021-07-21T09:59:51.000+0000 |
Description
*Summary:*
As of Titanium 10.0.0, the [Ti.App.arguments](https://titaniumsdk.com/api/titanium/app.html#arguments) property and the deprecated [Ti.App.getArguments()](https://titaniumsdk.com/api/titanium/app.html#getarguments) method are no longer defined. This is a regression and makes fetching an iOS app's arguments via a cold start impossible.
*Steps to reproduce:*
Build and run the below code on iOS.
Look at the log.
// app.js
console.log(@@@ Ti.App.arguments: ${JSON.stringify(Ti.App.arguments, null, 4)}
);
console.log(@@@ Ti.App.getArguments(): ${JSON.stringify(Ti.App.getArguments(), null, 4)}
);
*Result:*
The "arguments" property wrongly returns undefined
and the getArguments()
method causes a crash because that method no longer exists.
[INFO] @@@ Ti.App.arguments: undefined
[ERROR] console.log("@@@ Ti.App.getArguments(): ".concat(JSON.stringify(Ti.App.getArguments(), null, 4)));
[ERROR] TypeError: Ti.App.getArguments is not a function. (In 'Ti.App.getArguments()', 'Ti.App.getArguments' is undefined)
*Expected Result:*
The arguments
property and getArguments()
method must always return an object. If no arguments were used to launch the object, then it will be an empty object printed below as {}
.
[INFO] @@@ Ti.App.arguments: {}
[INFO] @@@ Ti.App.getArguments(): {}
PR (master): https://github.com/appcelerator/titanium_mobile/pull/12956
merged to master
Backported to 10_0_X