I was trying to build and run the below code on simulator but got the linker error:
import UIKit
import ReplayKit
class ViewController: UIViewController {
var broadcastPicker:RPSystemBroadcastPickerView?
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
broadcastPicker = RPSystemBroadcastPickerView(frame: view.frame))
view.addSubview(broadcastPicker!)
}
}
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)
Looks like the RPSystemBroadcastPickerView
instance is causing the problem, any idea?
EDIT
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.