The software documentation provides elaborated information on every class, function and member in the SDK. The class documentation is a .doccarchive file that can be opened with Xcode. To get it, please follow those steps:
PerimeterX_SDK.doccarchive file via Xcode.The demo app gives you a general idea on how you should implement the SDK in you app. To download it, please follow those steps:
The following are required to install the SDK:
Choose the SDK version according to your development environment:
You can add the SDK to your project with one of the following options:
Swift Package Manager
Add the package from the following repository: https://github.com/PerimeterX/px-iOS-Framework
We recommend using the following link repository: https://github.com/PerimeterX/px-iOS-Framework-spm. The main git repository for is very large, and Swift Package Manager always downloads the full repository with all git history. This link repository is much smaller, so can be downloaded much more quickly.
Instead of downloading the full git history of PerimeterX iOS SDK and building it from source, this repository just contains a pointer to the precompiled XCFramework included in the latest PerimeterX iOS SDK release.
CocoaPods
Add the PerimeterX pod to your Podfile.
Manual
PerimeterX_SDK.xcframework file to you project.Starting the SDK should be the first thing that runs in your app. Therefore, you should start it in your AppDelegate class:
AppDelegate class to conform to the PerimeterXDelegate (optional).PXPolicy object, in the UIApplicationDelegate’s didFinishLaunchingWithOptionsfunction.PerimeterX/start(appId:delegate:policy:) function, with your AppID and the policy, in the UIApplicationDelegate’s didFinishLaunchingWithOptions function. This function should be called only once.The PerimeterX/start(appId:delegate:policy:) function set up the session for a given AppID. It’s essential to call this function as early as possible in your application and before any URL request to your server.
You may add custom parameters for additional configuration.
The SDK creates an instance ofCMMotionManager. However if your app also creates an instance ofCMMotionManager you should disable the motion detection in the SDK because it’s not recommended to have more than one instance in the app. You can do this by settingallowDeviceMotionDetection=false in the policy.
After writing the code above, the SDK will:
Review the following topics: