代码之家  ›  专栏  ›  技术社区  ›  Olli

应用程序未在RPBroadcastActivityViewController中显示为广播服务

  •  0
  • Olli  · 技术社区  · 6 年前

    if #available(iOS 10.0, *) {
      RPBroadcastActivityViewController.load { broadcastAVC, error in
        guard error == nil else {
          print("Cannot load Broadcast Activity View Controller.")
          return
        }
        if let broadcastAVC = broadcastAVC {
          broadcastAVC.delegate = self
          self.viewController.present(broadcastAVC, animated: true, completion: {
            // broadcastactivityviewcontroller will perform the callback when the broadcast starts (or fails)
          })
        }
      }
    }
    

    here ,代码在 startBroadcast 作用

    我还尝试使用 withPreferredExtension preferred broadcast service not found . 当我去控制中心尝试启动广播会话时,我发现没有 Start Broadcast 按钮,没有应用程序,只是 Start Recording ,我用的是IOS11,所以我试着用一部手机用IOS12,关于控制中心的结果也是一样的。

    1 回复  |  直到 6 年前
        1
  •  0
  •   Olli    6 年前

    必须在Xcode文件中添加广播扩展名->新->目标->广播上传扩展。该扩展随后显示在选择器中。