91 |
92 | example-ios-live-streaming
93 |
94 | An example app for live streaming from an iOS device using the Mux live streaming service, written in Swift.
95 |
96 |

97 | Welcome
98 |
99 | Our sample app uses a couple open source projects and Xcode configurations in order to get live streaming up and running quickly. To make this easy, we recommend using the CocoaPods dependency manager for iOS. Once you have cloned this repo and installed CocoaPods, you are a couple steps away from streaming.
100 | Quick Start
101 | Sample Project Setup
102 |
103 | After cloning this project and installing CocoaPods, run the following command from the project directory to get setup:
104 | make setup && make pods
105 |
106 |
107 | Then just open the workspace and click play to build and run.
108 | open *workspace
109 |
110 | Components
111 |
112 |
113 | MuxLive.swift
is a component that provides the basic network streaming capabilities and properties for configuration.
114 | MuxLiveConfiguration.swift
describes MuxLive.swift
‘s configuration properties.
115 | MuxBroadcastViewController.swift
provides a simple camera user interface and wraps MuxLive.swift
, providing examples on how to use MuxLive.swift
directly (if that is preferred).
116 |
117 | Integration
118 |
119 | If you’d like to integrate these components into your app directly (instead of using them as a reference), you can follow along with the code from the sample project’s 'ViewController.swift’ and install all the source files in the following ways:
120 |
121 | # CocoaPods (not current supported! maybe? we have to figure that out.)
122 |
123 | pod "MuxLive", "~> 0.0.1"
124 |
125 | # Carthage
126 |
127 | github "muxinc/example-ios-live-streaming" ~> 0.0.1
128 |
129 | # Swift PM
130 |
131 | let package = Package(
132 | dependencies: [
133 | .Package(url: "https://github.com/muxinc/example-ios-live-streaming", majorVersion: 0)
134 | ]
135 | )
136 |
137 |
138 |
139 | Alternatively, you can just copy all the source files into your Xcode project.
140 | Documentation
141 |
142 | You can find the docs here. Documentation is generated with jazzy and hosted on GitHub-Pages.
143 | Resources
144 |
145 |
155 | License
156 |
157 | example-ios-live-streaming
and MuxLive
are available under the MIT license, see the LICENSE file for more information.
158 |
159 |
160 |