Accessing the API
How to access and use the ContactsManager SDK API
Installation
Install and initialize the ContactsManager SDK in your client application.
Swift Package Manager
Add the ContactsManager package to your Swift project by adding it as a dependency in your Package.swift
file:
Or in Xcode:
- Go to File > Swift Packages > Add Package Dependency
- Enter the repository URL:
https://github.com/arpwal/contactsmanager-ios.git
- Specify a minimum version of
<latest-version>
from the repository - Click Next and complete the integration
SDK Initialization
Swift Package Manager
Add the ContactsManager package to your Swift project by adding it as a dependency in your Package.swift
file:
Or in Xcode:
- Go to File > Swift Packages > Add Package Dependency
- Enter the repository URL:
https://github.com/arpwal/contactsmanager-ios.git
- Specify a minimum version of
<latest-version>
from the repository - Click Next and complete the integration
SDK Initialization
Installation
Platform Setup
iOS Setup
- Install CocoaPods dependencies:
- Add permissions to
Info.plist
:
Android Setup
The dependency is automatically added to your project.
SDK Initialization
Installation
- Download the latest
ContactsManager.framework
from Releases - Drag and drop the framework into your Xcode project
- Add framework to “Link Binary With Libraries” in Build Phases
- Add to Info.plist:
SDK Initialization
Installation
Add the library to your project’s build.gradle
:
Get Latest Version
You can check for the latest version of the SDK on Maven Central.
Required Permissions
Add the following permissions to your AndroidManifest.xml
:
SDK Initialization
Accessing the Service
The ContactsManager SDK provides a comprehensive API through the ContactsService
class. Here’s how to access and use the service:
Error Handling
The SDK provides comprehensive error handling across all platforms:
Important: Secure Your Users’ Data
Server-side token generation is required to ensure the security of your users’ contact data. By handling authentication through your server, you establish a two-factor security model:
- API Key verification
- Server-generated token validation
This approach ensures that only authenticated devices with valid server-issued tokens can access your users’ contact data. Your server maintains complete control over data access, allowing you to:
- Authenticate users through your existing auth system
- Immediately revoke access when needed
- Protect against unauthorized data access
- Monitor and audit access patterns
See the server setup section in the Quickstart guide for implementation details.