apache / cordova-ios

Apache Cordova iOS
https://cordova.apache.org/
Apache License 2.0
2.16k stars 989 forks source link

ITMS-90809: Deprecated API Usage - New apps that use UIWebView are no longer accepted. Instead, use WKWebView for improved security and reliability #930

Closed blgsyrmhnds closed 4 years ago

blgsyrmhnds commented 4 years ago

Bug Report Problem We have updated the Cordova iOS library to the latest version in package.json ("cordova": "^9.0.0") and the tag

<preference name="WKWebViewOnly" value="true"/>
    <preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine"/>
    <feature name="CDVWKWebViewEngine">
      <param name="ios-package" value="CDVWKWebViewEngine"/>
    </feature>

was added to the config.xml.

and then do iOS Release Build and it genarate .ipa file for upload to apple store but when I upload it to apple store it give that error

**I use phonegal build but today i get this error when upload .ipa to apple store

ITMS-90809: Deprecated API Usage - New apps that use UIWebView are no longer accepted. Instead, use WKWebView for improved security and reliability**

I removed all cordova plugins but in monaca build log I see both wkwebview and UIWebview ,how can I remove all UIWebview references.I don't know where UIWebiew generate,I don't use any cordova plugins

In app settings i set WebView Engine to WKWebView

I asked it in community page but no answear yet:https://community.onsen.io/topic/4076/itms-90809-deprecated-api-usage-new-apps-that-use-uiwebview-are-no-longer-accepted-instead-use-wkwebview-for-improved-security-and-reliability

and here is my app url: https://console.monaca.mobi/build/5ef8c3eee78885923d22db61/ios-build

here is my config.xml

<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="http://www.w3.org/ns/widgets" id="com.demircode.bileteviniz" version="1.3.1">
  <name>BiletEviniz</name>
  <description>BiletEviniz</description>
  <author/>
  <content src="index.html"/>
  <allow-navigation href="*"/>
  <allow-intent href="itms:*"/>
  <allow-intent href="itms-apps:*"/>
  <preference name="Orientation" value="default"/>
  <preference name="loglevel" value="DEBUG"/>
  <preference name="AndroidLaunchMode" value="singleTop"/>
  <preference name="ErrorUrl" value=""/>
  <preference name="Fullscreen" value="false"/>
  <preference name="KeepRunning" value="true"/>
  <preference name="SplashScreen" value="screen"/>
  <preference name="SplashScreenDelay" value="1000"/>
  <preference name="AllowInlineMediaPlayback" value="false"/>
  <preference name="BackupWebStorage" value="cloud"/>
  <preference name="FadeSplashScreenDuration" value="250"/>
  <preference name="KeyboardDisplayRequiresUserAction" value="true"/>
  <preference name="MediaPlaybackRequiresUserAction" value="false"/>
  <preference name="SuppressesIncrementalRendering" value="false"/>
  <preference name="TopActivityIndicator" value="gray"/>
  <preference name="GapBetweenPages" value="0"/>
  <preference name="PageLength" value="0"/>
  <preference name="PaginationBreakingMode" value="page"/>
  <preference name="PaginationMode" value="unpaginated"/>
  <feature name="LocalStorage">
    <param name="ios-package" value="CDVLocalStorage"/>
  </feature>

  <preference name="monaca:AndroidIsPackageNameSeparate" value="false"/>
  <platform name="ios">
    <preference name="orientation" value="portrait"/>
    <icon src="lobbe.png"/>
    <icon platform="ios" height="76" src="lobbe-76-76.png" width="76"/>
    <icon platform="ios" height="120" src="lobbe-120-120.png" width="120"/>
    <icon platform="ios" height="152" src="lobbe-152-152.png" width="152"/>
    <icon platform="ios" height="1024" src="lobbe-1024-1024.png" width="1024"/>
    <icon platform="ios" height="40" src="lobbe-40-40.png" width="40"/>
    <icon platform="ios" height="167" src="lobbe-167-167.png" width="167"/>
    <splash src="/res/ios/screen/Default@2x~universal~anyany.png"/>
    <preference name="WKWebViewOnly" value="true"/>
    <preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine"/>
    <feature name="CDVWKWebViewEngine">
      <param name="ios-package" value="CDVWKWebViewEngine"/>
    </feature>
    <config-file platform="ios" parent="CFBundleLocalizations" target="*-Info.plist">
      <array>
        <string>tr</string>
        <string>en</string>
      </array>
    </config-file>
  </platform>
  <preference name="WindowsStorePublisherName" value="My Name"/>
  <preference name="WindowsStoreIdentityName" value="3e46a957-1e6e-2eb6-9380-b3b37c4dec02"/>
  <preference name="ios-XCBuildConfiguration-TARGETED_DEVICE_FAMILY" value="1,2"/>
  <preference name="AutoHideSplashScreen" value="true"/>
  <preference name="FadeSplashScreen" value="true"/>
  <preference name="ShowSplashScreenSpinner" value="false"/>
  <access origin="bileteviniz.com"/>
  <preference name="DisallowOverscroll" value="true"/>
  <preference name="EnableViewportScale" value="false"/>
