Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let hotspotEAPSettings = NEHotspotEAPSettings()
- hotspotEAPSettings.username = "username"
- hotspotEAPSettings.password = "password"
- hotspotEAPSettings.supportedEAPTypes = [NEHotspotEAPSettings.EAPType.EAPPEAP.rawValue] as [NSNumber]
- hotspotEAPSettings.preferredTLSVersion = NEHotspotEAPSettings.TLSVersion(rawValue: Int(1.2))!
- hotspotEAPSettings.isTLSClientCertificateRequired = false
- hotspotEAPSettings.trustedServerNames = ["Example Server Certificate"]
- let hotspotConfig = NEHotspotConfiguration(ssid: "SSID", eapSettings: hotspotEAPSettings)
- hotspotConfig.t
- print(hotspotEAPSettings)
- print(hotspotConfig)
- NEHotspotConfigurationManager.shared.apply(hotspotConfig) {[unowned
- self] (error) in
- print(error)
- if let error = error {
- self.showError(error: error)
- }
- else {
- self.showSuccess()
- }
- }
Add Comment
Please, Sign In to add comment