CocoaPods trunk is moving to be read-only. Read more on the blog, there are 17 months to go.

Flyreel 1.1.5

Flyreel 1.1.5

Maintained by Szymon Wojcik, Richard Lee, Brian Webb.



Flyreel 1.1.5

  • By
  • LexisNexis

Flyreel SDK

Swift 5.7 Supported iOS 13

Installation

Cocoapods

Add pod Flyreel to your Podfile

pod Flyreel

Swift Package Manager

  1. Follow the Apple guide to add the package dependency to your app.
  2. Search for the https://github.com/Flyreel/flyreel-sdk-ios package.

Initialization

To use the Flyreel SDK, you must provide a configuration with the following parameters:

settingsVersion: Identifier of your remote SDK settings.

organizationId: Identifier of your organization.

let configuration = FlyreelConfiguration(
    settingsVersion: "1",
    organizationId: "7d3899f1421a7650241516475"
)
        
FlyreelSDK.shared.set(configuration: configuration)

Setting up the configuration is mandatory. Attempting to open the SDK flow without it will result in a fatal error.

Permissions

Since the SDK actively uses some functionalities of the iOS system you need to provide a few permission settings

<key>NSCameraUsageDescription</key>
<string>We need access to the camera.</string>
<key>NSMicrophoneUsageDescription</key>
<string>We need access to the camera.</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>We need access to your location data</string>

How to present UI

SwiftUI

For SwiftUI, use our custom modifier similar to a regular sheet presentation:

@State private var isFlowPresented = false

var body: some View {
    Button("Open Flyreel flow") {
        isFlowPresented = true
    }
    .presentFlyreel(isPresented: $isFlowPresented)
}

UIKIt

For UIKit, present the Flyreel flow on any UIViewController:

FlyreelSDK.shared.presentFlyreel(on: self)

Deep Linking

If you're launching the Flyreel flow from a deep link, push notification, or a custom solution where user details can be provided automatically, use:

SwiftUI

func presentFlyreel(
    isPresented: Binding<Bool>,
    zipCode: String,
    accessCode: String,
    shouldSkipLoginPage: Bool = true
)

func presentFlyreel(
    isPresented: Binding<Bool>,
    deepLinkURL: URL,
    shouldSkipLoginPage: Bool = true
)

UIKit

func presentFlyreel(
     on rootViewController: UIViewController,
    zipCode: String,
    accessCode: String,
    shouldSkipLoginPage: Bool = true,
    animated: Bool = true
)

func presentFlyreel(
    on rootViewController: UIViewController,
    deepLinkURL: URL,
    shouldSkipLoginPage: Bool = true,
    animated: Bool = true
)

Debug Logs

Enable debug logging for troubleshooting purposes:

FlyreelSDK.shared.enableLogs()

Sandbox

Verify your implementation in the sandbox mode. Switch the environment with the configuration:

let configuration = FlyreelConfiguration(
    settingsVersion: "1",
    organizationId: "7d3899f1421a7650241516475",
    environment: .sandbox
)
        
FlyreelSDK.shared.set(configuration: configuration)