I am trying to detect Hotspot status in iOS. For that I need to use the SystemConfiguration
APIs as follows
let sc = SCDynamicStoreCreate(nil, "com.apple.wirelessmodemsettings.MISManager" as CFString, nil, nil)
let info = SCDynamicStoreCopyValue(sc, "com.apple.MobileInternetSharing" as CFString)
But SCDynamicStoreCreate
and SCDynamicStoreCopyValue
are not available for iOS. I need to modify SCDynamicStore.h
file and make these functions available for iOS (They are currently marked available for Mac only).
This link mentions a way to do this by creating duplicate header.. SCDynamicStoreCreate is unavailable: not available on iOS. But this method is not working for me in swift.
How this can be achieved in swift?
Thanks