Apple Document - Creating a Basic Video Player

I followed this document to try and create a streaming video player in a macOS app and I am getting nothing but errors.

Here's my code:

Code Block
import Cocoa
import AVFoundation
import AVKit
class ViewController: NSViewController {
  @IBOutlet var playerView: AVPlayerView!
   
  override func viewDidLoad() {
    super.viewDidLoad()
    // Do any additional setup after loading the view.
    guard let url = URL(string: "https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_ts/master.m3u8") else {
        return
      }
    // Create a new AVPlayer and associate it with the player view
    let player = AVPlayer(url: url)
    playerView.player = player
  }
  override var representedObject: Any? {
    didSet {
    // Update the view, if already loaded.
    }
  }
}

When I run the code, I get the following errors in the console:

2021-03-27 09:24:44.920720-0500 Streamer[27640:1013041] [plugin] AddInstanceForFactory: No factory registered for id <CFUUID 0x600002e22b60> F8BB1C28-BAE8-11D6-9C31-00039315CD46
2021-03-27 09:24:45.042030-0500 Streamer[27640:1013040] validateSessionInfo: bundleID is invalid. Please specify the bundleID for kRTCReportingSessionInfoClientBundleID
2021-03-27 09:24:45.042972-0500 Streamer[27640:1013054] startConfigurationWithCompletionHandler: Failed to get remote object proxy: Error Domain=NSCocoaErrorDomain Code=4097 "connection to service on pid 0 named com.apple.rtcreportingd" UserInfo={NSDebugDescription=connection to service on pid 0 named com.apple.rtcreportingd}
2021-03-27 09:24:45.043046-0500 Streamer[27640:1013054] startConfigurationWithCompletionHandler: Failed to get remote object proxy: Error Domain=NSCocoaErrorDomain Code=4097 "connection to service on pid 0 named com.apple.rtcreportingd" UserInfo={NSDebugDescription=connection to service on pid 0 named com.apple.rtcreportingd}
2021-03-27 09:24:45.071473-0500 Streamer[27640:1013055] [logging] volume does not support data protection, stripping SQLITE_OPENFILEPROTECTION* flags
2021-03-27 09:24:45.072119-0500 Streamer[27640:1013055] [logging] volume does not support data protection, stripping SQLITE_OPENFILEPROTECTION* flags
2021-03-27 09:24:45.072665-0500 Streamer[27640:1013055] [logging] volume does not support data protection, stripping SQLITE_OPENFILEPROTECTION* flags
2021-03-27 09:24:45.073682-0500 Streamer[27640:1013055] [logging] volume does not support data protection, stripping SQLITE_OPENFILEPROTECTION* flags
2021-03-27 09:24:45.074877-0500 Streamer[27640:1013055] [logging] volume does not support data protection, stripping SQLITE_OPENFILEPROTECTION* flags
2021-03-27 09:24:45.155189-0500 Streamer[27640:1013055] [logging] volume does not support data protection, stripping SQLITE_OPENFILEPROTECTION* flags
2021-03-27 09:24:45.155577-0500 Streamer[27640:1013055] [logging] volume does not support data protection, stripping SQLITE_OPENFILEPROTECTION* flags
2021-03-27 09:24:45.168271-0500 Streamer[27640:1013081] [] nw_resolver_can_use_dns_xpc_block_invoke Sandbox does not allow access to com.apple.dnssd.service
2021-03-27 09:24:45.169487-0500 Streamer[27640:1013081] dnssd_clientstub ConnectToServer: connect() failed path:/var/run/mDNSResponder Socket:7 Err:-1 Errno:1 Operation not permitted
2021-03-27 09:24:45.169606-0500 Streamer[27640:1013081] [connection] nw_resolver_create_dns_service_locked [C1] DNSServiceCreateDelegateConnection failed: ServiceNotRunning(-65563)
2021-03-27 09:24:45.170098-0500 Streamer[27640:1013081] Connection 1: received failure notification
2021-03-27 09:24:45.171183-0500 Streamer[27640:1013081] Connection 1: failed to connect 10:-72000, reason -1
2021-03-27 09:24:45.171229-0500 Streamer[27640:1013081] Connection 1: encountered error(10:-72000)
2021-03-27 09:24:45.172760-0500 Streamer[27640:1013055] Task <9413249A-2C3E-4A40-B71B-394F5E95D197>.<1> HTTP load failed, 0/0 bytes (error code: -1003 [10:-72000])
2021-03-27 09:24:45.174833-0500 Streamer[27640:1013084] Task <9413249A-2C3E-4A40-B71B-394F5E95D197>.<1> finished with error [-1003] Error Domain=NSURLErrorDomain Code=-1003 "A server with the specified hostname could not be found." UserInfo={_kCFStreamErrorCodeKey=-72000, NSUnderlyingError=0x6000020cb030 {Error Domain=kCFErrorDomainCFNetwork Code=-1003 "(null)" UserInfo={_kCFStreamErrorCodeKey=-72000, _kCFStreamErrorDomainKey=10}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <9413249A-2C3E-4A40-B71B-394F5E95D197>.<1>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
  "LocalDataTask <9413249A-2C3E-4A40-B71B-394F5E95D197>.<1>"
), NSLocalizedDescription=A server with the specified hostname could not be found., NSErrorFailingURLStringKey=https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_ts/master.m3u8, NSErrorFailingURLKey=https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_ts/master.m3u8, _kCFStreamErrorDomainKey=10}
2021-03-27 09:24:45.175255-0500 Streamer[27640:1013055] validateSessionInfo: bundleID is invalid. Please specify the bundleID for kRTCReportingSessionInfoClientBundleID
2021-03-27 09:24:45.176213-0500 Streamer[27640:1013040] sendOneMessageWithSessionInfo: Failed to get remote object proxy: Error Domain=NSCocoaErrorDomain Code=4097 "connection to service on pid 0 named com.apple.rtcreportingd" UserInfo={NSDebugDescription=connection to service on pid 0 named com.apple.rtcreportingd}
2021-03-27 09:24:45.176282-0500 Streamer[27640:1013081] sendMessageWithDictionary: Failed to get remote object proxy: Error Domain=NSCocoaErrorDomain Code=4097 "connection to service on pid 0 named com.apple.rtcreportingd" UserInfo={NSDebugDescription=connection to service on pid 0 named com.apple.rtcreportingd}
2021-03-27 09:24:45.207079-0500 Streamer[27640:1012591] Metal API Validation Enabled
2021-03-27 09:24:45.233220-0500 Streamer[27640:1013081] fopen failed for data file: errno = 2 (No such file or directory)
2021-03-27 09:24:45.233272-0500 Streamer[27640:1013081] Errors found! Invalidating cache...
2021-03-27 09:24:45.288729-0500 Streamer[27640:1013081] fopen failed for data file: errno = 2 (No such file or directory)
2021-03-27 09:24:45.288805-0500 Streamer[27640:1013081] Errors found! Invalidating cache...

