App Share. White Screen is shown when PDF content is shared in a WKWebView

Description

We are trying to sharing app content (WKWebView) which loads the PDF content URL and that should be displayed to all the participants as remote share. However, the application is not able to display the PDF content shared within a WKWebView and it just shows the page counter and scrolling, etc. so this means the WKWebView is shared but not the content view.
We followed the same code as mentioned in the sample project for sharing the local/remote content.
LocalShareViewController.m
RemoteShareViewController.m

We also tried with Zoom built-in meeting UI and it has the same issue. Can you please review and let us know the actual way of sharing the PDF file URL using the Zoom’s app share feature.

Which version?

4.6.15084.0206

To Reproduce

Steps to reproduce the behavior:

  1. Go to MobileRTCSampleApp
  2. Click on Meet Now button and start the Custom Meeting (*make sure you have the custom meeting option selected in the app settings)
  3. Tap on the ‘Start Share’ button by default it will open the zoom.us site. Now change the URL to open any pdf file e.g https://www.uakron.edu/armyrotc/MS1/15.pdf
  4. The app will successfully display the pdf file content in a web view on the local share view.
  5. Now join the same meeting from another phone and experience the remote share view will have white screen as shown in the below screenshot.

Screenshots

Smartphone:

  • Device: iPhone X

  • OS: iOS

  • Version 13.3.1

Hi usman.awan,

Thanks for the post. Let me forward this to the engineering team for further investigation and get back to you shortly. Thx.

1 Like

Hi @carson.zoom,

Do we have any update on this issue?

Thanks,

Hi usman.awan,

Thanks for the reply. We are able to identify this issue and we are investigating the solutions for this. In the meantime, please have a try to use the Broadcast extension and ReplayKit to perform screen sharing. You may find the instruction here:https://marketplace.zoom.us/docs/sdk/native-sdks/iOS/mastering-zoom-sdk/in-meeting-function/zoom-meeting-ui/screen-share

Thanks!

Hi @carson.zoom,

any update on this?

Thanks!

Hi @gabrielangelo.inot,

Thanks for using Zoom SDK. If you would like to implement the screen sharing feature, you could follow the instruction here: https://marketplace.zoom.us/docs/sdk/native-sdks/iOS/mastering-zoom-sdk/in-meeting-function/zoom-meeting-ui/screen-share

Thanks!

I have followed steps on https://marketplace.zoom.us/docs/sdk/native-sdks/iOS/mastering-zoom-sdk/in-meeting-function/zoom-meeting-ui/screen-share
my broadcast has started and sharing content…even my extension is working as my extension delegate processSampleBuffer is called… but content is not shared on zoom…

Please provide any solution…

Hi @amit.jadhav,

Thanks for using Zoom SDK. Did you set the App group ID when initializing the SDK? Is the SDK app shown in the broadcasting app list?

Thanks!

Yes… I was able to make it work… Video works fine…
but now the issue is with audio… Audio is not working even after following this thread iOS SDK - Custom UI - Can't play music and meeting audio together

Need solution asap…

Hi @amit.jadhav,

Glad to hear that it is working. If you are using Custom UI, currently the audio share is not supported.

Thanks!

Never had this kind of issue, but it’s good to know that I can find the solution here!

Hey @severund,

Please let us know if you run into any issues with this in the future :slight_smile:

Michael

Thank you for your kind reply. I will most definitely use the opportunity of letting you know in case I run into any similar issues or other kinds of issues with this in the future.

1 Like

Sounds like a plan :slight_smile:

Of course, it is a plan. I wonder why did you need to share app content (WKWebView) which loads the PDF content URL and that should be displayed to all the participants as remote share. I believe you could have avoided this type of issue from the start if you had checked first if the application is able or not to display the PDF content shared within a WKWebView and what does it do in this situation. I prefer working with pdf documents, that’s why I use https://pdf-ocr.com every time when I need to convert other documents in a pdf format.

Hey @severund,

Forgive me for misunderstanding, are you having issues with sharing in the iOS SDK?

Thanks!
Michael

Hello Guys,

I just thought update here. So, this issue is purely related to when host tries to share app content (not broadcast screen-share) and in that if you have a view that’s hold WKWebview which has to open PDF link/url than the content will not be shown.

I managed to fixed this issue by using Apple’s PDFKit framework for showing the PDF link instead of using the WKWebView.

I do really hope that in the latest zoom ios client does have the fix for WKWebView manage to show the content on remote user side.

Hey @usman.awan,

Thank you for the update and workaround. I will inform the team.

Michael

HEY! @usman.awan , I work on an app that is having a similar problem, pdf issues sharing app content fails for pdf’s with WKwebview. We recently were required to upgrade from UIWebview to WKwebview, after which we had issues. Got any example code of using to PDFKit instead? :slight_smile:

Update: this is what worked for me

    NSString* ext = [_contentURL pathExtension];
    if(ext != nil && [ext isEqual:@"pdf"]){
        
    PDFDocument *pdfDocument = [[PDFDocument alloc] initWithURL:_contentURL];
    PDFView *pdfView = [[PDFView alloc] initWithFrame:CGRectMake(0, 0, self.contentWebView.bounds.size.width, self.contentWebView.bounds.size.height)];
    pdfView.document = pdfDocument;
    pdfView.autoScales= true;
    [self.contentWebView addSubview:pdfView];
        
    }
   else
   [self.contentWebView loadRequest:[NSURLRequest requestWithURL:_contentURL]];
2 Likes

Hey @zchprogramming,

Thank you for using the dev forum!
@usman.awan Thank you in advance if you decide to share your example code.

Michael

1 Like