Latest 1.0.3
Homepage https://github.com/Astranno/WiFiHelper
License MIT
Platforms ios 11.4
Authors

Wi-Fi Helper

Version
License
Platform

An iOS framework for programmatically connecting to Wi-Fi networks. (HotspotHelper entitlement is required)

Contents of this Readme

Installation

CocoaPods

WiFiHelper is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "WiFiHelper"

Carthage

WiFiHelper is available through Carthage. To install it, simply add the following line to your Cartfile:

github "Astranno/WiFiHelper" == 1.0.3

Submodule

If you don’t use CocoaPods, you can still add WiFiHelper as a submodule, drag and drop WiFiHelper.xcodeproj into your project, and embed WiFiHelper.framework in your target.

  • Drag WiFiHelper.xcodeproj to your project
  • Select your app target
  • Click the + button on the Embedded binaries section
  • Add WiFiHelper.framework

Manual

You can directly drag and drop the needed files into your project, but keep in mind that this way you won’t be able to automatically get all the latest WiFiHelper features.

Usage

The com.apple.developer.networking.HotspotHelper entitlement is required in order to use NEHotspotHelper. To request this entitlement, complete the questionnaire at https://developer.apple.com/contact/network-extension.

Setup

Make sure to import WiFiHelper:

import WiFiHelper

Creating a Network

First thing you have to do is to create a network. There are a few types dependant on the encryption type.

Unsecured Network

let network = Network(ssid: "NETWORK SSID")

Network with WEP Encryption

let network = Network(ssid: "NETWORK SSID", password: "NETWORK PASSWORD", isWEP: true)

Network with WPA/WPA2 Personal Encryption

let network = Network(ssid: "NETWORK SSID", password: "NETWORK PASSWORD", isWEP: false)

Connecting to a Network

To connect to a network, use the following method:

network.connect { (error) in
  //completion block
}

Check Connection

To check whether or not a user is connected to a network, use the following method:

let isConnectedToNetwork: Bool = network.isConnected()

Authors

WiFiHelper was made by Astranno

Apps that Use Wi-Fi Helper

Wi-Fi Connect

License

WiFiHelper is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "WiFiHelper",
    "version": "1.0.3",
    "summary": "An iOS framework for connecting to Wi-Fi networks programmatically",
    "swift_version": "5.0",
    "description": "An iOS framework for connecting to Wi-Fi networks programmatically",
    "homepage": "https://github.com/Astranno/WiFiHelper",
    "license": "MIT",
    "authors": {
        "Astranno": "[email protected]"
    },
    "platforms": {
        "ios": "11.4"
    },
    "source": {
        "git": "https://github.com/Astranno/WiFiHelper.git",
        "tag": "1.0.3"
    },
    "source_files": [
        "WiFiHelper",
        "WiFiHelper/**/*.{h,m,swift}"
    ]
}

Pin It on Pinterest

Share This