iOS - UIWebView depreciated

  • Hi, Ashley.

    One of my addon users linked me here, and I got a bit worried so I looked it up.

    I'm currently checking my own addons.

    Although, I can confirm they are right, the Mobile Advert is causing an issue. The PACView class does use the depreciated reference.

    The Consent implementation uses the UIWebview reference. This might have been overlooked.

    From observation, it looks like a lot of work. So, I wouldn't pressure Ashley to fix this since it is not an easy fix.

    Although, hopefully the Construct Team will work on patching the plugins that are affected.

  • Hi

    I have the same issue.

    I was deleting plugins from project to find out which one is making errors and I see there are problems with MobileAdvert and Share plugins.

    I'm sending code from Xcode that refers to UIWebView. I hope that it will help somehow.

    @implementation PACView { UIWebView *_webView; NSDictionary<PACFormKey, id> *_formInformation; PACLoadCompletion _loadCompletionHandler; } - (instancetype)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { self.backgroundColor = UIColor.clearColor; self.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; _webView = [[UIWebView alloc] initWithFrame:frame]; _webView.delegate = self; _webView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; _webView.backgroundColor = UIColor.clearColor; _webView.opaque = NO; _webView.scrollView.bounces = NO; [self addSubview:_webView]; } return self; }

    #pragma mark UIWebViewDelegate - (void)webViewDidFinishLoad:(UIWebView *)webView { [self updateWebViewInformation]; } - (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error { [self loadCompletedWithError:error]; } - (BOOL)webView:(nonnull UIWebView *)webView shouldStartLoadWithRequest:(nonnull NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType { NSString *URLString = request.URL.absoluteString; if (!) { return YES; }

    - (NSString*)getIPadPopupCoordinates { if (_popupCoordinates != nil) { return _popupCoordinates; } if ([self.webView respondsToSelector:@selector(stringByEvaluatingJavaScriptFromString:)]) { return [(UIWebView*)self.webView stringByEvaluatingJavaScriptFromString:@"window.plugins.socialsharing.iPadPopupCoordinates();"]; } else { // prolly a wkwebview, ignoring for now return nil; } }

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Ashley, the Consent API for iOS has been updated for WKWebview, you can check it out here: github.com/googleads/googleads-consent-sdk-ios

    Fortunately, it is an easy copy-paste solution.

  • Hi i am facing the same issue today, It May 2020, Is it because any of the plugins i use make use of uIwebview

    can you help me identify which plugin this is.

    <plugin author="Scirra" id="AJAX" version="1">AJAX</plugin>

    <plugin author="Scirra" id="Arr" version="1">Array</plugin>

    <plugin author="Scirra" id="Audio" version="1">Audio</plugin>

    <plugin author="Scirra" id="Browser" version="1">Browser</plugin>

    <plugin author="Scirra" id="Button" version="1">Button</plugin>

    <plugin author="Scirra" id="Dictionary" version="1">Dictionary</plugin>

    <plugin author="Scirra" id="Function" version="1">Function</plugin>

    <plugin author="Scirra" id="Keyboard" version="1">Keyboard</plugin>

    <plugin author="Scirra" id="LocalStorage" version="1">Local storage</plugin>

    <plugin author="Chris Hackmann (aka linkman2004)" id="MagiCam" version="6.5">MagiCam</plugin>

    <plugin author="Scirra" id="Mouse" version="1">Mouse</plugin>

    <plugin author="Scirra" id="NinePatch" version="1">9-patch</plugin>

    <plugin author="Rex.Rainbow" id="Rex_Function2" version="1">Function2</plugin>

    <plugin author="Rex.Rainbow" id="Rex_Scenario" version="0.100000001">Scenario</plugin>

    <plugin author="Rex.Rainbow" id="Rex_TimeLine" version="1">TimeLine</plugin>

    <plugin author="Rex.Rainbow" id="Rex_TweenTasks" version="0.100000001">Tween tasks</plugin>

    <plugin author="Scirra" id="Sprite" version="1">Sprite</plugin>

    <plugin author="Scirra" id="Spritefont2" version="1">Sprite font</plugin>

    <plugin author="Scirra" id="Text" version="1">Text</plugin>

    <plugin author="Scirra" id="TextBox" version="1">Text box</plugin>

    <plugin author="Scirra" id="TiledBg" version="1">Tiled Background</plugin>

    <plugin author="Scirra" id="Touch" version="1">Touch</plugin>

    <plugin author="hmmg" id="hmmg_layoutTransition_v2" version="1">Layout Transition V2</plugin>

    <plugin author="Rex.Rainbow" id="rex_TagText" version="0.100000001">Tag Text</plugin>

    <plugin author="Rex.Rainbow" id="rex_youtube_player" version="0.100000001">Youtube player</plugin>

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)