Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
This method initializes the customer object in the Cloud4Wi account. This method must be invoked before installing the WiFi Profile.
The customer
object is described here.
Calling this function It is equivalent to a make a login. The success of this function opens a session with the customer returned. To close the session use logout()
method.
The deduplicateAttribute
attribute is optional. If set, the system will check if an exisitng customer with a matching attribute already exists in the same Cloud4Wi account.
If a matching record exists, the createCustomer
method will override the existing matching customer attributes with the one passed in the createCustomer
(except for username, password, source
)
Pssible values of deduplicateAttribute
are:
To create a customer without any deduplication check, set deduplicateAttribute
to nil.
Username and password are credentials for the user in the c4w environment and are used for Radius authN/Z.
If username
and password
are not set in the Customer object, they are generated randomly during the customer creation and returned to the app in the CustomerCreate Response object. This auto generation of the credentials is the best way to proceed.
If the method executes with no errors, it returns the object CustomerCreateResponse
The following app demonstrates an example of using the WiFi SDK (and the Location SDK).
The app is ready to run but you have to set your own credentials by putting them into plist file. To test the WiFi section, based on Passpoint, you have to use a physical iOS device and have an access point configured in a Cloud4Wi account.
Add pod 'c4w-wifi-sdk'
to your Podfile
and run pod install
.
https://github.com/Cloud4Wi-Create/iOS-WifiSDK-SwiftPackage
In order to connect SDK to your Cloud4Wi account, you have to specify 'clientKey' and 'clientSecret'.
You can set them in your App Info.plist file by adding two following keys:
In order to use the SDK you have to add the 'Hotspot Configuration' capability to your application
This example represents the following use-case:
Read the list of organization policies (the term "policies" is used to refer to consents and agreements that are configured on the Cloud4Wi account)
Creating new customer
Verifying customer credentials in API by retrieving customer info (optional)
Create WPA2-Enterprise Wi-Fi profile on iOS device
To track the last seen date of the customer and to keep always updated the remote push notification token (if applicable) it is necessary to call the method every time the app starts
you can put it into didFinishLaunchingWithOptions
for example
This method triggers the installation of a WPA2-Enterprise Wi-Fi profile in the device. The OS will trigger a dialog to ask the user the consent to allow such operations. See User Experience
Param | |
---|---|
Username
and password
are the WiFi credentials of a Cloud4wi customer. When you create a customer using the method createCustomer
the credentials are returned in onSuccess
in the CustomerCreateResponse
object.