I'm new to iOS programming.
I'm trying to write an app for screen broadcasting/recording.
Follow the guide of WWDC2018.
1. new target of "Broadcast Upload Extension" and "Broadcast Setup UI Extension".
Note: neither SampleHandler.swift nor BroadcastSetupViewController.swift is modified.
2. modify the ViewController.swift as following
import UIKit
import ReplayKit
@available(iOS 12.0, *)
class ViewController: UIViewController {
var broadcastPicker: RPSystemBroadcastPickerView?
var broadcastPicker: RPSystemBroadcastPickerView?
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
let broadcastPicker = RPSystemBroadcastPickerView(frame: CGRect(x: 0, y: 0,
width: view.bounds.width, height: 500))
broadcastPicker.preferredExtension = "com.myapp.extension"
view.addSubview(broadcastPicker)
}
}
After installation, when pressing the app to start broadcasting, following screen is shown. There is no icon of my app. The preferredExtension is confirmed correct as the extension's Bundle Identifier.
https://i.stack.imgur.com/vFotKl.jpg
If starting broadcast from the system, there are many provider options, but not my app.
https://i.stack.imgur.com/qilOLl.jpg
Please help. Thank you.