Firekast empowers live video streaming in few lines of code.

It’s easy, 100% documented and needs no video knowledge.


Min iOS Deployment target: 8.0


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


target 'Your Target Name' do
  # First time install may be long, so please be patient :)
  # Set the same version name X.Y.Z. for both Firekast and VideoCore pod. Here 1.3.3.
  pod 'Firekast', :podspec => ''
  pod 'VideoCore', :git => '', :tag => 'fk-1.3.3'



  1. Sign up and create an app on Firekast Dashboard.
  2. In your app Info.plist specify the reason for your app to access the device’s camera NSCameraUsageDescription and microphone NSMicrophoneUsageDescription.
  3. In your AppDelegate initialize the SDK with your Firekast app credentials.
// Swift
import Firekast

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
    Firekast.initialize(clientKey: "%ACCOUNT%", applicationId: "%APP%")
    return true
// Objective-C
#import "Firekast/Firekast-Swift.h"

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    [Firekast initializeWithClientKey:@"%ACCOUNT%" applicationId:@"%APP%"];
    return YES;

Live streaming

In your view controller, initialize a Firekast FKStreamer and call showCamera to start and display the device’s camera. To live stream you need first to request for a stream (requestStream), then call startStreaming whenever you are ready.

Call stopStreaming to… stop streaming 🤠. Remember to call this function in viewWillDisappear in case you user leaves the screen while streaming.

To access camera feature (flash, switch front/back, microphone) use the FKCamera object returned by calling showCamera.

@IBOutlet weak var container: UIView!
var streamer: FKStreamer!
var camera: FKCamera!

override func viewDidLoad() {

    streamer = FKStreamer(usecase: .portrait)
    camera = streamer.showCamera(.front, in: container)
streamer.requestStream { (stream, error) in
    guard let stream = stream {
        print("Request stream failed: \(error!)")
    self.streamer.startStreaming(on: stream, delegate: self)
// MARK: - FKStreamer Delegate
func streamer(_ streamer: FKStreamer, willStart stream: FKStream?, unless error: NSError?) {}
func streamer(_ streamer: FKStreamer, didBecomeLive stream: FKStream) {}
func streamer(_ streamer: FKStreamer, didStop stream: FKStream?, error: NSError?) {}
func streamer(_ streamer: FKStreamer, networkQualityDidUpdate rating: Float) {}

Push your live to other live streaming platforms simultaneously

Firekast allows to push your live stream to several Live Streaming Platform, such as Facebook or Youtube, simultaneously.

Defines the list of live streaming platforms where you want to push your live and request for a stream.

let media = [
        LiveStreamingPlatform.facebook(accessToken: "your-fb-access-token"), "your-yt-access-token", title: "My Live with")

streamer.requestStream(outputs: media) { (stream, error) in

Play a stream

In your view controller, initialize a Firekast Player and display it by calling show. Then call play with the id of the stream you want to watch.

Call stop if needed.

@IBOutlet weak var container: UIView!
var player: Player!

override func viewDidLoad() {

    player = Player() container)
} "dot38gxkr2zkt9m18", delegate: self)
// MARK: - FKPlayer Delegate
func player(_ player: FKPlayer, willPlay stream: FKStream?, unless error: NSError?) {}
func player(_ player: FKPlayer, stateDidChanged state: Player.State) {} // optional
func player(_ player: FKPlayer, videoDurationIsAvailable duration: TimeInterval) {} // optional


Errors are carried under NSError with domain: NSString.FKErrorDomain. More details are available in userInfo depending on the code:

  • NSNumber.FKErrorOriginApiCode
    • NSString.FKErrorApiCodeKey
    • NSString.FKErrorApiMessageKey
    • NSLocalizedDescriptionKey
  • NSNumber.FKErrorOriginNetworkCode
    • NSLocalizedDescriptionKey
  • NSNumber.FKErrorOriginBadUsageCode
    • NSLocalizedDescriptionKey

For convenience, in Swift, you can call fk() method to convert NSError into FKError.


Objective-C project

  • When running the app, you got the error dyld: Library not loaded. To solve this, set Always Embed Swift Standard Libraries to Yes in project Build Settings. Full error could look like : dyld: Library not loaded: @rpath/libswiftAVFoundation.dylib Referenced from: /Users/frouo/Library/Developer/CoreSimulator/Devices/CC67A36F-82AD-4081-8CE9-3C9E9D21F528/data/Containers/Bundle/Application/DF262573-6487-42E5-9F96-AADDF8F5671D/Firekast Demo Reason: image not found

Release Notes


Build with Swift 4.2 (Xcode 10).


  • Distribute your application on the App Store with both automatic signing and Include bitcode for iOS content option enabled.
  • Framework includes bitcode


Build with Swift 4.2 (Xcode 10).



Build with Swift 4.2 (Xcode 10).


  • Support Swift 4.2
  • FKPlayer supports controlStyle and scaleMode options


Build with Swift 4.1.2 (Xcode 9.4.1).


  • Call capture() on camera to get a snapshot of the camera preview


Build with Swift 4.1.2 (Xcode 9.4.1).


  • Optimizes streaming for portrait or orientation


Build with Swift 4.1.2 (Xcode 9.4.1).

What’s new:

  • Objective-C retro-compatible
  • FKError replaced by NSError for Objective-C retro-compatibility
  • NSError extension method: fk() to convert NSError into FKError


Built with Swift 4.1 (Xcode 9.3).

What’s new:

  • Minor fixes


Built with Swift 4.0.3 (Xcode 9.2).

What’s new:

  • 100% documented.
  • Refactoring, Streamer and Player, functions and parameters should be more straight forward.
  • Live stream on Facebook and/or Youtube and Firekast simultaneous. See LiveStreamingPlatform.
  • Use camera features by enabling torch, microphone, choosing your device’s camera. See Camera.


Built with Swift 3.1

First release of FirekastStreamer and FirekastPlayer to stream and play video with its streamId.