[AC-6581] Calling Ti.Platform.openURL() without the optional 3rd parameter (callback) will raise a "Script error"
GitHub Issue | n/a |
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2020-08-07T13:29:16.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | api, ios, iphone |
Reporter | Shamsul Azhar |
Assignee | Abir Mukherjee |
Created | 2020-08-07T10:56:37.000+0000 |
Updated | 2020-08-07T13:29:16.000+0000 |
Description
It seems that the Ti.Platform.openURL() call seems to have issues working with setInterval()
1) Run the attached code on the simulator or device.
2) Notice that a setInterval callback will print a counter on the console every second
3) Click on the button which will switch to Safari and open a webpage
4) Switch back to the app and observe a "Script Error" message being printed out on the console.
This error can be avoided if you supply the optional 3rd parameter to 'openURL()' which is a callback.
Attachments
File | Date | Size |
app.js | 2020-08-07T10:43:45.000+0000 | 635 |
Just noticed that this is a duplicate of the bug below:- Bug AC-6561 Ti.Platform.openURL causes "undefined is not an object" error Don't know how to delete this bug report, sorry about that.
[~shamsulazhar] no worries, duplicate bug reports happen! I'll close this out as a dupe of TIMOB-27846. It's available by installing
appc ti sdk install -b 9_0_X -d
, note that there is no GA build with this fix until 9.1.0 is released