Thank you very much for your patient response. However, I think my situation was different. After carefully reading the developer documentation, I realized that I hadn't added the Hotspot Configuration Entitlement to my certificate, which caused code 8 to appear. This issue was unrelated to the system version or device model. After I added the entitlement in Xcode, everything started working normally. Here is the link to the documentation, hoping it can help others: https://developer.apple.com/documentation/BundleResources/Entitlements/com.apple.developer.networking.HotspotConfiguration
Nevertheless, I still think it would be better if the error message for missing permissions could be isolated, providing a clearer hint to developers.
Topic:
App & System Services
SubTopic:
Networking
Tags: