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...
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...
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
The SDKs provide a few basic methods that ultimately allow provisioning the user device with a WiFi profile. There are two main steps to provision a WiFi profile using the SDK:
To authenticate the SDK and connect it to your Cloud4Wi account, you need to generate an API key
and API secret
.
In the Cloud4Wi dashboard, go to Developers and select the WiFi SDK tab. Click the button New Mobile Add. The app Project dialog appears.
Enter a reference name for your app project. Enter the Android Package Name and iOS Bundle ID.
Enter the name of the SSID that must match the one used in the WiFi network. Leave Hidden SSID unchecked.
In the Passpoint section, enter your Domain Name, such as <company_name>.securewifi.io. In the Operator Friendly Name enter a value that identifies your company for the end users, such as "Secure WiFI by Company".
Check "Add the "Settlement-Free" RCOI to Passpoint profiles" if you want your mobile app users to be able to connect automatically to the WiFi of millions of settlement-free access points around the world from the OpenRoaming federation.
Click Save to return to the main table. Copy the API Key and API Secret in the SDK Credentials column of the app you just created.
A User must be created on the Cloud4Wi systems before creating and installing a WiFi Profile.
Users can be initialized with attributes and identifiers that allow the reconciliation of the user data with external systems, including CRMs, CDPs, and marketing automation tools. This includes email address, phone number, or any external identifiers known to the mobile app (check the Customer object for iOS and Android for the full list of attributes).
Cloud4Wi suggests passing at least a recognizable identifier to allow an easier reconciliation of the User records in Cloud4Wi with the related records in other systems, such as an external id or email address.
The user can be initialized by passing a specific username and password generated by the mobile app. If not provided in the initialization, Cloud4Wi generates random network credentials associated with the user, which will then be used to generate either Passpoint or WPA2 Enterprise Wireless Profiles.
Cloud4Wi allows configuring specific data processing rules in the account configuration that process each individual user's data based on the consent fields set on its record. Coud4Wi allows to create any custom consent fields from the dashboard, but it comes with 3 pre-configured consents:
Privacy Policy
Terms of Service
Marketing
The Terms of Service (termsOfUse)
and Privacy Policy (privacy)
consents are mandatory to be set to true
whenever a customer is added via APIs or via the mobile SDKs.
The Marketing consent is an optional, pre-defined field that can be set to record consent to receive promotional marketing communications. The same purpose can be achieved using custom fields if necessary.
To retrieve the custom consents, if needed, you can use the dedicated methods (getListOfPolicies)
The SDK method to initialize the user also requires setting the profiling
parameter that determines whether the customer could be "profiled' or not. The Profiling processing activity processes and stores the customer visit history and computes personalized behavioral attributes.
The user can be initialized at any time by the app, for example contextually with the app sign-up process (if any), or right before triggering the WiFi Profile installation.
Android
iOS
WiFi Profiles are configuration files, specific to each operative system, that allow a device to connect and authenticate on a WiFi network. The method to install the WiFi Profile takes as input the network credentials generated in the previous step.
When the method to install the WiFi Profile is invoked, the Operative System prompts an alert to the user to ask for permission/confirmation (see user experience).
Cloud4Wi SDK provides two types of authentication methods:
WPA2 Enterprise
Passpoint
Read the Overview to learn more about the differences between WPA2 Enterprise and Passpoint.
Android
iOS
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.
This method triggers the installation of a Passpoint Wi-Fi profile in the device.
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.
Returns the identified of the customer created/logged with Cloud4wi Wifi SDK
It deletes the WPA2 profile installed by the app.
It deletes the Passpoint profile installed by the app.
Initialize the SDK and updates certain Customer attributes at every login
Initializes the customer object in the Cloud4Wi account
Triggers the installation of a WPA2-Enterprise Wi-Fi profile in the device
Triggers the installation of a Passpoint Wi-Fi profile in the device
Returns list of WPA2-Enterprise Profiles initialized on the device
Returns list of Passpoint Profiles initialized on the device
Deletes installed WPA2Enterprise profile
Deletes installed Passpoint profile
Removes the customerId saved during the create customer, removes any reference to the customer, removes Wi-Fi profiles related to the customer
Returns the identified of the customer created/logged with Cloud4wi Wifi SDK
Retrieve customer profile by username/password
Update the Customer attributes
Create empty customer with default policies
Update a Customer metadata
Search a Customer by customer properties
Get the list of policies configured in the Cloud4Wi account
Set SDK authentication parameters
Configure the list of applications to be interlinked with the current application
Get the applications interlinked with the current one
username
authorized username
password
authorized password
username
authorized username
password
authorized password
The session is opened when one of this functionscreateCustomer,
setupCustomer
and getCustomerInfo
return success.
It deletes passpoint internet profiles installed in the device using createPasspointProfile and createWPA2EnterpriseProfile
.
The delete of the wpa2-ent profile is not supported on iOs for technical limitation, the only way to delete it is to remove the application or to forgot the wifi network.
this limitation no longer exists since SDK v 1.6.0
Note:
The attributes:
username
, password
, lock
are not available in the update customer function
They represent the list of the policy to apply to the customer. You can retrieve them using the function
It is mandatory that the policies returned by the function getListOfPolicies
in position 0 and 1 (named "termsOfUse
" and "privacy
") are set to true
.
In order to be able to process and profiling the customer it is necessary that the attributes profiling
and ppd
are set to true
.
Track customers profile status
fix getCreatedWPA2EnterpriseProfiles
and getCreatedPasspointProfiles
introduced deleteWPA2EnterpriseProfile
Added deletePasspointProfile
method
In the logout
are removed the Passpoint profile installed
Added method updateCustomer
Added DEBUG_MODE
Fix support iOs simulator for Apple Silicon architecture
fix date format in 'lastSeen' field
Passpoint support
New create customer function with deduplication on specific parameter
Extended support of custom policies
Note: this version has not fully compatible with version 1.1.0 (see following migration guide)
The signature of the method
has been replaced by
To create a customer without deduplication:
The signature of the method getListOfPolicies
has been replaced by
Create customer now support the attributes of the CreateCustomer API v3
WPA2-Enterprise profile creation support
Integration with Location SDK
Variable | Description | Example |
---|
The debug mode allows you to have useful information on the console for debugging the application and the SDK. When enabled - SDK will print configuration parameter on startup and additional information on every API request that may help you during application development.
To enable the debug mode you have to configure this key into plist file of the app.
In DEBUG MODE sensitive informations (like customer attributes, credentials, keys ...) are written to the debug console.
To disable the DEBUG MODE before deploy/publish the application.
If you need to get the remote push notification token and associate it to a customer you have to init the SDK with the token using the method cloud4WiSDKWiFi.initC4w(token).
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:
Variable | Description | Example |
---|
Variable | Description | Example |
---|
This method initiative the customer object in the Cloud4Wi account. This method must be invoked before installing the WiFi Profile.
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 deduplicate
string is optional. If set, the system will check if an existing 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,
and source
)
Pssible values of deduplicate
string are:
To create a customer without any deduplicaiton check, set deduplicate
string to null.
If username
and password
are not set in the Customer object, they are assigned randomly during the customer creation and returned to the app in the CustomerCreate Response object.
It deletes the WPA2 enterprise profile installed by the app.
It deletes the Passpoint profile installed by the app.
Variable | Description | Example |
---|
To integrate SDK library into your Android project you need to add Cloud4Wi repository. After that add the following dependency to your project's build.gradle along with 3 dependencies required by Cloud4Wi SDK as described below:
In order to connect your application with your Cloud4Wi account, you need to provide SDK with clientKey
and clientSecret
credentials.
Credentials may be provided to SDK either via configuration property or at runtime. Add two records into your application's string.xml
as in examples below:
Add the following in 'application' section of your AndroidManifest.xml
file:
AndroidManifest
of this library requires following permissions
In following code example we will create new customer in the API and then install WPA2-Enterprise Wi-Fi profile on Android phone. After that when customer will be in range of Wi-Fi network with specified SSID - his device will connect automatically.
This example represents following use-case.
MobileSDK configuration. Setting API client credentials.
Read list of organization policies from API.
Creating new customer in API.
Verifying customer credentials in API.
Creation of WPA2-Enterprise Wi-Fi profile on Android device for test user to connect to test SSID.
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
Param | Format | Example |
---|---|---|
status
OK if customer has been created, KO otherwise
{"OK","KO"}
generated
data when the customer has been created
2022-07-08T13:15:43.885Z
id
id of the customer created
986a372347aac5e4a94516db835d58aa
organizationId
organizationId owner of the customer
3a8ccd060216452e09b2b32e750cb5eb
locationId
locationId owner of the customer
ff80808170f5232b01754653699e109e
hotspotId
hotspotId associated to the customer (not applicable when customer is created via mobile SDK)
username
username of the customer to access cloud4wi services
YDSDFDKJEAS
password
password of the customer to access cloud4wi services
XYXXZXYX
mailSent
deprecated
nil
language
ISO 639-1
"it"
country
ISO 3166-1 alpha2
"IT"
birthdate
YYYY-MM-DD
"2000-12-01"
gender
{M,F,O}
"M"
phoneNumber
international prefix + number
"+39123456789"
memberId | loyalty member card id |
number | generic document number |
personalId | id card number |
type | type of document | "passport" |
cid | id of the customer |
extId | a string value associated to the customer. Usually it is used to store an external CRM id of the customer |
extProp1 | a generic string value associated to the customer |
extProp2 | a generic string value associated to the customer |
realm | Passpoint home realm which will be recognized by device as home Passpoint network. |
|
friendlyName | User friendly name describing Passpoint network. |
|
roaming | It indicates if device with Passpoint profile would try to connect to 3rd party Passpoint networks. |
|
outerIdentity | The identity string to be used in the EAP-Identity/Response packet during outer EAP authentication. |
|
username | username associated to the profile |
|
trustedServerNames | An array of server certificate common name strings used to verify a server's certificate |
|
installedBy | the bundleId of the app installed the profile |
|
installed | date when the profile has been installed |
|
status | OK if customer has been created, KO otherwise | {"OK","KO"} |
generated | data when the customer has been created | 2022-07-08T13:15:43.885Z |
present |
id | id of the customer created | 986a372347aac5e4a94516db835d58aa |
extId | a string value associated to the customer. Usually it is used to store an external CRM id of the customer |
ssid | Wi-Fi network SSID to connect to |
|
outerIdentity | The identity string to be used in the EAP-Identity/Response packet during outer EAP authentication. |
|
username | username associated to the profile |
|
trustedServerNames | An array of server certificate common name strings used to verify a server's certificate |
|
installedBy | the bundleId of the app installed the profile |
|
installed | date when the profile has been installed |
|
This method allows retrieving the list of consents (referred as "policies" in this context) configured in the Cloud4Wi account, including the default one and the custom-defined ones.
The first 3 consents returned by the method are always the ones referring to:
terms of use ("termsOfUse
")
privacy policy ("privacy
")
marketing ("marketing
")
As a reminder, to create a Customer is always mandatory to set the privacy policy and the terms of use to true
.
You can get your API client key and secret following these instructions.
Track customers profile status
fix to handler deleted/locked customer
fix bug with SDK-Version in API requests header.
fix bug with NullPointer in token update service.
Added deletePasspointProfile
and deleteWPA2EnterpriseProfile
methods
In the logout
are removed the internet profiles installed
Added method updateCustomer
Added DEBUG_MODE
Passpoint support
New create customer function with deduplication on specific parameter
Extended support of custom policies
Note: this version has not fully compatible with version 1.1.0 (see following migration guide)
The signature of the method
has been replaced by
To create a customer without deduplication:
The signature of the method getListOfPolicies
has been replaced by
Create customer now support the attributes of the CreateCustomer API v3
WPA2-Enterprise profile creation support
Integration with Location SDK
Initialize the SDK and updates certain Customer attributes at every login |
Initializes the customer object in the Cloud4Wi account |
Create empty customer with default policies |
Triggers the installation of a WPA2-Enterprise Wi-Fi profile in the device |
Triggers the installation of a Passpoint Wi-Fi profile in the device |
Returns list of WPA2-Enterprise Profiles initialized on the device |
Returns list of Passpoint Profiles initialized on the device |
Returns the identified of the customer created/logged with Cloud4wi Wifi SDK |
Retrieve customer profile by username/password |
Update the Customer attributes |
Update a Customer metadata |
Search a Customer by customer properties |
Get the list of policies configured in the Cloud4Wi account |
Set SDK authentication parameters |
Configure the list of applications to be interlinked with the current application |
Get the applications interlinked with the current one |
Variable | Description | Example |
---|
Variable | Description | Example |
---|
The debug mode allows you to have useful information on the console for debugging the application and the SDK. When enabled - SDK will print configuration parameter on startup and additional information on every API request that may help you during application development
To enable debugging add following record to your application's string.xml
:
In DEBUG MODE sensitive informations (like customer attributes, credentials, keys ...) are written to the debug console.
To disable the DEBUG MODE before deploy/publish the application.
Cloud4WiDSK searches for com.google.firebase.messaging.FirebaseMessaging
class in classpath. If such a class is present it means SDK can call getToken()
methods and therefore update push-token.
To enable Firebase push notifications your application should be set it up accordingly. Please refer
Your application needs to have MyFirebaseMessagingService
registered in AndroidManifest.xml
and google-services.json file retrieved from https://console.firebase.google.com placed next to your project build.gradle
Cloud4WiSDKWiFi allows you to share information about installed Wi-Fi profiles among applications on the same Android 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 the following in the 'application' section of your AndroidManifest.xml file:
NOTE: 'multiprocess' and 'exported' parameter values have to be set to 'true'
After adding required configuration to Android Manifest you have to supply SDK with the list of interlinked applications identifiers:
cid | id of the customer |
extId | a string value associated to the customer. Usually it is used to store an external CRM id of the customer |
extProp1 | a generic string value associated to the customer |
extProp2 | a generic string value associated to the customer |
status | OK if customer has been created, KO otherwise | {"OK","KO"} |
generated | data when the customer has been created | 2022-07-08T13:15:43.885Z |
present |
id | id of the customer created | 986a372347aac5e4a94516db835d58aa |
extId | a string value associated to the customer. Usually it is used to store an external CRM id of the customer |
They represent the list of the policy to apply to the customer. You can retrieve them using the function
It is mandatory that the policies returned by the function getListOfPolicies
in position 0 and 1 (named "termsOfUse
" and "privacy
") are set to true
.
In order to be able to process and profiling the customer it is necessary that the attributes profiling
and ppd
are set to true
.
Variable | Description | Example |
---|---|---|
Variable | Description | Example |
---|---|---|
Param | Format | Example |
---|---|---|
language
ISO 639-1
"it"
country
ISO 3166-1 alpha2
"IT"
birthdate
YYYY-MM-DD
"2000-12-01"
gender
{M,F,O}
"M"
phoneNumber
international prefix + number
"+39123456789"
memberId
loyalty member card id
number
generic document number
personalId
id card number
type
type of document
"passport"
status
OK if customer has been created, KO otherwise
{"OK","KO"}
generated
data when the customer has been created
2022-07-08T13:15:43.885Z
id
id of the customer created
986a372347aac5e4a94516db835d58aa
organizationId
organizationId owner of the customer
3a8ccd060216452e09b2b32e750cb5eb
locationId
locationId owner of the customer
ff80808170f5232b01754653699e109e
hotspotId
hotspotId associated to the customer (not applicable when customer is created via mobile SDK)
username
username of the customer to access cloud4wi services
YDSDFDKJEAS
password
password of the customer to access cloud4wi services
XYXXZXYX
locked