Thursday, October 22, 2026
HomeiOS Developmentios - Add Broadcast Add Extension in an present app

ios – Add Broadcast Add Extension in an present app

[ad_1]

I need to add a Broadcast Add Extension to an present swift native app. This extension is used for capturing the contents of the consumer's display screen like display screen sharing.

Goal:

I’m including Jitsi Meet SDK for video calling in my app. And this SDK requires a broadcast add extension to allow the display screen sharing choice.

What I’ve tried:

I attempted so as to add a broadcast add extension with a brand new app and replica all of the configuration into my present app.

Steps of copying configuration from new app to present app:

  1. Copy recordsdata Atomic.swift, DarwinNotificationCenter.swift, SocketConnection.swift from broadcast extension folder of display screen sharing pattern given in Jitsi Meet SDK pattern mission. Right here

  2. Added .entitlements file as per the above hyperlink of Jitsi Meet SDK pattern

  3. Added the group key within the .entitlements file in the primary mission folder group

.entitlements file In important mission folder group :

<key>com.apple.safety.application-groups</key>
    <array>
        <string>group.com.jitsi.example-screensharing.appgroup</string>
    </array>
  1. Copy the NSExtension key and its content material from the brand new app to the present one in information.plist file.
  2. Give permissions to the microphone, digital camera & native community within the present app in information.plist file.
  3. Add keys RTCScreenSharingExtension & RTCAppGroupIdentifier within the present app in information.plist file.

information.plist (level 5):

<key>NSExtension</key>
    <dict>
        <key>NSExtensionPointIdentifier</key>
        <string>com.apple.broadcast-services-upload</string>
        <key>NSExtensionPrincipalClass</key>
        <string>$(PRODUCT_MODULE_NAME).SampleHandler</string>
        <key>RPBroadcastProcessMode</key>
        <string>RPBroadcastProcessModeSampleBuffer</string>
    </dict>

information.plist (level 6):

<key>NSMicrophoneUsageDescription</key>
<string>This may will let you use microphone to file audio messages and be part of ${PRODUCT_NAME} conferences</string>
 
   <key>NSLocalNetworkUsageDescription</key>
    <string>Native community entry is required for P2P connections.</string>
   
 <key>NSCameraUsageDescription</key>
    <string>This allows you to do issues like take a photograph and set it as your profile image or share photographs and movies with different crew members inside your workspace.
</string>

information.plist (level 7):

<key>RTCScreenSharingExtension</key>
<string>com.jitsi.example-screensharing.broadcast.extension</string>
<key>RTCAppGroupIdentifier</key>
<string>group.com.jitsi.example-screensharing.appgroup</string>

Error:

Getting an error in an present app that

A number of instructions produce '/Customers/UserName/Library/Developer/Xcode/DerivedData/project-name-cgxqvnvmumzlucbokufvjzcnobpn/Construct/Merchandise/Debug-iphonesimulator/project-name.app/Data.plist':
1) Goal 'project-name' (mission 'project-name') has copy command from '/Customers/Username/workspace/github/project-name/project-name/Data.plist' to '/Customers/Username/Library/Developer/Xcode/DerivedData/project-name-cgxqvnvmumzlucbokufvjzcnobpn/Construct/Merchandise/Debug-iphonesimulator/project-name.app/Data.plist'
2) Goal 'project-name' (mission 'project-name') has course of command with output '/Customers/Username/Library/Developer/Xcode/DerivedData/project-name-cgxqvnvmumzlucbokufvjzcnobpn/Construct/Merchandise/Debug-iphonesimulator/project-name.app/Data.plist'

[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments