10.5 C
New York
Wednesday, February 26, 2025

ios – Situation: Display screen Recording Broadcast Extension Not Showing in RPSystemBroadcastPickerView


I’m engaged on a React Native challenge the place I’m integrating a RecordComponent utilizing RPSystemBroadcastPickerView to set off a display screen recording broadcast extension on iOS. I can set off the picker and even File a video type my react native app, nevertheless my app just isn’t showing within the Display screen Recording checklist after I open the Management Middle.

Mission Construction:

Principal App

ScreenRecordingBroadcast (Broadcast Uploader Extension)

ScreenRecordingBroadcastSetupUI (Setup UI Extension)

RecordComponent.swift

import Basis
import ReplayKit
import React

@objc(RecordComponent)
class RecordComponent: RCTViewManager {

  override func view() -> UIView! {
    if #obtainable(iOS 12.0, *) {
      let pickerView = RPSystemBroadcastPickerView(body: CGRect(x: 0, y: 0, width: 50, top: 50))
      pickerView.translatesAutoresizingMaskIntoConstraints = false
      pickerView.preferredExtension = "com.mycompany.myapp.ScreenRecordingBroadcast"

      if let button = pickerView.subviews.first as? UIButton {
        button.imageView?.tintColor = UIColor.purple
      }

      NSLog("✅ Broadcast extension discovered: %@", pickerView)
      if let preferredExtension = pickerView.preferredExtension {
          NSLog("✅ Most popular Extension: %@", preferredExtension)
      } else {
          NSLog("❌ No Most popular Extension Set")
      }
      return pickerView
    } else {
      let label = UILabel()
      label.textual content = "Display screen Recording Not Supported"
      return label
    }
  }
}

What I Have Accomplished So Far:

Bundle Identifiers:

Principal App: com.mycompany.myapp

Broadcast Uploader: com.mycompany.myapp.ScreenRecordingBroadcast

Setup UI: com.mycompany.myapp.ScreenRecordingBroadcastSetupUI

Information.plist (ScreenRecordingBroadcast)

NSExtension

    NSExtensionPointIdentifier
    com.apple.broadcast-services-upload
    NSExtensionPrincipalClass
    $(PRODUCT_MODULE_NAME).SampleHandler
    RPBroadcastProcessMode
    RPBroadcastProcessModeSampleBuffer

App Group:

Configured and shared between Principal App and Broadcast Extension.

Embedding Extensions:

ScreenRecordingBroadcast.appex is included beneath Embed App Extensions (Embed & Signal).

Code Signing:

Utilizing Computerized provisioning.

Verified that each app and extension use the identical workforce and app group.

System Testing:

Examined on a bodily system (iPhone 15 Professional, iOS 17.3).

Restarted the system and reset Location & Privateness permissions.

Drawback:

Regardless of following all of the steps, the app doesn’t seem within the Management Middle beneath Display screen Recording.

Questions:

Is it appropriate to make use of ScreenRecordingBroadcast for pickerView.preferredExtension?

Is RPBroadcastProcessModeSampleBuffer the proper mode for a React Native display screen recording use case?

What different steps can I take to debug why the extension just isn’t showing?

Any steerage can be drastically appreciated. Thanks!

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles