Learn how to use our client side Apple SDK.
This guide is a work in progress. If you have any questions, please reach out.
The Apple SDK is published in GitHub at https://github.com/prelude-so/apple-sdk .
The Apple SDK allows you to capture certain device signals that will be reported back to Prelude and perform silent verification of mobile devices.
It is provided as a regular Swift package that you can import as a dependency directly into your iOS application.
Usage of the SDK to gather the signals very simple, you just need to configure it with your SDK key and call a single dispatch function:
Important: When you generate the SDK key in the Prelude dashboard you will be able to copy it and you should store it somewhere secure, as the dashboard will not allow you to display the same key again.
Once you get the dispatch ID you should report it back to your own back-end API to be forwarded in subsequent network calls.
There is no restriction on when to call this API, you just need to take this action before you need to report back the dispatch ID. The recommended way of integrating it is to call the dispatchSignals
function before displaying the phone number verification screen in your application. This way you can ensure that the device signals are captured and the dispatchID
can be sent to your back-end with the phone number. Your back-end will then perform the verification call to Prelude with the phone number and the dispatch identifier.
The Silent Verification feature allows you to verify a phone number without requiring the user to manually enter a verification code.
It is available for certain carriers and requires a server-side service to handle the verification process. For this verification method to work properly, you must gather the device signals mentioned before and report the dispatch identifier to your backend (usually in your APIs verification endpoint).
Please refer to the Silent Verification documentation for more information on how to implement this feature.
We currently do not offer CocoaPods integration for the SDK, but creating one is a relatively straightforward process. The steps to take are:
prelude-apple-sdk/sdk
.Package.swift
file and copy the url for the Core sdk defined in the binary target (similar to https://prelude-public.s3.amazonaws.com/sdk/releases/apple/core/X.X.X/PreludeCore-X.X.X.xcframework.zip
).prelude-apple-sdk/sdk/core
). You should have a single subdirectory PreludeCore.xcframework
under prelude-apple-sdk/core
Package.swift
file.podspec
file in the root of the prelude-apple-sdk
directory with the following content:The final directory structure should look like this:
Import this .podspec
file into your project and run normally.
With these steps you should have a working version of the SDK in your project.