[FIXED] Xamarin iOS – Broadcast Upload Extension – how to invoke

Issue

Recently I added Broadcast Upload Extension to Xamarin.Forms project however I can’t find a way how to invoke the extension and present it to the user from the container app.

How would I invoke the extension and present it to the user? Through OpenUrl and it’s bundle identifier?

Solution

Needs to be invoked like this:

var bundle = NSBundle.MainBundle.GetUrlForResource("Foo.iOS.ScreenShareExtensionUI", "appex", "PlugIns");

            RPScreenRecorder.SharedRecorder.StartRecording(true, error =>
            {
                if (error != null)
                    LogService.Log(error.LocalizedFailureReason, LogService.LogLevel.ERROR, "StartRecording");
            });
            RPBroadcastActivityViewController.LoadBroadcastActivityViewController(bundle.AbsoluteUrl.ToString(), (controller, error) =>
            {
                UIApplication.SharedApplication.KeyWindow.RootViewController.PresentViewController(controller, true, null);

                RPBroadcastActivityViewController = controller;
            });

Answered By – Jakub Holovsky

Answer Checked By – David Goodson (Easybugfix Volunteer)

Leave a Reply

(*) Required, Your email will not be published