iOS Sample App

Example Application

An example appliction is included with ZeroKit to demonstrate its usage. Open the ZeroKit.xcworkspace workspace which contains a ZeroKitExample project. It demonstrates the following features:

  • Registration
  • Login and logout
  • Tresor creation
  • Tresor sharing
  • Encryption
  • Decryption

Configuring the Example

The example app requires a backend to function. We created a sample backend that you can use for the mobile and web ZeroKit sample apps. You can find the backend and setup instructions here.

To use the example app you first have to set it up with your ZeroKit configuration. In the ZeroKitExample/Config.plist file set the values for ZeroKitAPIBaseURL, ZeroKitClientId and ZeroKitAppBackend keys. If this file does not exist then copy the sample Config.sample.plist file in the same directory to create one:

Config

<key>ZeroKitAPIBaseURL</key>
<string>{TenantBaseUrl}</string>
<key>ZeroKitClientId</key>
<string>{ClientId}</string>
<key>ZeroKitAppBackend</key>
<string>{AppBackendUrl}</string>
  • ZeroKitAPIBaseURL: This is your tenant's service URL. You can find this URL on the management portal.
  • ZeroKitClientId: This is the client ID for your OpenID Connect client that you wish to use with your mobile. The client should be configured with the following parameters on the management portal:

    • Redirect URL should have the following format (note the trailing slash): https://{Client ID}.{Tenant ID}.api.tresorit.io/

    • Flow should be set to Hybrid

    • You can optionally turn on Requires proof key (DHCE)

  • ZeroKitAppBackend: This is the URL of the sample application backend. You can find the sample backend and setup instructions here.

Now you are ready to Build and Run (⌘R) the example in Xcode.

Unit tests

You can also take a look at the unit tests in this project to see further examples. To run the tests you must have the example app configured as described in Configuring the Example section.

results matching ""

    No results matching ""