I want to create a hotspot network in iOS app using swift. Also please suggest ony apple approved APIs. Thanks!
NEHotspotHelper is an official API to do exactly this kind of stuff. Though the API is not an 'Open to All' kind. It needs the entitlement 'com.apple.developer.networking.HotspotHelper' to be included in your app. To use this entitlement you need to ask for a permission from Apple to use this class with your app's bundle identifier with a clear reason for why you need it with some other details of your app. Use this link to apply for the entitlement. Once apple sends an approval mail to you, you are good to go!
来源:https://stackoverflow.com/questions/48517727/how-to-create-a-hotspot-network-in-ios-app-using-swift