Skip to content

Commit

Permalink
Bump VoxeetSDK to v2.2.0 and VoxeetUXKit to v1.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
VTCoco committed Mar 30, 2020
1 parent 54a4f86 commit 9814d02
Show file tree
Hide file tree
Showing 15 changed files with 40 additions and 279 deletions.
2 changes: 1 addition & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
binary "https://voxeet-cdn.s3.amazonaws.com/sdk/ios/release/VoxeetSDK.json" ~> 2.0
binary "https://raw.githubusercontent.com/voxeet/voxeet-sdk-ios/master/VoxeetSDK.json" ~> 2.0
github "SDWebImage/SDWebImage" ~> 5.0
4 changes: 2 additions & 2 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
binary "https://voxeet-cdn.s3.amazonaws.com/sdk/ios/release/VoxeetSDK.json" "2.1.0"
github "SDWebImage/SDWebImage" "5.5.2"
binary "https://raw.githubusercontent.com/voxeet/voxeet-sdk-ios/master/VoxeetSDK.json" "2.2.0"
github "SDWebImage/SDWebImage" "5.6.1"
248 changes: 2 additions & 246 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,248 +1,8 @@
# Voxeet UXKit iOS

<p align="center">
<img src="https://www.voxeet.com/images/VoxeetDolbyLogo.svg" alt="Voxeet SDK logo" title="Voxeet SDK logo" width="100"/>
</p>
## Documentation


## Requirements


