aquila198
buzztouch Evangelist
Profile
Posts: 473
Reg: Jul 22, 2011
location unknow...
10,330
06/08/20 02:25 PM (3 years ago)

Apple will no longer accept submissions of new apps that use UIWebView as of April 30, 2020

Gatorcade brought this up in a thread and I wanted to bring it to the top of the forum - and be certain we all saw it; is there any workaround for this? It appears if this is not fixed, Apple will not be accepting any new BT Apps, correct? >> ITMS-90809: Deprecated API Usage - Apple will no longer accept submissions of new apps that use UIWebView as of April 30, 2020 and app updates that use UIWebView as of December 2020. Instead, use WKWebView for improved security and reliability >> Gatorcade- thank you for sharing. Hopefully this can get resolved.
 
aquila198
buzztouch Evangelist
Profile
Posts: 473
Reg: Jul 22, 2011
location unknow...
10,330
like
06/09/20 10:55 AM (3 years ago)
I was going to invest some time into updating an old app; i'm a little apprehensive as i would hate for it to get rejected for this reason. has this happened to anyone else, besides Gatorcade recently?
 
mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
like
06/10/20 06:33 AM (3 years ago)
I noticed that too with my last update a few months ago. Not going to lie, I am more than a little concerned that Cakebit seems to have disappeared from the forums since his flurry of activity 3-4 months ago. But given his excitement and progress in the beginning I hope he is busy behind the scenes getting this sorted. #gocakebit #savebt
 
gatorcade
Code is Art
Profile
Posts: 35
Reg: Jul 17, 2011
Gainesville
1,150
like
06/11/20 08:02 AM (3 years ago)
:)
 
Cakebit
Code is Art
Profile
Posts: 500
Reg: Dec 15, 2010
In your local b...
16,500
like
06/12/20 06:37 AM (3 years ago)
Hi There! Linking the original thread for any follow-up readers: http://www.buzztouch.com/forum/thread.php?tid=F4E1AF35C52CC0D24686112&currentPage=1 ---------------------------------------- Here's the context of the Apple announcement: "If your app still embeds web content using the deprecated UIWebView API, we strongly encourage you to update to WKWebView as soon as possible for improved security and reliability. WKWebView ensures that compromised web content doesn't affect the rest of an app by limiting web processing to the app's web view. And it's supported in iOS and macOS, and by Mac Catalyst. The App Store will no longer accept new apps using UIWebView as of April 2020 and app updates using UIWebView as of December 2020." https://developer.apple.com/news/?id=12232019b ---------------------------------------- Many Buzztouch screens (and many plugins, I'd assume) will need to have changes made to remove the old API and return results using the new WKWebView api. I just rolled out a new beta (v4.0.5 for iOS) that should remove the UIWebView API from the Buzztouch core and BT_Screens- replacing it with WKWebKit. Here's a list of the affected screens: Custom HTML Custom URL Excel Doc HTML Doc PDF Doc PPT Doc Word Doc ---------------------------------------- As I noted on the post, my day job has been heavily impacted by COVID-19, really effecting the hours I'm able to invest in my passion over here... mostly, I don't spend as much time on the forums as I probably ought to. Feel free to reach out by personal message/email- as I'm typically much quicker to see (and respond) to those if there's anything urgent. I'll receive email updates from this thread- so I'll keep an eye on it too. :) Let me know if you run into any issues! There are some major changes in how web content is handled in this update, so I'd love to hear how your app responds to the rework. Thanks everyone!
 
aquila198
buzztouch Evangelist
Profile
Posts: 473
Reg: Jul 22, 2011
location unknow...
10,330
like
06/12/20 08:23 AM (3 years ago)
@Cakebit - what great news to share on a Friday! Thank you so much! REALLy appreciate the attention this has received.
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
09/01/20 04:54 AM (3 years ago)
any news on the android update, my self hosting seams to not be able to package it now :)
 
Gledy
Aspiring developer
Profile
Posts: 107
Reg: Feb 25, 2013
Fleet, UK
3,220
like
02/15/24 11:50 AM (2 months ago)
Hi @Cakebit I just tried to submit a new app I've been working on and got the email from Apple..... "Please correct the following issues and upload a new binary to App Store Connect. ITMS-90809: Deprecated API Usage - New apps that use UIWebView are no longer accepted. Instead, use WKWebView for improved security and reliability." The plugins in Xcode that come up when I search UIWebView are the CR_advanced_search (.h line 42) (.m lines 659, 684, 703) and one mention in html_pro but its commented out (.m line 192) so isn't an issue. Any help would be greatly appreciated.
 
Gledy
Aspiring developer
Profile
Posts: 107
Reg: Feb 25, 2013
Fleet, UK
3,220
like
02/16/24 10:41 AM (2 months ago)
Just an update, I have attempted to update the advanced search to include the newer API. Based on looking what previously had been done, the following has been changed and so far no errors, of course please let me know if you think what I've done to be incorrect. cr_advanced_search.h remove UIWebView from the @interface at the top and add: WKNavigationDelegate, Add to line 58 @property (nonatomic, retain) WKWebView *webView; Add to line 77 -(void)webView:(WKWebView*)webView decidePolicyForNavigationAction:(WKNavigationAction*)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler; ********* cr_advanced_search.m lines 643 - 729 replace with: - (void)textFromCacheDocument:(BT_item *)theScreen { [BT_debugger showIt:self theMessage:@"textFromCacheDocument"]; NSString *dataURL = [BT_strings getJsonPropertyValue:theScreen.jsonVars nameOfProperty:@"dataURL" defaultValue:@""]; NSString *fileNameFromURL = [BT_strings getFileNameFromURL:dataURL]; NSString *fileType = [fileNameFromURL pathExtension]; NSString *BTfileName = [NSString stringWithFormat:@"%@_screenData.%@", theScreen.itemId, fileType]; NSLog(@"BTfileName=%@",BTfileName); NSString *path = [BT_fileManager getFilePath:BTfileName]; NSURL *url = [NSURL fileURLWithPath:path]; NSURLRequest *request = [NSURLRequest requestWithURL:url]; WKWebView *theWebView = [[WKWebView alloc] initWithFrame:CGRectMake(0, 0, 0, 0)]; theWebView.navigationDelegate = self; [self.view addSubview:theWebView]; theWebView.tag = tagCount; [dataFromWebViews setValue:theScreen forKey:[NSString stringWithFormat:@"%i", tagCount]]; tagCount++; [theWebView loadRequest:request]; NSLog(@"loadRequest completed"); [theWebView evaluateJavaScript:@"document.documentElement.textContent" completionHandler:^(id _Nullable document, NSError * _Nullable error) { [BT_debugger showIt:self theMessage:document]; }]; } - (NSString *)textFromDocument:(BT_item *)theScreen { [BT_debugger showIt:self theMessage:@"textFromDocument"]; NSString *path = [BT_fileManager getBundlePath:[BT_strings getJsonPropertyValue:theScreen.jsonVars nameOfProperty:@"localFileName" defaultValue:@""]]; NSURL *url = [NSURL fileURLWithPath:path]; NSURLRequest *request = [NSURLRequest requestWithURL:url]; WKWebView *theWebView = [[WKWebView alloc] initWithFrame:CGRectMake(0, 0, 0, 0)]; theWebView.navigationDelegate = self; [self.view addSubview:theWebView]; theWebView.tag = tagCount; [dataFromWebViews setValue:theScreen forKey:[NSString stringWithFormat:@"%i", tagCount]]; tagCount++; [theWebView loadRequest:request]; NSLog(@"loadRequest completed"); [theWebView evaluateJavaScript:@"document.documentElement.textContent" completionHandler:^(id _Nullable document, NSError * _Nullable error) { [BT_debugger showIt:self theMessage:document]; }]; return nil; // You may want to change the return type and value based on your requirements } - (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation { [BT_debugger showIt:self theMessage:@"webViewDidFinishNavigation"]; BT_item *tmpItem = [dataFromWebViews objectForKey:[NSString stringWithFormat:@"%i", (int)webView.tag]]; [webView evaluateJavaScript:@"document.documentElement.textContent" completionHandler:^(id _Nullable document, NSError * _Nullable error) { NSMutableDictionary *tmpJson = [tmpItem.jsonVars mutableCopy]; [tmpJson setValue:document forKey:@"docData"]; [tmpJson setValue:[tmpItem itemId] forKey:@"loadScreenWithItemId"]; [tmpJson setValue:@"" forKey:@"descriptionText"]; [tmpJson setValue:[tmpItem itemId] forKey:@"loadScreenWithItemId"]; tmpItem.jsonVars = tmpJson; NSString *titleText = [BT_strings getJsonPropertyValue:tmpItem.jsonVars nameOfProperty:@"titleText" defaultValue:@""]; NSLog(@"titleText=%@",titleText); [tmpItem setSortableColumnValue:titleText]; NSLog(@"adding tmpItem =%@", tmpItem.itemId); [self.menuItems addObject:tmpItem]; [myTableView reloadData]; //sort list alphabetically NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"sortableColumnValue" ascending:YES]; NSArray *sortDescriptors = [NSArray arrayWithObject:sortDescriptor]; [self.menuItems sortUsingDescriptors:sortDescriptors]; }]; }
 
Cakebit
Code is Art
Profile
Posts: 500
Reg: Dec 15, 2010
In your local b...
16,500
like
02/17/24 03:05 AM (2 months ago)
Hi Gledy! I'll take a closer look at your code changes shortly, but wanted to link this resource which might help in the meantime. I wrote a patch a while back for the Advanced Search plugin that removes the UIWebView dependancies from it: https://buzztouch.com/files/patches/cr_advanced_search_no_ uiwebview.zip Guess I need to update the plugin officially so everyone gets the release! Note taken. :) Cheers!
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.