ios - 在 appcelerator Titanium v​​ 9 上打开 URL 后出现错误

标签 ios titanium openurl

我正在为 ios 平台在 sdk v9 上构建 Titanium 项目,当使用此函数 Titanium.Platform.openURL 打开外部 url 时,我收到此错误:

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

问题是它没有告诉问题出在哪里,有人可以帮忙吗? 提前致谢

最佳答案

您可以通过指定 openURL 命令的第二个和第三个参数来解决此错误(这似乎是一个 Titanium bug):

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

关于ios - 在 appcelerator Titanium v​​ 9 上打开 URL 后出现错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62328830/

相关文章:

ios - 使用 openURL :? 刷新 Safari 页面

ios - 当应用程序未在 iOS 中运行时,如何在今天的小部件中调用 openURL 方法?

iOS UIApplication openURL 非常慢

ios - iPad 上的 AudioServicesPlaySystemSound Volume

android - 想要在移动操作系统中为 App 永久存储两个变量

ios - 如何获得符合辅助功能设置的等宽字体

android - 系统找不到指定的文件 "classes.dex"

ios - 如何从某个类名查询所有自定义对象?

ios - 您如何打开一个 FBSession,其完成处理程序不会在每次 session 状态更改时被保留和调用?

ios - 在 UITableView 中至少选择一行