func broadcastSession()

in ReplayKitBroadcaster/SampleHandler.swift [100:109]


    func broadcastSession(_ session: IVSBroadcastSession, didChange state: IVSBroadcastSession.State) {
        NSLog("ℹ️ IVSBroadcastSession state did change: \(state.rawValue)")

        switch state {
        case .connected:
            userDefaults.setValue(true, forKey: Constants.kReplayKitSessionHasBeenStarted)
        default:
            userDefaults.setValue(false, forKey: Constants.kReplayKitSessionHasBeenStarted)
        }
    }