Mobile SDK - IOs Native
The Cloud4Wi iOS Mobile SDK offers a simple yet efficient Objective-C API that you can use to add rich WiFi capabilities to your iOS Apps.
- SDK library: download the password-protected zip package below. The password will be communicated by Cloud4Wi during delivery
- SSID name: note that the SSID name has to be set in the App code, so make sure to know in advance the name of WiFi network you want to enable
- We prepared a getting started project that you can clone and import in your environment to get started. Contact our team to get access to the GIT.
Download SDK framework and then add it to 'Frameworks' folder inside your iOS project.
Embed SDK in your App
Make sure Cloud4WiSDKWiFi framework is added to your project and option 'Embed & Sign' is selected.
In order to connect SDK to Cloud4Wi API you have to specify 'clientKey' and 'clientSecret'.
You can set them in your App Info.plist file by adding two following keys:
Alternatively you can configure client API credentials at runtime (Objective-C code example):
3. Framework API overview
3. Required Capabilities
In order to use the Cloud4WiSDKWiFi you have to add the 'Hotspot Configuration' capability to your application:
4. Code examples:
In the following code example we create new customer using Cloud4Wi API and then install WPA2-EnterpriseWi-Fi profile. After that when in range of configured Wi-Fi network iOS device will connect automatically.
Example represents the following use-case:
- SDK configuration.
- Read the list of organization policies from API.
- Creating new customer in API.
- Verifying customer credentials in API by retrieving customer info (optional).
- Create WPA2-Enterprise Wi-Fi profile on iOS device.
4. Additional features
Interlinking multiple applications on one device.
Cloud4WiSDKWiFi allows you to share information about installed Wi-Fi profiles among applications on same iOS device.This will help to avoid duplications of Wi-Fi profiles and make your application more flexible.
NOTE: this feature is optional, you may need it only if you integrate SDK in more than one application from your domain.
To enable interlinking you have to add 'App Group' capability in every application where SDK is integrated.Group name must be set to 'group.com.cloud4wi.sdk.wifi':
After adding required capability you have to supply SDK with the list of interlinked applications identifiers: