简体   繁体   中英

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM