-canOpenURL:网址失败:“spotify:” - 错误:"(null)" [英] -canOpenURL: failed for URL: "spotify:" - error: "(null)"

查看:152
本文介绍了-canOpenURL:网址失败:“spotify:” - 错误:"(null)"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

不确定这是否属实,但据我所知,人们说这个问题只发生在Xcode模拟器上,所以你必须在实际设备上进行测试。这个问题是我当前的服务器是 http:// localhost:3000 的本地节点服务器,而我的iOS设备无法访问此服务器。

Not sure if this is true , but from what I've read, people say this issue only occurs on the Xcode simulator so you you must test on an actual device. The problem with this is my current server is a local node server at http://localhost:3000, and my iOS device can not access this server.

1)有没有办法让我的iOS设备访问我设备上的本地服务器?

1) Is there a way to give my iOS device access to the local server on my device?

2)运行模拟器时为什么会出现此错误?

2) Why am I getting this error when running the simulator?

我已将以下内容放入我的info.plist:

I have put the following in my info.plist:

<key>LSApplicationQueriesSchemes</key>
<array>
    <string>spotify</string>
</array>


推荐答案

1)在设备上测试 - 替换localhost地址与您的本地网络IP地址。本地网络地址通常看起来像192.168.xxx.xxx,可以在网络设置中找到。

1) To test on the device - replace the localhost address with your local network IP address. The local network address usually looks like 192.168.xxx.xxx and can be found in network settings.

2)错误只是意味着没有安装Spotify应用程序。为您的计算机提供静态IP地址,或者您必须在实际设备上进行测试。

2) The error simply means that the Spotify app isn't installed. Give your computer a static IP address or you must test on an actual device.

这篇关于-canOpenURL:网址失败:“spotify:” - 错误:&quot;(null)&quot;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