* **Operating systems:** iOS 9.0 and later versions
* **IDE:** [Xcode 11+](https://developer.apple.com/xcode/)
* **Languages:** Swift 5+, Objective-C, [React Native](https://github.com/voxeet/voxeet-uxkit-reactnative), [Cordova](https://github.com/voxeet/voxeet-uxkit-cordova)
* **Supported architectures:** armv7, arm64, i386, x86_64

## Sample application

A sample application is available on this [GitHub repository](https://github.com/voxeet/voxeet-uxkit-ios/tree/master/Sample).
**VoxeetUXKit** is a framework based on **VoxeetSDK** ([https://github.com/voxeet/voxeet-sdk-ios](https://github.com/voxeet/voxeet-sdk-ios)).

![CallKit](http://cdn.voxeet.com/images/IncomingCallKit.png "CallKit") ![Conference maximized](http://cdn.voxeet.com/images/OutgoingCall.png "Conference maximized") ![Conference minimized](http://cdn.voxeet.com/images/CallMinimize.png "Conference minimized")


## Installing the iOS SDK


### 1. Get your credentials

Get a consumer key and consumer secret for your app from [your developer account dashboard](https://developer.voxeet.com).

**If you are a new user, you'll need to sign up for a Voxeet developer account and add an app.** You can create one app with a trial account. Upgrade to a paid account for multiple apps and to continue using Voxeet after your trial expires. We will give you dedicated help to get you up and running fast.

### 2. Project setup

Enable **background mode** (go to your target settings -> 'Capabilities' -> 'Background Modes')
- Turn on 'Audio, AirPlay and Picture in Picture'
- Turn on 'Voice over IP'

If you want to support CallKit (receiving incoming call when application is killed) with VoIP push notification, enable 'Push Notifications' (you will need to upload your [VoIP push certificate](https://developer.apple.com/account/ios/certificate/) to the Voxeet developer portal).

<p align="center">
<img src="http://cdn.voxeet.com/images/VoxeetConferenceKitCapabilitiesXCode2.png" alt="Capabilities" title="Capabilities" width="500"/>
</p>

Privacy **permissions**, add two new keys in the Info.plist:
- Privacy - Microphone Usage Description
- Privacy - Camera Usage Description

### 3. Installation

#### Carthage

[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

You can install Carthage with [Homebrew](http://brew.sh/) using the following command:

```bash
$ brew update
$ brew install carthage
```

To integrate [VoxeetUXKit](https://github.com/voxeet/voxeet-uxkit-ios) into your Xcode project using Carthage, specify it in your `Cartfile`:

```ogdl
github "voxeet/voxeet-uxkit-ios" ~> 1.0
```

Run `carthage update` to build the frameworks and drag `VoxeetUXKit.framework`, `VoxeetSDK.framework` and `WebRTC.framework` into your Xcode project *(needs to be dropped in 'Embedded Binaries')*.
More information at [https://github.com/Carthage/Carthage#if-youre-building-for-ios-tvos-or-watchos](https://github.com/Carthage/Carthage#if-youre-building-for-ios-tvos-or-watchos).

#### CocoaPods

[CocoaPods](https://cocoapods.org) is a dependency manager for Swift and Objective-C Cocoa projects. It has over 70 thousand libraries and is used in over 3 million apps. CocoaPods can help you scale your projects elegantly.

You can install CocoaPods with the following command:

```bash
$ sudo gem install cocoapods
```

To integrate [VoxeetUXKit](https://github.com/voxeet/voxeet-uxkit-ios) into your Xcode project using CocoaPods, specify it in your `Podfile`:

```ogdl
pod 'VoxeetUXKit', '~> 1.0'
```

Run `pod install` to build dependencies.

### Manually

Download the lastest release zip:

**VoxeetUXKit:** https://github.com/voxeet/voxeet-uxkit-ios/releases
*and*
**VoxeetSDK:** https://github.com/voxeet/voxeet-sdk-ios/releases

Unzip and drag and drop frameworks into your project, select 'Copy items if needed' with the right target. Then in the general tab of your target, add the `VoxeetUXKit.framework`, `VoxeetSDK.framework` and `WebRTC.framework` into **'Embedded Binaries'**.

### 4. Dependencies

VoxeetUXKit is also using some external libraries like SDWebImage for downloading and caching images from the web (users' avatars).
You can either download this framework at [this link](https://github.com/SDWebImage/SDWebImage) or install it with Carthage / CocoaPods.

At the end 'Embedded Binaries' and 'Linked Frameworks and Libraries' sections should look like this:

<p align=“center”>
<img src="http://cdn.voxeet.com/images/XCodeFramework.png" alt=“Frameworks” title=“Frameworks” width=“500”/>
</p>

*(WebRTC.framework missing on this screenshot and Kingfisher has been replaced by SDWebImage)*

## Voxeet UXKit usage

### `initialize`

Use these methods to initialize the Voxeet frameworks.

#### Parameters
- `consumerKey` **String** - The consumer key for your app from [your developer account dashboard](https://developer.voxeet.com).
- `consumerSecret` **String** - The consumer secret for your app from [your developer account dashboard](https://developer.voxeet.com).

#### Code examples

```swift
import VoxeetSDK
import VoxeetUXKit

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {

// Voxeet SDKs initialization.
VoxeetSDK.shared.initialize(consumerKey: "YOUR_CONSUMER_KEY", consumerSecret: "YOUR_CONSUMER_SECRET")
VoxeetUXKit.shared.initialize()

// Example of public variables to change the conference behavior.
VoxeetSDK.shared.notification.type = .none
VoxeetSDK.shared.conference.defaultBuiltInSpeaker = true
VoxeetSDK.shared.conference.defaultVideo = false
VoxeetUXKit.shared.appearMaximized = true
VoxeetUXKit.shared.telecom = false

return true
}
}
```

#### References

https://voxeet.com/documentation/sdk/reference/ios/voxeetsdk#initialize

### `open`

Opens a new session.

#### Parameters

- `options` **VTParticipantInfo?** - Information about the current participant (optional)
- `completion` **((_ error: NSError?) -> Void)?** - A block object to be executed when the server connection sequence ends. This block has no return value and takes a single `NSError` argument that indicates whether or not the connection to the server succeeded

#### Examples

```swift
let participantInfo = VTParticipantInfo(externalID: "1234", name: "Username", avatarURL: "https://voxeet.com/logo.jpg")
VoxeetSDK.shared.session.open(info: participantInfo) { error in }
```

#### References

https://voxeet.com/documentation/sdk/reference/ios/session#open

### `close`

Closes the current session (it will stop the socket and stop receiving VoIP push notification).

#### Parameters

- `completion` **((_ error: NSError?) -> Void)?** - A block object to be executed when the server connection sequence ends. This block has no return value and takes a single `NSError` argument that indicates whether or not the connection to the server succeeded.

#### Examples

```swift
VoxeetSDK.shared.session.close { error in }
```

#### References

https://voxeet.com/documentation/sdk/reference/ios/session#close

### `start conference`

Start the conference UI.

#### Examples

```swift
// Create a conference (with a custom conference alias).
let options = VTConferenceOptions()
options.alias = conferenceAlias
VoxeetSDK.shared.conference.create(options: options, success: { conference in
// Join the created conference.
VoxeetSDK.shared.conference.join(conference: conference, success: { conference in
}, fail: { error in
})
}, fail: { error in
})
```

#### References

https://voxeet.com/documentation/sdk/reference/ios/conference#create
https://voxeet.com/documentation/sdk/reference/ios/conference#join

### `stop conference`

Stop the conference UI.

#### Examples

```swift
VoxeetSDK.shared.conference.leave { error in }
```

#### References

https://voxeet.com/documentation/sdk/reference/ios/conference#leave

### `useful variables`

By default, conference appears maximized. If false, the conference will appear minimized.

```swift
VoxeetUXKit.shared.appearMaximized = true
```

If someone hangs up, everybody is kicked out of the conference.

```swift
VoxeetUXKit.shared.telecom = false
```

### `CallKit sound and image`

If `CallKitSound.mp3` is overridden, the ringing sound will be replaced by your mp3.
Same as `IconMask.png` if overridden, it will replace the default CallKit image by yours (40x40px).
A full documentation can be found here: [https://voxeet.com/documentation/uxkit/swift](https://voxeet.com/documentation/uxkit/swift).

## Tech

Expand All @@ -253,8 +13,4 @@ The Voxeet iOS SDK and UXKit rely on these open source projects:
* [Alamofire](https://github.com/Alamofire/Alamofire), an HTTP networking library written in Swift.
* [SwiftyJSON](https://github.com/SwiftyJSON/SwiftyJSON), a tool for handling JSON data in Swift.

## SDK version

1.3.1

© Voxeet, 2020
6 changes: 3 additions & 3 deletions Sample/Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
binary "https://voxeet-cdn.s3.amazonaws.com/sdk/ios/release/VoxeetSDK.json" "2.1.0"
github "voxeet/voxeet-uxkit-ios" "1.3.1"
github "SDWebImage/SDWebImage" "5.5.2"
binary "https://raw.githubusercontent.com/voxeet/voxeet-sdk-ios/master/VoxeetSDK.json" "2.2.0"
github "SDWebImage/SDWebImage" "5.6.1"
github "voxeet/voxeet-uxkit-ios" "1.3.2"
6 changes: 4 additions & 2 deletions Sample/VoxeetUXKitSample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@
CODE_SIGN_ENTITLEMENTS = VoxeetUXKitSample/VoxeetUXKitSample.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = B55NRA8BRW;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -429,7 +430,7 @@
);
INFOPLIST_FILE = VoxeetUXKitSample/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.2.1;
MARKETING_VERSION = 1.2.2;
PRODUCT_BUNDLE_IDENTIFIER = io.voxeet;
PRODUCT_NAME = "Voxeet (UXKit)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -444,6 +445,7 @@
CODE_SIGN_ENTITLEMENTS = VoxeetUXKitSample/VoxeetUXKitSample.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = B55NRA8BRW;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -452,7 +454,7 @@
);
INFOPLIST_FILE = VoxeetUXKitSample/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.2.1;
MARKETING_VERSION = 1.2.2;
PRODUCT_BUNDLE_IDENTIFIER = io.voxeet;
PRODUCT_NAME = "Voxeet (UXKit)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
6 changes: 3 additions & 3 deletions Sample/VoxeetUXKitSample/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
VoxeetUXKit.shared.initialize()

// Example of public variables to change the conference behavior.
VoxeetSDK.shared.notification.type = .callKit
VoxeetSDK.shared.notification.push.type = .callKit
VoxeetSDK.shared.conference.defaultBuiltInSpeaker = true
VoxeetSDK.shared.conference.defaultVideo = false
VoxeetUXKit.shared.appearMaximized = true
Expand All @@ -37,11 +37,11 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
extension AppDelegate {
/// Useful below iOS 10.
func application(_ application: UIApplication, didReceive notification: UILocalNotification) {
VoxeetSDK.shared.notification.application(application, didReceive: notification)
VoxeetSDK.shared.notification.push.application(application, didReceive: notification)
}

/// Useful below iOS 10.
func application(_ application: UIApplication, handleActionWithIdentifier identifier: String?, for notification: UILocalNotification, completionHandler: @escaping () -> Void) {
VoxeetSDK.shared.notification.application(application, handleActionWithIdentifier: identifier, for: notification, completionHandler: completionHandler)
VoxeetSDK.shared.notification.push.application(application, handleActionWithIdentifier: identifier, for: notification, completionHandler: completionHandler)
}
}
10 changes: 5 additions & 5 deletions Sample/VoxeetUXKitSample/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15400" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15404"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16086"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="ViewController" customModule="VoxeetConferenceKitSample" customModuleProvider="target" sceneMemberID="viewController">
<viewController id="BYZ-38-t0r" customClass="ViewController" customModule="Voxeet__UXKit_" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
Expand Down Expand Up @@ -80,7 +80,7 @@
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" enabled="NO" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="P3Y-47-3U4">
<button opaque="NO" contentMode="scaleToFill" enabled="NO" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" pointerInteraction="YES" translatesAutoresizingMaskIntoConstraints="NO" id="P3Y-47-3U4">
<rect key="frame" x="295" y="289" width="48" height="60"/>
<constraints>
<constraint firstAttribute="height" constant="60" id="lrY-mc-qz3"/>
Expand All @@ -91,7 +91,7 @@
<action selector="logoutAction:" destination="BYZ-38-t0r" eventType="touchUpInside" id="SYK-fX-oTS"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Qjk-1y-2Fc" customClass="UIGradientButton" customModule="VoxeetConferenceKitSample" customModuleProvider="target">
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Qjk-1y-2Fc" customClass="UIGradientButton" customModule="Voxeet__UXKit_" customModuleProvider="target">
<rect key="frame" x="16" y="548.5" width="327" height="50"/>
<color key="backgroundColor" red="0.52156862745098043" green="0.86274509803921573" blue="0.38431372549019605" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
<constraints>
Expand Down
2 changes: 1 addition & 1 deletion Sample/VoxeetUXKitSample/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>1</string>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSCameraUsageDescription</key>
Expand Down
4 changes: 3 additions & 1 deletion Sample/VoxeetUXKitSample/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,9 @@ class ViewController: UIViewController {
options.alias = conferenceAlias
VoxeetSDK.shared.conference.create(options: options, success: { conference in
// Join the created conference.
VoxeetSDK.shared.conference.join(conference: conference, success: { conference in
let joinOptions = VTJoinOptions()
joinOptions.constraints.video = false
VoxeetSDK.shared.conference.join(conference: conference, options: joinOptions, success: { conference in
// Re-enable startConferenceButton when the request finish.
self.startConferenceButton.isEnabled = true
}, fail: { error in
Expand Down
Loading

0 comments on commit 9814d02

Please sign in to comment.