Latest 1.0.1
Homepage https://github.com/Vidyard/Swiftyard
License MIT
Platforms ios 9.0
Dependencies Alamofire, SwiftyJSON, lf
Frameworks CoreData
Authors ,

Swiftyard: A Vidyard iOS SDK

GitHub license
CircleCI
Carthage Compatible
CocoaPods Compatible

Features

  • [x] Allows you to retrieve your players from Vidyard platform
  • [x] Create a new Player and upload it to Vidyard platform
  • [x] Delete a Player from Vidyard platform
  • [x] Customizable Video Player
  • [x] Ability to have send Analytics to Vidyard of people viewing your videos
  • [x] Use Vidyard’s Identity Management to initialize SDK
  • [x] Vidyard’s Identity Management Allows you to switch Vidyard Groups.
  • [x] Create a RTMP Livestream and Stream to Vidyard platform from your iOS device (Beta)
  • [ ] Complete Documentation (Coming soon)

Installation

Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

You can install Carthage with Homebrew using the following command:

$ brew update
$ brew install carthage

To integrate Swiftyard into your Xcode project using Carthage, specify it in your Cartfile:

github "vidyard/swiftyard"

Run carthage update to build the framework and drag the built Swiftyard.framework into your Xcode project.

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

CocoaPods 1.1.0+ is required to build Swiftyard 1.0.0+.

To integrate Swiftyard into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!

target '<Your Target Name>' do
    pod 'Swiftyard'
end

Then, run the following command:

$ pod install

Usage

Login via email / password

// Using Vidyard Identity Manager to get a Swiftyard instance
VidyardLoginManager.login(username: "[email protected]", password: "supersecretpassword",
  completion: { (sessionCookie) in
    // Use this object for all communication with vidyard assets
    let swiftYard = Swiftyard.init(cookie: sessionCookie)

  }, error: { (error) in
    // Login failed, good idea to show an alert etc
    let alertController = UIAlertController(title: "Login Failed", message: "Please check your email / password and try again", preferredStyle: UIAlertControllerStyle.alert)
    alertController.addAction(UIAlertAction(title: "Okay", style: UIAlertActionStyle.default,handler: nil))
    self.show(alertController, sender: self)
  }
)

User api token

let swiftYard = Swiftyard.init(token: "abc123") // Retrieved from the Vidyard dashboard

Get List of Players

let players = [VidyardPlayer]
swiftYard?.getPlayers(page: 1, perPage: 20, order: "created_at", direction: "asc", query: "") { vidyardPlayers in
  players.append(vidyardPlayers)
  self.tableView.reloadData()
}

Offline Workflow

Store a Player for offline Viewing

player.store {
  print("Player has stored all videos and splash screens for offline use")
}

Get a list of offline Players

var offlinePlayers = [VidyardPlayer]()
swiftYard.getOfflinePlayers { (offlineVYPlayers) in
  offlinePlayers = offlineVYPlayers
}

Sync viewing analytics that were captured while offline

swiftYard.syncAnalytics()

Example

To run the example project, clone the repo, and run pod install from the Example directory you would like to run.

Requirements

Authors

Carlos Corvaia, [email protected]

Thomas Morrison, [email protected]

License

Swiftyard is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "Swiftyard",
    "version": "1.0.1",
    "summary": "Vidyard's IOS SDK",
    "homepage": "https://github.com/Vidyard/Swiftyard",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Carlos Corvaia": "[email protected]",
        "Thomas Morrison": "[email protected]"
    },
    "social_media_url": "http://twitter.com/Vidyard",
    "platforms": {
        "ios": "9.0"
    },
    "source": {
        "git": "https://github.com/Vidyard/Swiftyard.git",
        "tag": "1.0.1"
    },
    "source_files": [
        "Source/Swiftyard",
        "Source/Swiftyard/**/*.{h,m}, 'Source/Swiftyard/SwiftyardData.xcdatamodeld', 'Source/Swiftyard/SwiftyardData.xcdatamodeld/*.xcdatamodel'"
    ],
    "resource_bundles": {
        "Swiftyard": [
            "Source/Swiftyard/SwiftyardData.xcdatamodeld",
            "Source/Swiftyard/SwiftyardData.xcdatamodeld/*.xcdatamodel",
            "Source/Swiftyard/Resources/**/*.png"
        ]
    },
    "preserve_paths": "Source/Swiftyard/SwiftyardData.xcdatamodeld",
    "frameworks": "CoreData",
    "dependencies": {
        "Alamofire": [],
        "SwiftyJSON": [],
        "lf": []
    },
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This