I create a RPSystemBroadcastPickerView and setting preferredExtension to the bundle identifier of my broadcast extension.
let pickerView = RPSystemBroadcastPickerView(frame: CGRect(x: 0, y: 0, width: 100, height: 100))
pickerView.preferredExtension = MHExtensionName
view.addSubview(pickerView)
pickerView.snp.makeConstraints { (make) in
make.center.equalTo(bottomButton)
make.width.height.equalTo(40)
}
then create a broadcast Upload Extension,after tapped the broadcast button,I stucked on startup screen, and got no callback in extension callback methods.
After re-creating the extension and comparing step by step, I finally found the problem. My extension referenced a C++ dylib dynamic library, but the corresponding rpath was not set. The extension did not find the corresponding dylib when it was started, so Startup failed. After referencing the corresponding dynamic library and setting rpath correctly, everything works fine