Today however, I’m focused on the deprecation of UIWebview by Apple. Any reference to it will cause an app rejection in a few months. The fix is what I noted above however I can’t make it work in Wappler.
There are several threads out there about ionic and Cordova changes in order to respond to the change by Apple.
I then submitted a test app and received this email...
Dear Developer,
We identified one or more issues with a recent delivery for your app, "Foodist" 0.0.1 (0.0.1). Your delivery was successful, but you may wish to correct the following issues in your next delivery:
ITMS-90809: Deprecated API Usage - Apple will stop accepting submissions of apps that use UIWebView APIs . See UIWebView | Apple Developer Documentation for more information.
After you’ve corrected the issues, you can upload a new binary to App Store Connect.
I added the following to my apache config to deal with CORS. One specific problem was with the CORS preflight check–without dealing with that, myu api was executing twice. With this config, apache just returns a 204 instead of passing to api. Note this is open to all hosts now for testing, but will lock down later.
# Required configuration for iOS WkWEBVIEW
# Allow any location to access this service
Header always set Access-Control-Allow-Origin "*"
# Allow the following headers in requests (X-Auth is a custom header, also allow Content-Type to be specified)
Header always set Access-Control-Allow-Headers "X-Auth, content-type, origin"
Header always set Access-Control-Expose-Headers "X-Auth"
# Allow the following methods to be used
Header always set Access-Control-Allow-Methods "GET, POST, OPTIONS"
# WkWebView sends OPTIONS requests to get CORS details. Don't tie up the API service with them;
# just answer them via apache itself
RewriteEngine On
RewriteCond %{REQUEST_METHOD} =OPTIONS
RewriteRule .* - [R=204,END]
Add the following to the config.xml somehwere inside the widget element.