capacitor icon indicating copy to clipboard operation
capacitor copied to clipboard

Apple will stop accepting apps using deprecated UIWebView api

Open WIStudent opened this issue 7 years ago • 21 comments

Description of the problem: I just received a mail from Apple notifing me that they will stop accepting apps using the deprecated UIWebView api.

Dear Developer, We identified one or more issues with a recent delivery for your app, [redacted]. 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 https://developer.apple.com/documentation/uikit/uiwebview for more information.

After you’ve corrected the issues, you can use Xcode or Application Loader to upload a new binary to App Store Connect.

Best regards,

The App Store Team

Right now we are pushing our app only to TestFlight and not yet to the public app store, so I can't tell if this rule is already being enforced for submissions to the app store (despite the warning the app was still accepted by TestFlight), but this is definitely a sign that the UIWebView should be replaced with a WKWebView in capacitor as soon as possible.

Affected platform

  • [ ] Android
  • [x] iOS
  • [ ] electron
  • [ ] web

Capacitor version: 1.1.1

WIStudent avatar Aug 29 '19 08:08 WIStudent

Capacitor only uses WKWebView, it has a few UIWebView references but those are on the Cordova compatibility classes.

jcesarmobile avatar Aug 29 '19 10:08 jcesarmobile

I am also seeing this warning. I am only using Capacitor's "core plugins" / API.

Livijn avatar Aug 29 '19 18:08 Livijn

Is there any solution to fix this issue?

JoshuvaGeorge03 avatar Aug 30 '19 05:08 JoshuvaGeorge03

This issue should not be closed. I'm using just capacitor without any Cordova plugins (or core native). This is what I got from apple:

Apple will stop accepting submissions of apps that use UIWebView - even if it is just reference. See https://developer.apple.com/documentation/uikit/uiwebview for more information

vhinic avatar Aug 30 '19 08:08 vhinic

Do you see the issue closed? It’s open until we remove the few UIWebView references from the cordova compatibility classes have and we will do a release after that, probably next week.

jcesarmobile avatar Aug 30 '19 10:08 jcesarmobile

I have the same error uploading to iOS TestFight my app, building with Ionic 3/Cordova.

I don't using UIWebView. Just WebView depencency on my config.xml Ionic project:

<plugin name="cordova-plugin-whitelist" spec="1.3.3" />
<plugin name="cordova-plugin-statusbar" spec="2.4.2" />
<plugin name="cordova-plugin-device" spec="2.0.2" />
<plugin name="cordova-plugin-splashscreen" spec="5.0.2" />
<plugin name="cordova-plugin-ionic-webview" spec="^4.0.0" />
<plugin name="cordova-plugin-ionic-keyboard" spec="^2.0.5" />
<plugin name="cordova-plugin-network-information" spec="2.0.2" />
<plugin name="cordova-open-native-settings" spec="1.5.2" />
<plugin name="cordova-plugin-geolocation" spec="4.0.2" />
<plugin name="cordova-sqlite-storage" spec="3.2.1" />
<plugin name="cordova-plugin-camera" spec="4.1.0" />
<plugin name="cordova-plugin-file-transfer" spec="1.7.1" />
<engine name="ios" spec="4.5.5" />

Any solution?

Thanks.

derman10 avatar Aug 30 '19 13:08 derman10

@jcesarmobile my apology, I saw #1915 closed and came to the wrong conclusion that this issue is closed. Probable release next week is fantastic news.

vhinic avatar Aug 30 '19 14:08 vhinic

Hello, the warning from Apple is still showing, so I did a search in my project and show this:

https://phoenix-connection.slack.com/files/UD4JPTBCM/FR5K8GG04/captura_de_pantalla_2019-12-02_a_las_15.28.49.png

https://phoenix-connection.slack.com/files/UD4JPTBCM/FR7UJS0F9/captura_de_pantalla_2019-12-02_a_las_15.29.05.png

voleylol avatar Dec 02 '19 15:12 voleylol

Hey folks, just in case anyone hadn't seen this yet. Looks like Apple finally set a drop-dead on UIWebView. https://developer.apple.com/news/?id=12232019b

roundlakedan avatar Jan 15 '20 15:01 roundlakedan

This is still an issue with 1.4.0 Searching through the Fastlane code, there's still references to UIWebView. I still get this email even though my app itself is not using any plugins or UIWebView.

steel avatar Jan 16 '20 18:01 steel