</widget>

and here is my package.json

{
    "name": "onsenui-video-streaming-app-template",
    "version": "2.0.8",
    "displayName": "OnsenUI Video Streaming Demo",
    "cordova": {
        "plugins": {
            "cordova-custom-config": {},
            "monaca-plugin-monaca-core": {},
            "cordova-plugin-whitelist": {},
            "cordova-plugin-splashscreen": {},
            "cordova-plugin-wkwebview-engine": {}
        }
    },
    "dependencies": {
        "cordova-custom-config": "5.1.0",
        "cordova-plugin-splashscreen": "5.0.2",
        "cordova-plugin-whitelist": "1.3.3",
        "monaca-plugin-monaca-core": "3.3.0",
        "cordova-plugin-wkwebview-engine": "1.2.1"
    },
    "scripts": {
        "monaca:preview": "npm run dev",
        "dev": "browser-sync start -s www/ --watch --port 8080 --ui-port 8081"
    },
    "devDependencies": {
        "browser-sync": "^2.26.7",
        "cordova": "^9.0.0"
    }
}
brodycj commented 4 years ago

Please use cordova-ios@6 (now at 6.1.0), it has completely dropped UIWebView. The cordova-plugin-wkwebview-engine should no longer be needed.

And please check all plugins that they do not use UIWebView.

blgsyrmhnds commented 4 years ago

Hi thank you for answer

In monaca IOS build settings there are only IOS 5.0.1 and 5.1.1 option

IOS6

should I add it to config.xml ? if yes what is that attribute can you give me please thanks

brodycj commented 4 years ago

In monaca IOS build settings there are only IOS 5.0.1 and 5.1.1 option

The Monica tool is not supported by the Apache Cordova organization. Please ask them to support cordova-ios@6.

blgsyrmhnds commented 4 years ago

and build.phonegap.com does not support this I tried all free or paid services such as monaca but did not succeed

are there any online cloud solutions for this ?

breautek commented 4 years ago

5.1.1 supports a WKWebView only flag. I'd assume this would work with Monoca.

As for other cloud solutions, I'm not 100% sure. But this isn't a Cordova issue. I'd advise asking for monoca for their roadmap for support.

You can also look into building the apps locally.

brodycj commented 4 years ago

https://ionicframework.com/appflow - seems to do this for both Cordova and Capacitor

You may want to consider switching over to Capacitor, if they do not support cordova-ios@6. It is documented how to switch from Cordova to Capacitor.

erisu commented 4 years ago

@blgsyrmhnds in your ticket description, you mentioned having and using the WKWebViewOnly preference flag in config.xml.

As @breautek pointed out, Cordova iOS 5.1.1 supports the WKWebViewOnly preference flag.

Your screenshot shows that your Monaca project is configured to use Cordova iOS 5.0.1 which is old and does not support this flag. On the same "Build Environment Settings" tab, shown in the screenshot, please select Cordova iOS 5.1.1 and try again.

Please request with Monaca to support Cordova iOS 6.1.0+, but in the meantime with Monaca you can use Cordova iOS 5.1.1 & the WKWebViewOnly preference flag option to resolve the ITMS-90809.