Moodle mobile IOS app rejected because of use of UIWebView

Moodle mobile IOS app rejected because of use of UIWebView

yatin patel -
回帖数: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?


回复yatin patel

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

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
回复yatin patel

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

Mark Johnson -
Core developers的头像 Particularly helpful Moodlers的头像 Peer reviewers的头像 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

回复Mark Johnson

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

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.
回复Olalekan Adeniyi

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

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
回复Antonio Ortiz

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

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]
回复Olalekan Adeniyi

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

Noel De Martin -
Core developers的头像 Moodle HQ的头像 Peer reviewers的头像 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.

回复Olalekan Adeniyi

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

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

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

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?
回复Ezra Zhiri Kolo

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

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

回复Olalekan Adeniyi

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

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