标签: ios swift itunesconnect
我想使应用IPV6兼容。我有一个硬核的IP http://50.1.1.1:8222/live来播放我的收音机中的音乐,我用avkit这样做:
let url = URL(string: "http://50.1.1.1:8222/live") playerItem = AVPlayerItem(url: url!) player = AVPlayer(playerItem: playerItem)
有没有办法绕过它,或者我必须更换我的服务器?
提前致谢
答案 0 :(得分:0)
您可以使用主机名代替使用IP地址。
https://developer.apple.com/library/content/documentation/NetworkingInternetWeb/Conceptual/NetworkingOverview/UnderstandingandPreparingfortheIPv6Transition/UnderstandingandPreparingfortheIPv6Transition.html#//apple_ref/doc/uid/TP40010220-CH213-SW1