Description
Trust is a platform that allows building trust and security between people and technology. Trust-Audit allows you to send custom or automatic audit per device.
#
ImplementationTo implement and use the following library you need to previously install TrustIdentify. Add in your podfile:
And execute:
#
InitializeIf you need to start a main audit instance and set the following to your AppDelegate didFinishLaunchingWithOptions:
To generate a new audit you need activate Access WiFi Information in Signing & Capabilities.
Once the TrustID is created you can use the next login AuditDataManager example:
You can create an audit (without resultObject) with the following code:
You can create an audit (considering resultObject) with the following code:
#
Parameters- trustID: Trust id from TrustIdentify.
- connectionType: Kind of connection type (3g, 4g, wifi).
- connectionName: SSID name.
- type: Audit type.
- result: Audit result (succes, faiulre).
- method: Is the current method who call createAudit.
- operation: Audit type operation.
- optional userDni: User DNI (for example RUT).
- optional userEmail: User e-mail address.
- optional userPhone: User phone number.
- optional userFirstName: User first name.
- optional userLastName: User last name.
- optional resultObject: Optional Object, if you need to add a result object follow the previous example.
#
Optional MethodIf you need to change the environment between production and test you must use the following method:
- TrustAudit.shared.set(currentEnvironment: .prod)
- TrustAudit.shared.set(currentEnvironment: .test)
#
PermissionsTo ensure the proper functioning of the audit library, in signing and Capabilities layer we must add the "Access WiFi Information" capability.
NOTE: Remember to generate the TrustID with the TrustIdentify library.
To get location coordinates we need add in your "Info.plist" the next lines and implement an location permissions flux.