App rejected because of uiwebview

Hello I use cocos2d-x 3.17.2 my app is rejected because of UIWebView. I do not use it but the file are used in coco, what I have to do to solve that ?

Thanks,

ITMS-90809: Deprecated API Usage - Apple will stop accepting submissions of new apps that use UIWebView APIs starting from April 2020. See https://developer.apple.com/documentation/uikit/uiwebview for more information.

For me, the easiest solution would probably be to look for the cocos files in Xcode that contain UIWebView (using simple project-scoped search) and remove them from the project (UIWebViewImpl-ios.h and UIWebViewImpl-ios.mm and maybe some other header files - up to you. I think UIWebViewImpl-ios.mm is the only file that actually uses UIKit’s UIWebView, but you’d have to take a look around to confirm that). As well as appropriate references to them, e.g. you might have to remove the #include “ui/UIWebView.h” from the CocosGUI.h if you throw away all the UIWebView headers.

You might also just try to comment out some code in UIWebViewImpl-ios.mm so it doesn’t use Apple’s UIWebView.

1 Like

You also might want to remove associated frameworks.

Ok i remove all the file and about the framework? I’m afraid to destroy my project since it took a lot of time to configure all (I use raknet, facebook and sdkbox)

@zhangxm @coulsonwang and advice on how to remove UIWebView as it seems Apple might be rejecting apps because of 3.17.2 using it.

Really need help, my app is still rejected because of uiwebview :frowning: I removed UIWebViewImpl-ios.mm but it is still rejected, do I need to remove a package or something like this?

how can I check if sdkbox use uiwebview? I use sdkbox for iap and facebook.

Have you seen this topic maybe? iOS: TMS-90809: Deprecated API Usage - UIWebView

I’m sorry, I don’t think I can help much here. SDKBox doesn’t seem to be open-source. Maybe you should ask them whether they’ve removed UIWebView from their iap and social frameworks?

Thank you for your reply, Ok It looks it is a know problem so why there is no more helps about that since they know since last year all games will be rejected with the library provided.

How can I know which framework include uiwebview?
when I search for ‘uiwebview’ in my project I only have cocos lib.

@fabrice cocos2d-x already fixed it in github but not released. If you removed UIWebViewImpl-ios.mm, then cocos2d-x doesn’t use webivew anymore. About sdkbox, i can help to ask if it uses UIWebView or not.

@fabrice what plugins do you use ?

  1. sdkbox-core do not contains UIWebView.
  2. command to check which 3rd SDK contain UIWebView:
~/test/cpp317/proj.ios_mac [master] $ grep "UIWebView" -rn .
Binary file ./Bolts.framework/Bolts matches
./Bolts.framework/Headers/BFWebViewAppLinkResolver.h:16: A reference implementation for an App Link resolver that uses a hidden UIWebView
Binary file ./GoogleMobileAds.framework/GoogleMobileAds matches
$ strings ./GoogleMobileAds.framework/GoogleMobileAds | grep "UIWebView"
l_OBJC_LABEL_PROTOCOL_$_UIWebViewDelegate
l_OBJC_PROTOCOL_$_UIWebViewDelegate
l_OBJC_LABEL_PROTOCOL_$_UIWebViewDelegate
l_OBJC_PROTOCOL_$_UIWebViewDelegate
_OBJC_CLASS_$_GADOMIDUIWebViewJSExecutor
_OBJC_IVAR_$_GADOMIDUIWebViewJSExecutor._webView
_OBJC_METACLASS_$_GADOMIDUIWebViewJSExecutor
UIWebView
UIWebViewDelegate
....

the AdMob is still using UIWebView.

then SDKBox help to update these SDKs.

Thanks,

1 Like

Hello and thanks for the reply. I use cocos2d-x, raknet, and sdkbox.
I removed all uiwebview from cocos2d (OK with this), upgraded to last sdkbox who still use with bolts.framework. So I have no choice to remove also bolts.framework… my app is running but I do not know what will happen because of the remove of bolts.

Hey guys! Anyone figured this one out? 3.17.2 being rejected by Apple. Removed UIWebViewImpl-ios.mm and still same issue. It must be coming from SDKBox?

Thanks!

My game has just been approved by Apple (Cocos2d-x 3.17.2 C++). I didn’t do any modification in Cocos2d-x framework, but I’m not using SDKBox yet.

@Rogerup thanks! Must be SDKBox @yinjimmy can you please help us on this urgent issue?

We are using SDKBox iap, ads (admob and unity), and facebook. Looks like all plugins are all referencing UIWebView.

Thanks!

➜ proj.ios_mac git:(master) strings ./GoogleMobileAds.framework/GoogleMobileAds | grep “UIWebView”
_GAD_GADUIWebViewDelegateProxy_x86_64_7_44_0
OBJC_CLASS$_GADUIWebViewDelegateProxy
OBJC_IVAR$_GADUIWebViewDelegateProxy._webViewDelegate
OBJC_METACLASS$GADUIWebViewDelegateProxy
l_OBJC_LABEL_PROTOCOL
$UIWebViewDelegate
l_OBJC_PROTOCOL
$UIWebViewDelegate
l_OBJC_LABEL_PROTOCOL
$UIWebViewDelegate
l_OBJC_PROTOCOL
$_UIWebViewDelegate
OBJC_CLASS$_GADOMIDUIWebViewJSExecutor
OBJC_IVAR$_GADOMIDUIWebViewJSExecutor._webView
OBJC_METACLASS$_GADOMIDUIWebViewJSExecutor
GADUIWebViewDelegateProxy
UIWebViewDelegate
B40@0:8@"UIWebView"16@“NSURLRequest"24q32
v24@0:8@“UIWebView"16
v32@0:8@“UIWebView"16@“NSError"24
@””
T@””,W,N,V_webViewDelegate
UIWebView
UIWebViewDelegate
B40@0:8@"UIWebView"16@"NSURLRequest"24q32
v24@0:8@"UIWebView"16
v32@0:8@"UIWebView"16@"NSError"24
@“UIWebView”
Web view should be UIWebView or WKWebView or not null.
GADOMIDUIWebViewJSExecutor
@“UIWebView”

➜  proj.ios_mac git:(master) strings ./UnityAds.framework/UnityAds | grep "UIWebView"
%@/UnityAds: %s (line:%d) :: Using UIWebView for WebPlayer
%@/UnityAds: %s (line:%d) :: Error creating WKWebView, falling back to UIWebView
%@/UnityAds: %s (line:%d) :: Using UIWebView
UIWebViewDelegate
B40@0:8@"UIWebView"16@"NSURLRequest"24q32
v24@0:8@"UIWebView"16
v32@0:8@"UIWebView"16@"NSError"24

need to upgrade the UnityAds iOS SDK and the latest UnityAds in on the staging server. plz try:

sdkbox import unityads --staging