Replies

Has anyone tried following the referenced Apple document and successfully ran it in macOS Big Sur?
I finally got the video to play by going to the Signing & Capabilities tab in the Project Settings and checked Outgoing Connections (Client) under App Sandbox. Apple should make note of this requirement in their guide. However, I am still getting the following errors in the console:

2021-03-30 14:45:34.347266-0500 Streamer[12701:657907] [plugin] AddInstanceForFactory: No factory registered for id <CFUUID 0x600003974980> F8BB1C28-BAE8-11D6-9C31-00039315CD46
2021-03-30 14:45:34.474219-0500 Streamer[12701:657916] validateSessionInfo: bundleID is invalid. Please specify the bundleID for kRTCReportingSessionInfoClientBundleID
2021-03-30 14:45:34.475221-0500 Streamer[12701:657894] startConfigurationWithCompletionHandler: Failed to get remote object proxy: Error Domain=NSCocoaErrorDomain Code=4097 "connection to service on pid 0 named com.apple.rtcreportingd" UserInfo={NSDebugDescription=connection to service on pid 0 named com.apple.rtcreportingd}
2021-03-30 14:45:34.475366-0500 Streamer[12701:657894] startConfigurationWithCompletionHandler: Failed to get remote object proxy: Error Domain=NSCocoaErrorDomain Code=4097 "connection to service on pid 0 named com.apple.rtcreportingd" UserInfo={NSDebugDescription=connection to service on pid 0 named com.apple.rtcreportingd}
2021-03-30 14:45:34.507482-0500 Streamer[12701:657907] [logging] volume does not support data protection, stripping SQLITE_OPENFILEPROTECTION* flags
2021-03-30 14:45:34.513188-0500 Streamer[12701:657907] [logging] volume does not support data protection, stripping SQLITE_OPENFILEPROTECTION* flags
2021-03-30 14:45:34.654719-0500 Streamer[12701:657415] Metal API Validation Enabled
2021-03-30 14:45:35.304861-0500 Streamer[12701:657894] sendMessageWithDictionary: Failed to get remote object proxy: Error Domain=NSCocoaErrorDomain Code=4097 "connection to service on pid 0 named com.apple.rtcreportingd" UserInfo={NSDebugDescription=connection to service on pid 0 named com.apple.rtcreportingd}
2021-03-30 14:45:35.963419-0500 Streamer[12701:657895] sendMessageWithDictionary: Failed to get remote object proxy: Error Domain=NSCocoaErrorDomain Code=4097 "connection to service on pid 0 named com.apple.rtcreportingd" UserInfo={NSDebugDescription=connection to service on pid 0 named com.apple.rtcreportingd}
2021-03-30 14:45:40.709591-0500 Streamer[12701:657896] sendMessageWithDictionary: Failed to get remote object proxy: Error Domain=NSCocoaErrorDomain Code=4097 "connection to service on pid 0 named com.apple.rtcreportingd" UserInfo={NSDebugDescription=connection to service on pid 0 named com.apple.rtcreportingd}
2021-03-30 14:45:40.809438-0500 Streamer[12701:657895] sendMessageWithDictionary: Failed to get remote object proxy: Error Domain=NSCocoaErrorDomain Code=4097 "connection to service on pid 0 named com.apple.rtcreportingd" UserInfo={NSDebugDescription=connection to service on pid 0 named com.apple.rtcreportingd}
2021-03-30 14:45:41.075516-0500 Streamer[12701:657896] sendMessageWithDictionary: Failed to get remote object proxy: Error Domain=NSCocoaErrorDomain Code=4097 "connection to service on pid 0 named com.apple.rtcreportingd" UserInfo={NSDebugDescription=connection to service on pid 0 named com.apple.rtcreportingd}
2021-03-30 14:45:41.787596-0500 Streamer[12701:657894] sendMessageWithDictionary: Failed to get remote object proxy: Error Domain=NSCocoaErrorDomain Code=4097 "connection to service on pid 0 named com.apple.rtcreportingd" UserInfo={NSDebugDescription=connection to service on pid 0 named com.apple.rtcreportingd}
2021-03-30 14:45:42.762731-0500 Streamer[12701:657896] [connection] nw_connection_add_timestamp_locked_on_nw_queue [C1] Hit maximum timestamp count, will start dropping events