1. Quickstart
CallerAPI Documentation
  • Quickstart
  • Use cases
    • For carriers (MNOs/MVNOs)
    • CPaaS platforms
    • Cloud communications providers
    • SIP trunking providers
    • PBX/Cloud PBX
    • UCaaS vendors
  • Account
    • Balance and email
      GET
  • Spam protection
    • Voice firewall
      • Get started
      • Quickstart
        • What you get
        • Before you start
        • Test with a recording
        • Connect your switch
        • Switch notes
        • Twilio and Telnyx
        • Send text instead of audio
      • Verdicts
        • Read a verdict
        • What to do with a verdict
        • Block a caller
        • Events and webhooks
      • Honeypot
        • Hand a call over
        • Audio, events, and limits
      • Reference
        • Endpoints
        • Errors
        • Limits and thresholds
        • Production checklist
      • REST
        • What this deployment can do
        • List the verdict categories
        • List the honeypot personas
        • Score a transcript or a recording
        • List your recent sessions
        • Get one session with verdict and intel
        • Twilio voice URL for a screened number
        • Preview the Twilio TwiML
        • Telnyx voice URL for a screened number
        • Twilio voice URL for a honeypot number
        • Telnyx voice URL for a honeypot number
      • WebSocket
        • Live scam filter stream
        • Honeypot stream
    • Daily spam reports
      • Webhook
        • Subscribe to daily reports
        • Unsubscribe from daily reports
        • List webhook subscriptions
        • Manual dispatch of reports
        • Test webhook
      • REST
        • Fetch daily spam reports
    • 15 days spam CSV snapshot
      GET
    • Spam score + HLR
      GET
  • Mobile SDK
    • Get started
    • Quickstart
      • What you get
      • Get your keys
      • Android
      • iOS
      • Flutter
      • React Native
      • Check it works
    • Call screening
      • What each platform can do
      • Android call screening
      • iOS prerequisites
      • iOS add the extension
      • iOS test on device
    • Reference
      • Methods
      • Errors
      • Limits and billing
      • Troubleshooting
  • Data partners
    • Partner tems & docs
    • Upload spam reports
      POST
    • Upload contacts
      POST
  • Fraud prevention
    • Ported date
    • Porting history
    • Online presence
    • KYC user identity
  • Business Caller ID
    • Get started
    • Quickstart
      • Announce a call
      • Verify at INVITE
      • What you get
    • Verdicts
      • Show the name and logo
      • Read a verdict
    • REST
      • Verify the calling number
      • Fetch the logo
      • Announce a call
  • Signer reputation by SPC
    GET
  • Signers ranked by score
    GET
  • Schemas
    • Spam protection
      • Spam score request
      • Business info
      • Carrier info
      • Complaint (without number)
      • Daily spam reports request
      • Complaint (with phone)
    • Signer
  1. Quickstart

iOS

Five minutes. Three edits to your project.
This page covers lookups inside your app. Naming callers on the incoming call screen is Live Caller ID, which is a much longer setup. See iOS prerequisites.

Before you start#

Your app targets iOS 13.0 or later.
You use Xcode 16 or later.
You have your sdk_key and sdk_secret. See Get your keys.

Step 1: add the package#

In Xcode, choose File > Add Package Dependencies.
Paste this URL into the search box at the top right:
https://github.com/dimondevceo/callerapi-sdk
Set Dependency Rule to Up to Next Major Version and leave 1.6.2. Click Add Package.
Xcode now asks which products to add. Tick CallerAPI only. Leave CallerAPILiveCallerID unticked, because it needs iOS 18 and an app extension. Confirm the target is your app. Click Add Package.

Using CocoaPods instead#

Add one line to your Podfile, then run pod install:

Using Package.swift instead#

Step 2: add your credentials#

You have two ways to do this. Pick one.

Option A: in code#

Put this in application(_:didFinishLaunchingWithOptions:), or in the init of your App struct if you use SwiftUI:
Call it once, at launch, before your first lookup.

Option B: in Info.plist#

Open Info.plist. Add two rows:
KeyTypeValue
CallerAPISDKKeyStringyour SDK key
CallerAPISDKSecretStringyour SDK secret
With Option B you write no configuration code. The SDK reads the keys the first time you call a lookup.
Option A wins if you use both.

Step 3: look up a number#

Both lookup functions are async and they can throw:
Run the app. The console prints Caller: CallerAPI LC.
That is the quickstart. Go to Check it works to confirm the dashboard sees your app.

Checking for spam#

Handling errors properly#

A thrown error is a CallerAPIError with a code. Code -2 means your credentials were refused, which is the failure you are most likely to hit first:
A nil result is not an error. It means the number does not belong to a business.
Errors lists every code.

Things that will confuse you#

Every lookup throws code -2. The SDK has no credentials, or the server refused them. Confirm you called configure before the lookup, or that the two Info.plist keys are spelled exactly as above. Confirm your bundle identifier matches the app you created in the dashboard.
lookupLabel returns nil for every number. Try +18883578668, which is a known business. If that also returns nil, your credentials are not reaching the SDK.
Xcode cannot find CallerAPIConfig. You are missing import CallerAPI, or you added only the CallerAPILiveCallerID product. Both types live in CallerAPI.

Move your credentials out of source control#

Create Secrets.xcconfig and add it to .gitignore:
CALLERAPI_SDK_KEY = paste-your-sdk-key
CALLERAPI_SDK_SECRET = paste-your-sdk-secret
In Project > Info > Configurations, set that file for Debug and Release. Then set the Info.plist values to $(CALLERAPI_SDK_KEY) and $(CALLERAPI_SDK_SECRET).
The SDK ignores a value that still looks like $(...), which happens when the configuration file is not wired up. That way a broken setup fails at your first lookup rather than sending a placeholder to the server.

Next#

Check it works
iOS prerequisites
Methods
Modified at 2026-08-19 00:10:52
Previous
Android
Next
Flutter
Built with