Stitch 0.23.0

Stitch 0.23.0

Maintained by Shams Ahmed, Nexmo.



 
Depends on:
RxCocoa~> 4.1.2
NexmoGRDB.swift~> 0.90.3
Alamofire~> 4.6.0
Socket.IO-Client-Swift~> 13.1.1
NexmoWebRTC~> 63.11.16
 

Stitch 0.23.0

  • By
  • Shams Ahmed, Jodi Humphreys, Ivan Ivanov, Paul Calver and Ashley Arthur

Stitch

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!

Installation

CocoaPods

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

$ gem install cocoapods

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

source 'https://github.com/Nexmo/stitch-ios-sdk.git'
source 'https://github.com/CocoaPods/Specs.git'

target '<YOUR_TARGET_NAME>' do
    pod 'Stitch'
end

Then, run the following command:

$ pod install --repo-update

Carthage

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.

Deploy

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

Testing

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

License

Copyright (c) 2018 Nexmo, Inc. All rights reserved. Licensed only under the 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 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.

Author