Closed lynntangyuan closed 3 years ago
If you need iOS 10 support then stay on cordova-ios@5
You'll need to use cordova-ios@5.1.1
with a WKWebView plugin and the WKWebViewOnly
preference enabled to be WKWebView
compliant.
Or, Could you please point out the code that IOS 10 doesn't support in Cordova6.1.0, and I can modify it myself.
The reason cordova-ios@6
requires iOS 11+ is because of the scheme handler stuff. I'm not familiar with the codebase so I can't point to exactly where this is located, but the apple docs for this is located here. You should be able to search and find usages within the cordova-ios
codebase easily enough.
This was added to support schemes, which solves many CORS related issues that appeared on the WKWebView
loading files from the local filesystem.
As far as I know, this is the only thing that was added that requires cordova-ios@6
but if you strip that out and try to build, I'm sure XCode will tell you if there are anything else that requires iOS 11 if you try to build with deployment target with iOS 10.
@breautek Thanks for your reply. I Found out the usage of WKUrlSchemeHandler, However, When I tried to strip that out , and update the minimum deployment target to iOS11.0, It pointed out that Cordova6.1.1 required a higher minimum deployment target and resulted in an error. It must be the Rigid requirements of Cordova6.1.1 in Cocoapods, is there any way for me to skip this error?
There are a few places that defines the deployment target.
platforms/ios/Podfile
, but this should be updated based on cordova prepare
and setting.platforms/ios/cordova/lib/Podfile.js
platforms/ios/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
there are a few locations in this file.platforms/ios/<PROJECT_NAME>.xcodeproj/project.pbxproj
there is also a few locations in this file.As @breautek mentioned, it might be easier to use Cordova-iOS 5.x as it supports iOS 10.
cordova-ios@5.1.1
instead of 6.x
cordova-plugin-wkwebview-engine@1.2.1
for the WKWebView engine.WKWebViewOnly
in config.xml
@erisu Depending on the policy published by Apple, In few months, Apple will force that The keyword "UIWebview" does not exist in the code of App. However, Despite setting "WKWebviewOnly", The keyword "UIWebview" still exists in Cordova-ios@5.1.1.
Cordova-iOS 6.0.0 also uses Named Colours for CDVViewController and the LaunchStoryboard, which require iOS 11.
Using Cordova-iOS 5.1.1 with WKWebViewOnly
ensures there are no references to UIWebView and should not run into any problems with Apple.
Bug Report
Problem
Cordova6.1.0 doesn't support iOS10. However, users who use ios10 also account for a certain proportion, So How can I not only use Cordova6.1.0, but also support IOS 10.
Or, Could you please point out the code that IOS 10 doesn't support in Cordova6.1.0, and I can modify it myself.
What is expected to happen?
Corodva6.1.0 supports iOS10.
What does actually happen?
The document of Cordova6.1.0 states that Cordova6.1.0 only supports iOS11 and above.
Information
Command or Code
platform :ios, '11.0'
Environment, Platform, Device
Cordova-ios
Xcode 12.0
MacOS Catalina
iOS 10.0 +
Version information
Checklist