Changes to Personal Hotspot in iOS 18.0

We've been directed here by Quinn in DTS.

We use multicast/broadcast messages extensively in our physical products for discovery purposes. If, for whatever reason, our customers cannot get this to work on their home Wi-Fi network, we advise that they connect to an iPhone hotspot to confirm behaviour and perform firmware updates as needed.

As of iOS 18, we're seeing odd behaviour when using Personal Hotspot. Interestingly, we're also seeing that client devices connected to the Hotspot network are not showing a Subnet Mask in the Wi-Fi Details screen in the iOS Settings app - I don't know if that's related. We're also seeing that screen show an IP address of 192.0.0.2 for all client iPhones connected to an iPhone Hotspot.

Getting more specific, we're seeing that multicast messages are no longer being received by clients when connected to an iPhone Hotspot where the iPhone running the hotspot is running iOS 18.0 or newer. By "multicast", I mean we're using a BSD socket to send data to 255.255.255.255

I've confirmed that our app has the multicast entitlement, the user has granted Local Network permission, and we've created a small sample app that demonstrates this behaviour perfectly - when connected to any other test network, multicast messages are received correctly by clients.

We've also confirmed that this behaviour doesn't happen when the iPhone running the hotspot is running older iOS versions. We've tried a number of iOS 17.x releases and a number of iOS 16.x releases specifically with our sample app, but have been using this exact code since our app's original iOS 9 deployment target and have had no issues until now.

Answered by SimonApption in 825688022

For anyone reading this in future, here's what we've been told by the team on Feedback Assistant - I simplified the example to using ping to ping another client on the network, which doesn't work as of iOS 18.0.

Please know you can’t use IPv4 to communicate between client devices, you have to use IPv6. IPv6 link-local is perfect for this. You can use ping6 with any of the configured IPv6 addresses to verify.

I can now confirm that using one of the configured IPv6 addresses, we can communicate between clients on the iPhone Hotspot. It's an unfortunate change for us, but one I expect we'll need to handle - our products don't currently support IPv6.

Personal Hotspot is intended as a user-level feature, not an API, and the focus of that user-level feature is STA-to-Internet communication. I’ve talked about this before here on DevForums.

I don’t have any concrete info to share about this change. I’m gonna do some research and get back to you.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

So, we’re not aware of any specific change to isolate your app running on the iPhone from the various STAs on the Personal Hotspot network. So I’m left with two theories:

  • It’s possible that some unrelated change is causing your service discovery code to fail in some way. I see this a lot.

  • It’s possible that we broke this, but not deliberately.

I think it’s best if we try to rule out the first theory. To that end, I recommend that you look at:

  • Extra-ordinary Networking > Broadcasts and Multicasts, Hints and Tips, which has general advice on how to wrangle broadcasts on our platforms.

  • Extra-ordinary Networking > Don’t Try to Get the Device’s IP Address > Service Discovery, which has specific advice for folks implementing their own service discovery.

Please check your code to make sure it’s following this advice. If it is, and you still see this problem, post back here and I’ll take another look at this.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Our code is fairly interface agnostic - before iOS 18.0, we worked correctly on iPhone over Wi-Fi, an ethernet dongle, and Personal Hotspot (USB and Wi-Fi), and on macOS across every interface type we could find (Wi-Fi, Ethernet, Thunderbolt, etc).

This seems to be caused by a larger change in iOS 18, of which you can see a symptom in my original post in this thread - every client connected to an iPhone Personal Hotspot is given an IP address of 192.0.0.2

I understand that this is an implementation detail, and iPhone Personal Hotspot isn't necessarily designed for this functionality, but it'd be really useful to understand the intention behind this change, and what we can do to convince Apple to re-enable the STA->STA use case.

Accepted Answer

For anyone reading this in future, here's what we've been told by the team on Feedback Assistant - I simplified the example to using ping to ping another client on the network, which doesn't work as of iOS 18.0.

Please know you can’t use IPv4 to communicate between client devices, you have to use IPv6. IPv6 link-local is perfect for this. You can use ping6 with any of the configured IPv6 addresses to verify.

I can now confirm that using one of the configured IPv6 addresses, we can communicate between clients on the iPhone Hotspot. It's an unfortunate change for us, but one I expect we'll need to handle - our products don't currently support IPv6.

Changes to Personal Hotspot in iOS 18.0
 
 
Q