# Share button is not visible in share content in MobileRTC framework

**URL:** <https://devforum.zoom.us/t/share-button-is-not-visible-in-share-content-in-mobilertc-framework/60690>\
**Category:** iOS\
**Created:** [November 25, 2021, 5:33am UTC](https://devforum.zoom.us/t/share-button-is-not-visible-in-share-content-in-mobilertc-framework/60690 "2021-11-25T05:33:07Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![bhanu](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/bhanu/32/32856_2.png) [@bhanu](https://devforum.zoom.us/u/bhanu)\
**Post date:** [November 25, 2021, 5:33am UTC](https://devforum.zoom.us/t/share-button-is-not-visible-in-share-content-in-mobilertc-framework/60690/1 "2021-11-25T05:33:07Z")

</div>

**Description**  
Share button is not visible in share content in MobileRTC framework.

**Which iOS Meeting SDK version?**  
MobileRTC framework

**To Reproduce(If applicable)**  
Steps to reproduce the behavior:

1. Start meeting
2. Share content
3. Three options are their i.e. Photos, Website URL and Bookmark  
4 There is no screen share button avaliable

**Smartphone (please complete the following information):**  
iPhone 12 mini  
iOS 15.1

**Additional context**  
Share button is not visible in share content in MobileRTC framework.  
Please help me out how can I put the share button there in my App.

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [December 2, 2021, 12:02am UTC](https://devforum.zoom.us/t/share-button-is-not-visible-in-share-content-in-mobilertc-framework/60690/2 "2021-12-02T00:02:22Z")

</div>

Hey @bhanu,

Thanks for using the dev forum!

To show this button, you have to implement the onClickShareScreen callback in MobileRTCMeetingServiceDelegate.

Thanks!  
Michael

---

<div class="post-metadata">

**Author:** ![bhanu](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/bhanu/32/32856_2.png) [@bhanu](https://devforum.zoom.us/u/bhanu)\
**Post date:** [December 2, 2021, 9:57am UTC](https://devforum.zoom.us/t/share-button-is-not-visible-in-share-content-in-mobilertc-framework/60690/3 "2021-12-02T09:57:30Z")

</div>

Hello @Michael_Condon

Thanks for your reply!

Can you please share that function with me?

And in this class I need to implement that function?

```auto
class SampleHandler: RPBroadcastSampleHandler, MobileRTCScreenShareServiceDelegate {

    var screenShareService: MobileRTCScreenShareService?

    override init() {
        super.init()
        screenShareService?.appGroup = "group.com.hf.ZoomMeeting"
        screenShareService = MobileRTCScreenShareService()
        screenShareService?.delegate = self
    }
    
    override func broadcastStarted(withSetupInfo setupInfo: [String : NSObject]?) {
        // User has requested to start the broadcast. Setup info from the UI extension can be supplied but optional.
        screenShareService?.broadcastStarted(withSetupInfo: setupInfo)
    }
    
    override func broadcastPaused() {
        // User has requested to pause the broadcast. Samples will stop being delivered.
        screenShareService?.broadcastPaused()
    }
    
    override func broadcastResumed() {
        // User has requested to resume the broadcast. Samples delivery will resume.
        screenShareService?.broadcastResumed()
    }
    
    override func broadcastFinished() {
        // User has requested to finish the broadcast.
        screenShareService?.broadcastFinished()
    }
    
    override func processSampleBuffer(_ sampleBuffer: CMSampleBuffer, with sampleBufferType: RPSampleBufferType) {
        self.screenShareService?.processSampleBuffer(sampleBuffer, with: sampleBufferType)
        
        switch sampleBufferType {
        case RPSampleBufferType.video:
            // Handle video sample buffer
            break
        case RPSampleBufferType.audioApp:
            // Handle audio sample buffer for app audio
            break
        case RPSampleBufferType.audioMic:
            // Handle audio sample buffer for mic audio
            break
        @unknown default:
            // Handle other sample buffer types
            fatalError("Unknown type of sample buffer")
        }
    }
    func mobileRTCScreenShareServiceFinishBroadcastWithError(_ error: Error!) {
            finishBroadcastWithError(error)
        print(error)
    }
    
}

```

Thanks!  
Bhanu

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [December 3, 2021, 10:58pm UTC](https://devforum.zoom.us/t/share-button-is-not-visible-in-share-content-in-mobilertc-framework/60690/4 "2021-12-03T22:58:38Z")

</div>

Hey @bhanu

This would actually be located in your main target. Something like this:

```auto
extension yourDelegate: MobileRTCMeetingServiceDelegate {
    func onClickShareScreen(_ parentVC: UIViewController) {
        // if you want to trigger the broadcast here, you would present a ReplayKitPickerView here
    }
}

```

Thanks!  
Michael

---

<div class="post-metadata">

**Author:** ![bhanu](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/bhanu/32/32856_2.png) [@bhanu](https://devforum.zoom.us/u/bhanu)\
**Post date:** [December 6, 2021, 4:20am UTC](https://devforum.zoom.us/t/share-button-is-not-visible-in-share-content-in-mobilertc-framework/60690/5 "2021-12-06T04:20:47Z")

</div>

Thanks @Michael_Condon

I got the point!

Now I’m getting this error when I do the broadcasting can you please help me out…

```auto
2021-12-06 09:49:47.528506+0530 ScreenShare[503:7504] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x570f, name = '.503.rpc'
See /usr/include/servers/bootstrap_defs.h for the error codes.

```

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [December 7, 2021, 9:13pm UTC](https://devforum.zoom.us/t/share-button-is-not-visible-in-share-content-in-mobilertc-framework/60690/6 "2021-12-07T21:13:40Z")

</div>

Hi @bhanu,

Is this error accompanied by any incorrect behavior? If so, please provide additional context around when you’re seeing so that we can better assist.

Also, which version of the SDK are you current using?

Thanks!

---

<div class="post-metadata">

**Author:** ![bhanu](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/bhanu/32/32856_2.png) [@bhanu](https://devforum.zoom.us/u/bhanu)\
**Post date:** [December 8, 2021, 4:59am UTC](https://devforum.zoom.us/t/share-button-is-not-visible-in-share-content-in-mobilertc-framework/60690/7 "2021-12-08T04:59:41Z")

</div>

Hi @jon.zoom,

I’m using Zoom meeting v5.7.6.1080 SDK.

I don’t know why this error is coming and also getting crash in `override func processSampleBuffer(_ sampleBuffer: CMSampleBuffer, with sampleBufferType: RPSampleBufferType)`

 ![Screen Shot 2021-12-08 at 10.28.33 AM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/c/2/c24a1b043f2814881dcfaf40b488b0a426423118.png)

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [December 8, 2021, 7:27pm UTC](https://devforum.zoom.us/t/share-button-is-not-visible-in-share-content-in-mobilertc-framework/60690/8 "2021-12-08T19:27:49Z")

</div>

Hi @bhanu,

Apologies, but can you describe what actions you are taking leading up to this crash? It is unclear when this is happening, so if you can describe the steps to reproduce this it would be helpful. 🙂

Thanks!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [January 8, 2022, 5:27am UTC](https://devforum.zoom.us/t/share-button-is-not-visible-in-share-content-in-mobilertc-framework/60690/9 "2022-01-08T05:27:57Z")

</div>

Closed on January 8, 2022, 5:27am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
