I recently asked a very similar question for Android, where it is a serious concern that any app can record what Wifi SSID you've connected to.
There are these Google, SkyHook, and Apple SSID databases that allow anyone to know which ssid is located where, and the info can be leaked by your neighbour not just your usual devices on your own router.
To quote:
This means that even if you are on a VPN, even if you turn off wifi scanning, even if you turn off location services and take out your sim card, even if you stop broadcasting your router's wifi SSID, your apps will be able to know what wifi SSID you are currently on.
This means that an attacker (read: the surveillance capitalism :) ), can figure out if/when I am home, and which other devices that are/were online have used the same SSID. E.g. all my family's (mandatory) banking apps will know where my family members congregate, and could change my insurance score, or other "insert dystopian scenario here".
Considering what I described, I don't think there is any wiggle room for you to ever hide your real location from a bad (state, corp, hacker) actor. Am I wrong? Can I hide my SSID from the apps that are on my phone?
Is this also how iOS works? I'm aware Apple itself knows what wifi and what color underewear all of your family members are wearing, and that it is selling (yes, sells less data than others but still also sells data) or otherwise using conclusions from analyzing that data and then sending/selling, to other services and/or third parties. But, does it technically allow apps to build this kind of explicit connected device (e.g. SSID) history?
Also, (since I'm less familiar with iOS) is there a feature where your iPhone constantly scans all devices around you (wifi and bluetooth) to improve location or other features? And if so, which specific device names ever end up being visible to your apps? (and how to prevent that)