# Screen share iOS SDK

**URL:** <https://devforum.zoom.us/t/screen-share-ios-sdk/19315>\
**Category:** iOS\
**Created:** [May 27, 2020, 10:12pm UTC](https://devforum.zoom.us/t/screen-share-ios-sdk/19315 "2020-05-27T22:12:40Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![tetteu777](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tetteu777/32/2754_2.png) [@tetteu777](https://devforum.zoom.us/u/tetteu777)\
**Post date:** [May 27, 2020, 10:12pm UTC](https://devforum.zoom.us/t/screen-share-ios-sdk/19315/1 "2020-05-27T22:12:40Z")

</div>

**Description**  
I can’t do the procedure to activate screen share feature to my sample iOS app. The documentation seems to be incompatible to the SDK actual version

**Which version?**  
v4.6.21666.0428 (SDK)  
XCODE Version 11.4.1  
iOS 13.4

**To Reproduce**

1. I downloaded SDK v4.6.21666.0428, specifically the version to use emulator
2. Did the procedure to add SDK key, etc and got the sample running just fine
3. Tried to follow the documentation to activate the screen share extension
4. Prints in the documentation are different to what happens when you try to do that
5. Screens are different, some codes are different…
6. Got this error at the end: “ld: framework not found MobileRTCScreenShare”

 ![FotoJet](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/2/291ff41157316b6293ba166e9d9f035eea9516db.jpeg)

**Smartphone (please complete the following information):**

- Device: Emulator
- OS: 13.4

**Additional context**  
Please SOS

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [May 28, 2020, 7:56am UTC](https://devforum.zoom.us/t/screen-share-ios-sdk/19315/2 "2020-05-28T07:56:24Z")

</div>

Hi @tetteu777,

Thanks for the post. The screenshots in the documentation were taken in an older version of Xcode(Xcode 10). It might look a little bit different now in Xcode 11 but the steps and the concepts are still the same.

Based on the error message, it seems like your Xcode is not able to locate the MobileRTCScreenShare.framework, please double check the “Framework search path” in your Build Settings, make sure the MobileRTCScreenShare.framework is in the search path, and correctly imported.

If you are still facing this issue, you may refer to the solutions in the following links:

- [https://stackoverflow.com/questions/32687105/framework-not-found-in-xcode](https://stackoverflow.com/questions/32687105/framework-not-found-in-xcode)  
\*[https://stackoverflow.com/questions/47670857/xcode-wont-build-due-to-framework-not-found](https://stackoverflow.com/questions/47670857/xcode-wont-build-due-to-framework-not-found)
- [https://medium.com/@steve.mu.dev/solving-framework-not-found-error-in-xcode-1ae21bac229](https://medium.com/@steve.mu.dev/solving-framework-not-found-error-in-xcode-1ae21bac229)

And please also configure your broadcast extension setting to be the following:

- Enable BitCode: NO
- Objective-C ARC: NO
- C++ language dialect: Compiler Default

Hope this helps. Thanks!

---

<div class="post-metadata">

**Author:** ![tetteu777](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tetteu777/32/2754_2.png) [@tetteu777](https://devforum.zoom.us/u/tetteu777)\
**Post date:** [May 28, 2020, 5:28pm UTC](https://devforum.zoom.us/t/screen-share-ios-sdk/19315/3 "2020-05-28T17:28:44Z")

</div>

Hi @carson.zoom,

Thank you very much! I could make it work. The “framework not found” error was solved.  
The app launched but there was no option to share the screen.

 ![WhatsApp Image 2020-05-28 at 14.20.32](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/f/fa4d83f59db08d80454cc733379d62fac645f1e5.jpeg)

I checked this link =\> ( [https://support.zoom.us/hc/en-us/articles/115005890803-iOS-Screen-Sharing](https://support.zoom.us/hc/en-us/articles/115005890803-iOS-Screen-Sharing) ) but I can’t find Control Center in my Emulator. Does it only work in real devices?

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [May 29, 2020, 7:05am UTC](https://devforum.zoom.us/t/screen-share-ios-sdk/19315/4 "2020-05-29T07:05:28Z")

</div>

Hi @tetteu777,

Glad to hear that! In order to show the “Share” button, you need to follow Step 7 in [https://marketplace.zoom.us/docs/sdk/native-sdks/iOS/mastering-zoom-sdk/in-meeting-function/zoom-meeting-ui/screen-share](https://marketplace.zoom.us/docs/sdk/native-sdks/iOS/mastering-zoom-sdk/in-meeting-function/zoom-meeting-ui/screen-share) and implement the callback function. Please note that: Implementing this callback will show the “Share” button, but you still need to handle and to trigger the screen sharing feature.

According to [https://stackoverflow.com/questions/49816794/cannot-open-iphone-control-center-on-simulator](https://stackoverflow.com/questions/49816794/cannot-open-iphone-control-center-on-simulator), Control Center is not available in the emulator. The screen sharing should work in an emulator but the control center in iOS is out of our control.

Thanks!

---

<div class="post-metadata">

**Author:** ![tetteu777](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tetteu777/32/2754_2.png) [@tetteu777](https://devforum.zoom.us/u/tetteu777)\
**Post date:** [May 29, 2020, 3:42pm UTC](https://devforum.zoom.us/t/screen-share-ios-sdk/19315/5 "2020-05-29T15:42:07Z")

</div>

Hi @carson.zoom,

Thank you for your attention.

I actually have added this to SampleHandler.m:

 ![WhatsApp Image 2020-05-29 at 12.32.05](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/5/5949c7042b7f8132b453cc3eb815f91de2823b4b.jpeg)

What do you mean by saying that I need to handle and to trigger the screen sharing feature?  
Is there any example or tutorial about that?

I have others 2 questions too:

1. In the documentation it says that there is a version for device only and another for emulators. Alright. But it says that to deploy to App Store I must use the version for devices only. In this case, if I want to test in emulators and after the app is done I want to send it to App Store what should I do?

2. The iOS SDK is implemented in Objective-C, is it possible to use the SDK in a Swift project? Is there any tutorial about that?

Cordially,

Matheus Neumann

---

<div class="post-metadata">

**Author:** ![tetteu777](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tetteu777/32/2754_2.png) [@tetteu777](https://devforum.zoom.us/u/tetteu777)\
**Post date:** [May 29, 2020, 8:38pm UTC](https://devforum.zoom.us/t/screen-share-ios-sdk/19315/6 "2020-05-29T20:38:45Z")

</div>

Hi again,

I found a [tutorial](https://medium.com/@vishaljadav123/zoom-sdk-integration-in-ios-swift-25ce12c0be8c) posted recently about how to use the iOS Zoom SDK with Swift.

AppDelegate.swift

```
import UIKit
import MobileRTC
import MobileCoreServices
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate,MobileRTCAuthDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
let storyBoard : UIStoryboard = UIStoryboard(name: "Main", bundle:nil)
let newViewController = storyBoard.instantiateViewController(withIdentifier: "ViewController") as! ViewController
let navigationController = UINavigationController(rootViewController: newViewController)
window?.rootViewController = navigationController
window?.makeKeyAndVisible()
let mainSDK = MobileRTCSDKInitContext()
mainSDK.domain = "zoom.us"
MobileRTC.shared().initialize(mainSDK)
let authService = MobileRTC.shared().getAuthService()
print(MobileRTC.shared().mobileRTCVersion)
authService?.delegate = self
authService?.clientKey = "Your Client Key"
authService?.clientSecret = "Your Client Secret Key"
authService?.sdkAuth()
return true
}
func onMobileRTCAuthReturn(_ returnValue: MobileRTCAuthError) {
print(returnValue)
if (returnValue != MobileRTCAuthError_Success)
{
   let msg = "SDK authentication failed, error code: \(returnValue)"
    print(msg)
 }
  }
}

```

and ViewController.swift

```
import UIKit
import MobileRTC
class ViewController: UIViewController {
let meetingNo = "Your Meeting Number"
let kSDKUserName = ""
override func viewDidLoad() {
super.viewDidLoad()
if(self.meetingNo == "") {
      // If the meeting number is empty, return error.
       print("Please enter a meeting number")
       return
} else {
     // If the meeting number is not empty.
     let getservice = MobileRTC.shared().getMeetingService()
     if let service = getservice {
         service.delegate = self
         let paramDict = [kMeetingParam_Username:kSDKUserName,kMeetingParam_MeetingNumber:meetingNo, kMeetingParam_MeetingPassword:"",kMeetingParam_WebinarToken:"Your Webinar Token"]
         let response = service.joinMeeting(with: paramDict)
         print("onJoinMeeting, response: \(response)")
      }
   }
  }
}
extension ViewController: MobileRTCMeetingServiceDelegate{
    func onMeetingStateChange(_ state: MobileRTCMeetingState) {
       print("\(state)")
    }
}

```

I tried to run that and got this “error”:  
**MobileRTCAuthError(rawValue: 0)**

Do you have any clue about how to fix this?

---

<div class="post-metadata">

**Author:** ![tetteu777](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tetteu777/32/2754_2.png) [@tetteu777](https://devforum.zoom.us/u/tetteu777)\
**Post date:** [May 29, 2020, 8:44pm UTC](https://devforum.zoom.us/t/screen-share-ios-sdk/19315/7 "2020-05-29T20:44:08Z")

</div>

And by the way, I think it would be important to have an official sample using Swift.

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [May 30, 2020, 12:59am UTC](https://devforum.zoom.us/t/screen-share-ios-sdk/19315/8 "2020-05-30T00:59:45Z")

</div>

Hi @tetteu777,

Thanks for the replies. Regarding your questions:

> [@tetteu777](#):
>
> What do you mean by saying that I need to handle and to trigger the screen sharing feature?

So implementing the `onClickShareScreen` callback will show the “Screen” button in the share option UI, but pressing it won’t start sharing. Since the broadcast extension is relying on the system’s screen recording, you need to trigger the screen recording feature in that callback(Use something like [RPSystemBroadcastPickerView | Apple Developer Documentation](https://developer.apple.com/documentation/replaykit/rpsystembroadcastpickerview?language=objc) or any other ways you prefer) so that when you press the “Screen” button, you will start sharing.

> [@tetteu777](#):
>
> MobileRTCAuthError(rawValue: 0)

RawValue means success in all interface returns.

> [@tetteu777](#):
>
> And by the way, I think it would be important to have an official sample using Swift.

I agree with you, we do not have it because we have limited bandwidth here. Once we have enough bandwidth, we will definitely think about having a Swift version of the iOS sample.

Thanks!

---

<div class="post-metadata">

**Author:** ![DeveloperBot](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/developerbot/32/12632_2.png) [@DeveloperBot](https://devforum.zoom.us/u/DeveloperBot)\
**Post date:** [August 21, 2020, 9:38pm UTC](https://devforum.zoom.us/t/screen-share-ios-sdk/19315/9 "2020-08-21T21:38:09Z")

</div>

Closed on August 21, 2020, 9:38pm UTC


