martinkasa/capacitor-secure-storage-plugin

ITMS-90809: UIWebView API Deprecation

Closed this issue · 14 comments

Hello,
i'm using your plugin and get the UIWebView API Deprecation when submitting to App Store Connect. I searched my code for the string "UIWebView" and found out that it is referenced in the following file: ios/Pods/CapacitorCordova/ios/CapacitorCordova/CapacitorCordova/Classes/Public/CDVUserAgentUtil.m

Is it possible, that the Warning from Apple occours because of that file?

I also saw that Capacitor made a fix for it, see ionic-team/capacitor@3034885.

Best regards
Jakob

Hello, I did not know that Capacitor version is locked by Podfile.lock. I have updated Capacitor dependecies and published version 0.3.2-testing.

Please install it and let me know if it works as expected. Currently I do not have any time to test it myself.

npm install capacitor-secure-storage-plugin@0.3.2-testing

then

npx cap sync

Thanks

Hello,

I updated the plugin, synced and pushed to Testflight.

Again I received the warning "ITMS-90809: Deprecated API Usage" from Apple.

Best regards
Jakob

@Gr33nW33n I have just tried to upload new build of one of my apps and I did not get any warning. Are you using any other codrova plugin in your app? Try to search for "UIWebView" once more please.

@martinkasa first of all, thank you very much for your awesome work!

I'm also facing this issue:

Dear Developer,

We identified one or more issues with a recent delivery for your app, "AppName" AppVersion (AppBuildNumber). 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 new apps that use UIWebView APIs starting from April 2020. See https://developer.apple.com/documentation/uikit/uiwebview for more information.

After you’ve corrected the issues, you can upload a new binary to App Store Connect.

Best regards,

The App Store Team

The only difference between this version and the previous one was the addition of 0.3.1 version of this plugin.

Can I help you in any way?

Best regards
Joseph Morant Navarro

@mrjmorant please use version 0.3.2-testing and let me know if it helps. I have updated capacitor dependecies there. 0.3.1 uses older ones, that is why you got the error.

@martinkasa I installed 0.3.2-testing and uploaded the app to the App Store Connect.
I just received the same message: ITMS-90809: Deprecated API Usage

@mrjmorant did you run npx cap sync after npm install?

@martinkasa yes, I ran

npm install capacitor-secure-storage-plugin@0.3.2-testing and npx cap sync

These commands only updated the package.json and the package-lock.json. Is this normal?

@mrjmorant Try to check please, if you see here

node_modules/capacitor-secure-storage-plugin/ios/Podfile.lock

Capacitor (1.5.0) or older version?

@martinkasa yes, Capacitor (1.5.0) is present:

PODS:

  • Capacitor (1.5.0):
    • CapacitorCordova (= 1.5.0)
  • CapacitorCordova (1.5.0)
  • SwiftKeychainWrapper (3.4.0)

DEPENDENCIES:

  • "Capacitor (from ../node_modules/@capacitor/ios)"
  • SwiftKeychainWrapper

SPEC REPOS:
trunk:
- CapacitorCordova
- SwiftKeychainWrapper

EXTERNAL SOURCES:
Capacitor:
:path: "../node_modules/@capacitor/ios"

COCOAPODS: 1.9.0

(CHECKSUMS deleted)

@martinkasa any updates?

Hi @mrjmorant , as I said before, I use this plugin in multiple apps and I do not get any warnings. Try to check or find where exactly is that reference to UIWebView

Is Cordova still defaulting to using UIWebView? https://cordova.apache.org/news/2018/08/01/future-cordova-ios-webview.html

If so these could be your two options, but switching to WKWebView comes with its own caveats described in the above link.

Option 1: Ionic Webview Plugin

# from /src-cordova
$ cordova plugin add cordova-plugin-ionic-webview

Add ScrollEnabled Preference to Config.xml

<platform name="ios">
  <preference name="ScrollEnabled" value="true" />
</platform>

Consult Ionic Docs for caveats on WkWebViewPlugin
https://beta.ionicframework.com/docs/building/webview
https://github.com/ionic-team/cordova-plugin-ionic-webview

Option 2: Cordova WkWebviewEngine Plugin

Install Cordova WkWebviewEngine Plugin

# from /src-cordova
$ cordova plugin add cordova-plugin-wkwebview-engine

For caveats and more info, visit: https://github.com/apache/cordova-plugin-wkwebview-engine

I do release regularly my app with this plugin and I do not get any warning. Maybe you have some other plugin installed, or an older version of this plugin. Closing this issue... if you this you still have this issue, please reopen with more details.