'How to display error word at progressed Broadcast Upload Extension(iOS, replaykit)

I stuck in a little problem.

I exercised broadcast upload extension with replaykit,

I wanted display a error code when occured exceptions.

But I couldn't any way for that.

Would you teach me a way?

enter image description here

I hate (null) and want to replace other word.



Solution 1:[1]

Use finishBroadcastWithError, NSError must be use 'NSLocalizedFailureReasonErrorKey' to describe.

Solution 2:[2]

you can handle this issue by this protocol

finishBroadcastWithError()

in RPBroadcast handler

for more refer apple Doc

example:

let userInfo = [NSLocalizedFailureReasonErrorKey: "You have Stopped Screen Sharing"]
        finishBroadcastWithError(NSError(domain: "ScreenShare", code: -1, userInfo: userInfo))

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 ???
Solution 2 Muthu samy