[TIMOB-23623] iOS: Ti.setUserAgent() doesn't exist
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-07-12T04:23:02.000+0000 |
Affected Version/s | Release 5.4.0 |
Fix Version/s | Release 6.0.0 |
Components | iOS |
Labels | parity |
Reporter | Christopher Williams |
Assignee | Hans Knöchel |
Created | 2016-07-11T19:40:26.000+0000 |
Updated | 2017-03-23T18:09:10.000+0000 |
Description
The documentation says that we can set Ti.userAgent via a setter method: http://docs.appcelerator.com/platform/latest/#!/api/Titanium-property-userAgent
That method does not exist on iOS.
https://github.com/appcelerator/titanium-mobile-mocha-suite/blob/master/Resources/ti.test.js#L76
PR: https://github.com/appcelerator/titanium_mobile/pull/8122 The demo starts three requests: 1) Using the system-default user-agent (e.g. "Appcelerator Titanium\/0.0.0 (iPhone\/9.0; iPhone OS; en_US;\)") 2) Override the default user-agent with "my-custom-user-agent" 3) Leave the current (custom) user-agent, but se the request-header "User-Agent". It will throw a warning about duplicate user-agents and the APSHTTPClient will concatenate the user-agents. Demo:
APPROVED
Closing ticket as fixed with reference to the above comments.