Moodle mobile IOS app rejected because of use of UIWebView

Moodle mobile IOS app rejected because of use of UIWebView

by yatin patel -
Number of replies: 11

As of now Moodle is build for cross platform and Xcode project is getting generated by ionic framework. So ionic is generating iOS project using UIWebView. 


Because of UIWebView I am facing a problem to upload mobile application on App Store. In iOS 13 UIWebView has been deprecated. So apple has stopped accepting submission of app that uses UIWebView. Moodle app uses the UIWebView for loading content of application. I have used this source code to develop my custom iOS mobile app.(https://github.com/moodlehq/moodlemobile2)


Is there any way to generate iOS app using WKWebView instead of UIWebView?


Average of ratings: -
In reply to yatin patel

Re: Moodle mobile IOS app rejected because of use of UIWebView

by Olalekan Adeniyi -
Hello Yatin,

I am currently facing the same problem, Apple stopped accepting app with UIWebView end of April 2020.

If you are able to solve this, please point me to the right direction.

Thanks
In reply to yatin patel

Re: Moodle mobile IOS app rejected because of use of UIWebView

by Mark Johnson -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

It looks like this is being worked on by the core team and will be fixed in the next app version: https://tracker.moodle.org/browse/MOBILE-3101 https://tracker.moodle.org/browse/MOBILE-3418

In reply to Mark Johnson

Re: Moodle mobile IOS app rejected because of use of UIWebView

by Olalekan Adeniyi -
Thank you Mark,

I got a fix around it, I added to config.xml and re-compiled the app.

This worked, and I have submitted 3 apps to Apple store within the past week.
In reply to Olalekan Adeniyi

Re: Moodle mobile IOS app rejected because of use of UIWebView

by Antonio Ortiz -
Hello Olalekan,

I have a similar problem, my custom app works perfect in Android but in iOS it can load SCOMS packages, debug process show the problem at WKWebview when the app load the cookies, maybe your solution works for me, what do you add en config.xml

Thanks in Advance
In reply to Antonio Ortiz

Re: Moodle mobile IOS app rejected because of use of UIWebView

by Olalekan Adeniyi -
Hi Ortiz,

Oh my!!!🙈 I forgot to post the line

Add the below code for uniformity, it can be before line 50, it does not matter though.

[code]<preference name="WKWebViewOnly" value="true" />[/code]
In reply to Olalekan Adeniyi

Re: Moodle mobile IOS app rejected because of use of UIWebView

by Noel De Martin -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

This can work as a workaround, but we don't recommend using it in production because it may break something.

As Mark said, we're working on this for the next release and we're testing that nothing is broken. If you can, I'd encourage you to wait for version 3.8.3 that is about to be released.

In reply to Olalekan Adeniyi

Re: Moodle mobile IOS app rejected because of use of UIWebView

by Antonio Ortiz -
Thanks for the answer, from what I understand the best thing will be to wait for the next version....
In reply to Olalekan Adeniyi

Re: Moodle mobile IOS app rejected because of use of UIWebView

by Ezra Zhiri Kolo -
Hi Olalekan,

Using this approach, my app does not go past the splash screen.
Did you update to Cordova iOS 5.1.0?
In reply to Ezra Zhiri Kolo

Re: Moodle mobile IOS app rejected because of use of UIWebView

by Olalekan Adeniyi -

Hello Ezra,

Please make sure you have the latest ionic, cordova, and also you should be using node version 11.12.0, if not let me see your debug log


Thanks

In reply to Ezra Zhiri Kolo

Re: Moodle mobile IOS app rejected because of use of UIWebView

by Ahmed Mahmoud -
Hey Ezra, Did you manage to fix this ?
In reply to Olalekan Adeniyi

Re: Moodle mobile IOS app rejected because of use of UIWebView

by Mahesh Koppisetti -
Even if we add that after moving to production the scroms are not working showing blank screen