Skip to content

markoengelman/HotspotClient

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lightweight HotspotClient framework

CI-iOS

  • Simple iOS framework that helps you connect iOS device to specific Wi-Fi network from you application.
  • Framework supports iOS from 11.0

Installation

Swift package manager

dependencies: [
  .package(url: "https://github.com/markoengelman/HotspotClient.git", .branch("main")
]

How to use

If you want to run 'Wi-Fi' validation after successfully applying configuration use HotspotClientWithValidation. By default you can use already provided HotspotClientValidationPolicy or you can inject your own policy based on your needs.

let client = NEHotspotClient(hotspotManager: .shared)
let ssidLoader = SystemSSIDLoader()
let validatedClient = HotspotClientWithValidation(
  client: client, 
  ssidLoader: ssidLoader, 
  policy: HotspotClientValidationPolicy.validateRetryCount
)

let configuration = HotspotConfiguration(
  ssid: "anySSID", /* SSID of target network */
  password: "anyPassword", /* Passhprase of target network */
  isWEP: false, 
  joinOnce: true
)

validatedClient.connect(with: configuration) { result in }

About

Simple iOS framework which helps you connects iOS device to specific Wi-Fi from the app.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages