iostitaniumopenurl

Getting error after openURL on appcelerator Titanium v 9


I'm working on Titanium project build on sdk v9 for ios platform, and I'm getting this error when opening an external url with this function Titanium.Platform.openURL :

[ERROR] :  Script Error {
[ERROR] :      message = "undefined is not an object";
[ERROR] :      type = TypeError;
[ERROR] :  }

the problem is it's not telling where the issue is, can any one help please? Thanks in advance


Solution

  • You can get around this error (which seems like a Titanium bug) by specifying the second and third args of the openURL command:

    Ti.Platform.openURL('http://maps.apple.com/maps?q=' + destinationAddress, null, () => { });