Popin iOS SDK v2 – Integration Documentation
PopinCall is an iOS library that enables seamless integration of video calling functionality into your iOS applications. It provides an easy-to-use interface for connecting users with experts or support agents with robust real-time communication.
Requirements
iOS 15.0+
Swift 5.0+
Xcode 14.0+
Installation
Swift Package Manager
Add PopinCall as a dependency in your Package.swift:
dependencies: [
.package(url: "https://github.com/Springr-Creatives/Popin-Library-iOS.git", from: "1.0.0")
]Or in Xcode:
Select File > Add Package Dependencies...
Enter the package URL:
https://github.com/Springr-Creatives/Popin-Library-iOS.gitSelect the version you want to use.
Permissions
Add the following to your Info.plist:
Background Modes
Enable the following Background Modes in your app's Signing & Capabilities:
Audio, AirPlay, and Picture in Picture - For audio/video streaming during calls
Voice over IP - For VoIP call handling
Background fetch - For downloading content from the network
Or add directly to your Info.plist:
Quick Start
1. Import the Library
2. Initialize with Configuration
3. Start a Call
4. Implement Listeners
Runtime Configuration Updates
Setting User Identifier
identifier
String
A unique identifier for the user
onSuccess
() -> Void
Called when the identifier is set successfully
onFailure
(String) -> Void
Called with an error message on failure
Updating User Name & Contact Info
name
String
Updated display name
contactInfo
String
Updated email or phone number
onSuccess
() -> Void
Called when the update succeeds
onFailure
(String) -> Void
Called with an error message on failure
Receiving Incoming Calls via PushKit
Step 1: Enable Incoming Calls
Step 2: Initialize Popin in AppDelegate
Step 3: Register for VoIP Pushes Early
API Reference
Popin
getCallMeta
callId
Int
The call ID
onSuccess
(String) -> Void
Called with the raw JSON response string
onFailure
(String) -> Void
Called with an error message on failure
deinitialize
setGroup
identifier
String
The group ID
onSuccess
() -> Void
Called when successful
onFailure
(String) -> Void
Called with error
setIdentifier
PopinConfig.Builder
.userName(String)
""
User's display name
.contactInfo(String)
""
User's contact info
.callerId(String)
nil
Custom caller identifier
.identifier(String)
nil
Unique user identifier
.sandboxMode(Bool)
false
Use sandbox
.product(PopinProduct)
nil
Product context
.meta([String: String])
[:]
Metadata
.secondaryProductText(String)
"Product details"
UI label
.expertDesignation(String)
"Product expert"
Role label
.initListener(PopinInitListener)
nil
Init listener
.eventsListener(PopinEventsListener)
nil
Events listener
.hideDisconnectButton(Bool)
false
Hide end call
.hideScreenShareButton(Bool)
false
Hide screen share
.hideFlipCameraButton(Bool)
true
Hide flip camera
.hideMuteVideoButton(Bool)
false
Hide video toggle
.hideMuteAudioButton(Bool)
false
Hide mic toggle
.hideBackButton(Bool)
false
Hide back button
.persistenceMode(Bool)
true
Maintain session
.enableIncomingCalls(Bool)
false
Enable incoming calls
PopinProduct
PopinInitListener
onInitComplete(userId:)
Initialization succeeded
onInitFailed(reason:)
Initialization failed
PopinEventsListener
onPermissionGiven()
Permissions granted
onPermissionDenied()
Permissions denied
onCallStart(callID:)
Call initiated
onCallAbandoned()
Call abandoned
onQueuePositionChanged(position:)
Queue updated
onCallMissed()
Call missed
onCallNetworkFailure(participant:)
Network error
onCallConnected()
Call active
onCallFailed()
Call failed
onCallEnd()
Call ended
onPipStateChanged(isPipModeActive:)
PiP state changed
Last updated