Guest User

Untitled

a guest
Jun 2nd, 2018
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. let hotspotEAPSettings = NEHotspotEAPSettings()
  2. hotspotEAPSettings.username = "username"
  3. hotspotEAPSettings.password = "password"
  4. hotspotEAPSettings.supportedEAPTypes = [NEHotspotEAPSettings.EAPType.EAPPEAP.rawValue] as [NSNumber]
  5. hotspotEAPSettings.preferredTLSVersion = NEHotspotEAPSettings.TLSVersion(rawValue: Int(1.2))!
  6. hotspotEAPSettings.isTLSClientCertificateRequired = false
  7. hotspotEAPSettings.trustedServerNames = ["Example Server Certificate"]
  8. let hotspotConfig = NEHotspotConfiguration(ssid: "SSID", eapSettings: hotspotEAPSettings)
  9. hotspotConfig.t
  10. print(hotspotEAPSettings)
  11. print(hotspotConfig)
  12. NEHotspotConfigurationManager.shared.apply(hotspotConfig) {[unowned
  13.  
  14. self] (error) in
  15. print(error)
  16. if let error = error {
  17. self.showError(error: error)
  18. }
  19. else {
  20. self.showSuccess()
  21. }
  22. }
Add Comment
Please, Sign In to add comment