I've switched from Cordova to Capacitor. Had been successful in compiling and loading app on iPhone but have not gone as far as doing pre-flight. Has the UIWebView issue been fixed for Capacitor?

FrancisTse8 avatar Jan 17 '20 03:01 FrancisTse8

I am using Capacitor Core (@capacitor/[email protected]) and I'm still seeing references to UIWebView here:

image

Please advise. Your guide here (https://ionicframework.com/blog/understanding-itms-90809-uiwebview-api-deprecation/) says it is fixed in the latest version of capacitor, but I'm using the latest version of Capacitor.

socalrunner avatar Jan 27 '20 16:01 socalrunner

@socalrunner I am in the same boat. I suspect it's loading this because I am using existing Cordova plugins. I haven't tried completely removing those Cordova plugins to see if these pods are removed from the build.

That said, what is the timeline to get these upgraded? Or is that a Cordova issue?

steel avatar Jan 31 '20 18:01 steel

Hi all - I can confirm that Capacitor works just fine (I retested 1.4.0 today, uploading an app to Apple). Yes, those references are in that pod but they don't trigger the warning. If you're still seeing it, it's a Cordova plugin that has UIWebview references.

Cordova plugins will have to be updated by their maintainer.

dotNetkow avatar Jan 31 '20 22:01 dotNetkow

I am trying since days but none of single suggestion is working for me I tried even with empty project

package.json file

"dependencies": { "@angular/common": "~9.1.6", "@angular/core": "~9.1.6", "@angular/forms": "~9.1.6", "@angular/platform-browser": "~9.1.6", "@angular/platform-browser-dynamic": "~9.1.6", "@angular/router": "~9.1.6", "@capacitor/android": "^2.2.0", "@capacitor/core": "2.2.0", "@ionic-native/core": "^5.0.7", "@ionic-native/paypal": "^5.26.0", "@ionic-native/splash-screen": "^5.0.0", "@ionic-native/status-bar": "^5.0.0", "@ionic/angular": "^5.0.0", "card.io.cordova.mobilesdk": "^2.1.0", "com.paypal.cordova.mobilesdk": "^3.5.0", "rxjs": "~6.5.1", "tslib": "^1.10.0", "zone.js": "~0.10.2" }, "devDependencies": { "@angular-devkit/build-angular": "~0.901.5", "@angular/cli": "~9.1.5", "@angular/compiler": "~9.1.6", "@angular/compiler-cli": "~9.1.6", "@angular/language-service": "~9.1.6", "@capacitor/cli": "2.2.0", "@ionic/angular-toolkit": "^2.1.1", "@types/jasmine": "~3.5.0", "@types/jasminewd2": "~2.0.3", "@types/node": "^12.11.1", "codelyzer": "^5.1.2", "jasmine-core": "~3.5.0", "jasmine-spec-reporter": "~4.2.1", "karma": "~5.0.0", "karma-chrome-launcher": "~3.1.0", "karma-coverage-istanbul-reporter": "~2.1.0", "karma-jasmine": "~3.0.1", "karma-jasmine-html-reporter": "^1.4.2", "protractor": "~5.4.3", "ts-node": "~8.3.0", "tslint": "~6.1.0", "typescript": "~3.8.3" },

but I am not able to solve it this error UIWebView are no longer accepted. Instead, use WKWebView

please help It becoming harder for me.

rathorrajnesh avatar Jul 25 '20 12:07 rathorrajnesh

it's paypal plugin, paypal SDK is deprecated and uses UIWebView

jcesarmobile avatar Jul 27 '20 11:07 jcesarmobile

Impact: hight (iOS)

Hi everyone,

The issue is still remaining I have come across this issue yesterday, and it's in the core of the capacitor not in Cordova classes I can't even build the app for iOS xCode won't let me.

Do we have already solution for this issue? Or we have to tweak our code or just move to native react or native js?

adelynx avatar Feb 26 '21 11:02 adelynx

No, it's not, it has been proven dozens of times, it's always some plugin. It was fixed on @capacitor/ios 1.2.0

jcesarmobile avatar Feb 26 '21 13:02 jcesarmobile

No, it's not, it has been proven dozens of times, it's always some plugin. It was fixed on @capacitor/ios 1.2.0

Just, did update of the @capacitor/ios and it seems got fixed, and new issue appear in CDVViewController.m the error: Method definition for 'getCommandInstance:' not found

I can build the app now but not properly

adelynx avatar Feb 26 '21 13:02 adelynx

any solution?