Xcode 10 beta: linker command failed with exit code 1 RPSystemBroadcastPickerView

I was trying to build the code below but got the linker error:
CODE:

import UIKit
import ReplayKit

class ViewController: UIViewController {
 var broadcastPicker: PRSystemBroadcastPickerView? // this variable caused the error
 override func viewDidLoad() {
...

ERROR:

Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_RPSystemBroadcastPickerView", referenced from: objc-class-ref in ViewController.o
ld: symbol(s) not found for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)


I noticed that some ReplayKit classes available in iOS 11 like

RPScreenRecorder
work just fine, it seems only new classes in iOS 12 could cause issue like this.
Any idea?

Replies

PRSystemBroadcastPickerView is new in iOS 12, and there's simply no equivalent in iOS 11 or earlier. Instead, users will have to initiate system recording from the button that you can put in Control Center.

I supposed the PRSystemBroadcastPickerView class is available in Xcode beta 10 and can be run on iOS 12 simulator.
I was just trying to init the class instance, but it caused error as I tried to build and run that simple one line of code.
Did I miss anything like importing a certain framework or changing any configuration in Xcode 10?

I didn't notice you were compiling for the simulator. Either you were targeting iOS 11, or (more likely) system broadcasting just isn't in the simulator.