-canOpenURL: failed for URL: “spotify:” - error: “(null)”

≯℡__Kan透↙ 提交于 2019-12-20 06:06:10

问题


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) Is there a way to give my iOS device access to the local server on my device?

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

I have put the following in my info.plist:

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

回答1:


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) 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.



来源:https://stackoverflow.com/questions/34843532/canopenurl-failed-for-url-spotify-error-null

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!