Swiftpack.co - Package - Nexmo/stitch-ios-sdk

Nexmo Stitch iOS SDK

BuddyBuild CocoaPods CocoaPods CocoaPods Swift Carthage compatible Swift Package Manager compatible codecov iOS Twitter

The SDK is intended to provide a ready solution for developers who want to integrate chat, voice and video into their apps.

Getting started👇

Come checkout the iOS quickstarts!



A dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

Integrate Nexmo Stitch into your project using CocoaPods, specify SDK in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'

target '<YOUR_TARGET_NAME>' do
    pod 'Nexmo-Stitch'

Then, run the following command:

$ pod install --repo-update


Add this to Cartfile

github "Nexmo/stitch-ios-sdk" ~> CURRENT_VERSION
$ carthage update --platform iOS

SDK Setup

In the Project Navigator, click on "Info.plist" for your target.

  • Add new row and set row type as a dictionary with the name Nexmo
  • Add new row inside Nexmo dictionary called ConversationApplicationID and set it as string type
  • Add your application Id taking from the CLI interface

Prerequisite for testing in development environment

Configure the environment do the following commands:

$ sudo gem install bundler
$ bundle install
pod repo add Nexmo https://github.com/Nexmo/PodSpec.git
pod setup && pod install

NOTE: Only if Homebrew is not installed

$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
$ brew bundle

To use project with development endpoints:

  • Go to target schemes selection box and click on manage schemes
  • Duplicate Demo (Please make sure shared is deselected) and call it Demo-local
  • Under Run tab add the following environment variable endpoints for socket_url, ips_url, rest_url and acme_url.


Fastlane: Automate beta deployments and releases for our iOS demo apps. 🚀 It handles all tedious tasks, like generating screenshots, dealing with code signing, and releasing your application.

$ fastlane test

Runs all the tests

$ fastlane code_coverage

Display test code coverage

$ fastlane beta

Submit a new Beta Build to Apple TestFlight

$ fastlane doc

Update SDK docs

$ fastlane ios deploy

Package SDK to a framework


All test code are written in Swift, Network request should never reach network always use JSON stubs file to intercept request. We use third party tools for testing the framework over Apple XCTest:

  • Nimble: Express the expected outcomes of Swift or Objective-C expressions with a BDD-styled approach
  • Quick: Behavior-driven development framework for Swift and Objective-C. Inspired by RSpec, Specta, and Ginkgo.
  • MockingJay: Stubbing HTTP requests with ease in Swift

E2E and Hermetic test

These type of class are designed to be gray-boxed. In each target, you can customise base URL by adding socket_url, rest_url, acme_url and ips_url.

Code style & Conventions

  • https://github.com/schwa/Swift-Community-Best-Practices
  • https://github.com/github/swift-style-guide


Copyright (c) 2018 Nexmo, Inc. All rights reserved. Licensed only under the Nexmo Stitch SDK License Agreement (the "License") located at

By downloading or otherwise using our software or services, you acknowledge that you have read, understand and agree to be bound by the Nexmo Stitch SDK License Agreement and Privacy Policy.

You may not use, exercise any rights with respect to or exploit this SDK, or any modifications or derivative works thereof, except in accordance with the License.


  • Jodi Humphreys
  • Shams Ahmed, shams.ahmed@vonage.com
  • Ivan Ivanov, ivan.ivanov@vonage.com
  • James Green, james.green@green-custard.com
  • Paul Calver
  • Ashley Arthur, ashley.arthur@vonage.com
  • Eric Giannini, eric.giannini@vonage.com
  • Chris Guzman, chris.guzman@vonage.com
  • Tom Morris, Tom.Morris@vonage.com
  • Gady Rozin, gady.rozin@vonage.com
  • Chen Lev, chen.lev@vonage.com


Stars: 1
Help us keep the lights on


Used By

Total: 0


1.2.0 - Apr 17, 2018


  • Call object can now set mute, earmuff and loudspeaker
  • Making a call now uses main thread by default
  • ImageEvent exposes image path


  • Some rare occasions hangup did not call onSuccess: after completion
  • Minor adjustments to console logs

1.1.0 - Apr 6, 2018


  • Better logs throughout the SDK
  • User.isMe checks username from keychain if the session is not authenticated yet
  • Event description updated with more info: event id, conversation id, type etc
  • Updated Gemfile for development


  • Stopped disabling push notification when in the wrong state
  • Timing issue when sending an event, the Socket comes in before the Rest has the response
  • Stopped sending delivery when it has been seen already
  • Crash when doing a loop of current values and there is another value when using Objective-c methods

1.0.0 - Mar 30, 2018

Breaking Change

  • Renamed framework from NexmoConversation to Stitch. on all classes replace import NexmoConversation to Stitch


  • Listen for incoming phone calls using the existing .inboundsCalls observer.
try client.media.inboundCalls.subscribe(onSuccess: { call in
    switch call.type {
    case .app: break
    case .phone: break // new phone call from PSTN

NOTE: Calls with .phone type can have a nil Call.from object as it can be a anonymous caller

0.23.0 - Mar 28, 2018

Breaking Changes



  • New feature flag for auto-download. by default always set to thumbnail assets are downloaded automatically
  • After creating Call object, the SDK pass the ringing event to help with UI
  • Exposed device token in PushNotificationController
  • Add support for Objective-C NSError


  • Fix deprecated warnings
  • Fix extra logs coming from Socket.io
  • Coming from background to foreground did not always reconnect
  • Reduce the number of threads used on each reconnects
  • Better support for Push Notification

Known bugs

  • Device tokens don't clear when users have deleted the app without doing a logout
  • Some supporting threads do not close correctly

0.22.0 - Mar 20, 2018

Breaking Change

  • Call.from: returns Member objects instead of String value of username. Use Call.from.user.username
  • Conversation.conversationsObjc moved to 'ConversationController.conversations.conversationsObjc'


  • Call.Event tells you about ringing state, see existing property for snippets


  • Removed LazyCollection to provide better support for Objective-C as it was using Swift generics. New implementation does not change existing behaviour
  • More internal logs to help with testing
  • Better support for Objective-C [On-going]
  • Docs now have snippets and simpler design for Collections and Call classes
  • Fix issue where NXMAppLifecycleController did not work in Objective-C
  • Removed stun_url server as backend can now deal with looking up the public IP address


  • Creating Call object did not always have all the members in the Call.to list.