muhku / FreeStreamer

A low-memory footprint streaming audio player for iOS and OS X
http://muhku.github.io/FreeStreamer/
Other
2.11k stars 436 forks source link

support of playing IPv4 address literals in dot notation under IPv6 wifi networks #298

Open michaelakko opened 8 years ago

michaelakko commented 8 years ago

Please check this document and update the player to work with "getaddrinfo". https://developer.apple.com/library/mac/documentation/NetworkingInternetWeb/Conceptual/NetworkingOverview/UnderstandingandPreparingfortheIPv6Transition/UnderstandingandPreparingfortheIPv6Transition.html#//apple_ref/doc/uid/TP40010220-CH213-SW13

muhku commented 8 years ago

Is this about the bundled Reachability?

michaelakko commented 8 years ago

As you know, Apple started from June 2016 to test all the apps for support of IPv6-only networks https://developer.apple.com/news/?id=05042016a

I tried to submit to app-store a radio app with FreeStreamer that plays SHOUTcast/Icecast stream. The stream address is IPv4 address and port, but Apple rejected it due that it's not playing the stream on IPv6 networks.

Apple posted a documentation about it - https://developer.apple.com/library/mac/documentation/NetworkingInternetWeb/Conceptual/NetworkingOverview/UnderstandingandPreparingfortheIPv6Transition/UnderstandingandPreparingfortheIPv6Transition.html#//apple_ref/doc/uid/TP40010220-CH213-SW1

Apple mention: "If you’re writing a client-side app using high-level networking APIs such as NSURLSession and the CFNetwork frameworks and you connect by name, you should not need to change anything for your app to work with IPv6 addresses. If you aren’t connecting by name, you probably should be." and it's true, I created an IPv6 network and tried to play an address of SHOUTcast, and it worked, but when I fill IPv4 address, it won't play. As you know, many audio stream addresses are IPv4 and not domains.

Apple also mention: "If your app needs to connect to an IPv4-only server without a DNS hostname, use getaddrinfo to resolve the IPv4 address literal."

I think it something that can be fixed in Player code level. It's very important to fix it fast because currently, Apple rejects all apps that try to play streams with an IPv4 address.

Thanks.

muhku commented 8 years ago

As you have created the test case, it would be really useful to have logs on the failure. Is it possible to have traces when this happens?