I have AVKit
implemented, the url I am calling the video from is from my website to uses https. When I run the app through Xcode everything works fine, but when I archive the app for release it will not show the Video. I have NSAppTransportSecurity
, NSExceptionDomains
, and NSIncludesSubdomains
implemented. This is error I am getting,
startConfigurationWithCompletionHandler: Failed to get remote object proxy: Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named com.apple.rtcreportingd" UserInfo={NSDebugDescription=connection to service named com.apple.rtcreportingd}.
I am running Xcode 10.2 Swift 5 I had The url's in a Constants file force unwrapped, I have since placed them in my makeView using a guard statement. I have a Custom Cell with the video player inside the cell.
I have search high and low, Apple says to implement the plist code and configure as such and I have.
I tried to use a different url, so I used Apples AVKit Example with the same results.
Everything I have read says the plist needs the AppTransportSecurity code which I have already implemented and still am not able to connect to the video when the app is archived and ready for release.
//plist sourceCode
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>example.com</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSThirdPartyExceptionAllowsInsecureHTTPLoads</key>
<false/>
</dict>
</dict>
</dict>
//TableViewDataSource
func tableView(_ tableView: NSTableView, viewFor tableColumn: NSTableColumn?, row: Int) -> NSView? {
guard let videoOne = URL(string: "https://example.com/video.mov") else {return nil}
let cell = tableView.makeView(withIdentifier: NSUserInterfaceItemIdentifier(rawValue: "videoCell"), owner: nil) as? VideoCell
switch row {
case 0:
cell?.titleLabel.stringValue = "title 1"
cell?.playerView.player = AVPlayer(url: videoOne)
return cell
default:
break
When app has been archived for distribution the video should play.