I can't add <MobileRTCScreenShare/MobileRTCScreenShareService.h>

I add ScreenShare in my app, all is fine, the problem is when I add the MobileRTCScreenShare.framework to my ScreenShare extension and run my app, present this problem, I read all documentation and I don’t find a solution.

My app in in SWIFT and the Broadcasting Extension in Objective-C




Hey @hectorcastillomendoz,

Thanks for using the dev forum! It is nice to see you again :slight_smile:

In finder, navigate to the MobileRTCScreenShare.framework folder. Is there a folder in there called “Headers”?

Thanks!
Michael

I change the language of the extension to Swift, but the same error persist, verified the MobiteRTCScreenShare.framework and YES, the is a folder with Headers Name.Captura de Pantalla 2021-02-25 a la(s) 15.46.28 Captura de Pantalla 2021-02-25 a la(s) 15.47.14

Hey @hectorcastillomendoz,

I see. So this looks like a case of Xcode looking for the framework header files in a different spot than it appears to be.

Can you provide screenshots of your framework search paths and header search paths for your broadcast extension target?
One other thing you can try is removing that framework entirely, then putting it back in but when it asks if you would like to “Create groups” check the box that says “Copy items if needed”.

Thanks!
Michael

1 Like

One thing happen when I add the framework, when add MobileRTCScreenShare.framework to my ScreenShare target, Xcode don’t ask me if I want Copy items if needed, only add my framework and that’s all. I add framework draging file direct to Frameworks and Libraries

Attatch screenshots.


Hey @hectorcastillomendoz,

Try adding the path to your MobileRTCScreenShare.framework folder into “Framework Search Paths” right now mine is set to $(PROJECT_DIR)/MobileRTCScreenShare, but it may be different for you. I would hardcode the path first to see if that is what is causing issues.

Thanks!
Michael

SOLVED, adding framework draging to Folder Frameworks, then ask me what target and Copy items if needed.

Thanks so much for your help, you are awesome.

1 Like

Hey @hectorcastillomendoz,

Awesome! I am super happy to hear! :fireworks:

No you are awesome!

Let us know if you run into anything else.
Thanks!
Michael

All right, the problem with #import <MobileRTCScreenShare/MobileRTCScreenShareService.h> was solved, but now the is a new problem, the app run but the problem is that the button for share something don’t appears.

Hey @hectorcastillomendoz,

This button will not show unless the onClickShareScreen delegate function is implemented by your MobileRTCMeetingServiceDelegate

Thanks!
Michael

1 Like

I have implemented the onClickShareScreen function of MobileRTCMeetingServiceDelegate.

I login

I have a listener that tells me when I am logged in

And this is my code for start the meeting. am I passing something?

I solved the problem, the button appears, I can share screen but one the process start if I leave the app for share screen of other app, my app crash.

Now don’t crash but when I leave my app, video of participants don’t refresh. image freeze.

Hey @hectorcastillomendoz,

I am happy to hear the button is now showing. To make sure I am understanding correctly, when you leave the app the screensharing freezes? If so, can you add background modes to your target? Specifically the “Audio, Airplay, and Picture in Picture” mode. Also verify that you have added the MobileRTC AppDelegate callbacks in your AppDelegate:

class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    // Override point for customization after application launch.
    return true
}

func applicationWillTerminate(_ application: UIApplication) {
    MobileRTC.shared().appWillTerminate()
}

func applicationDidBecomeActive(_ application: UIApplication) {
    MobileRTC.shared().appDidBecomeActive()
}

func applicationWillResignActive(_ application: UIApplication) {
    MobileRTC.shared().appWillResignActive()
}

func applicationDidEnterBackground(_ application: UIApplication) {
    MobileRTC.shared().appDidEnterBackgroud()
}

}

Thanks!
Michael

1 Like

Thanks Michael, I’ll try.

1 Like

Sounds good, let me know what happens.

Michael

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