Skip to content

Commit

Permalink
Support down to iOS13 (#6)
Browse files Browse the repository at this point in the history
* Update Package.swift
* Update QuilttConnectorWebview.swift

---------

Co-authored-by: Muhammad Aqeel <[email protected]>
  • Loading branch information
tom-quiltt and aqeel371 authored Jan 10, 2024
1 parent 3e0796a commit 2777a0c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import PackageDescription
let package = Package(
name: "QuilttConnector",
platforms: [
.iOS(.v15)
.iOS(.v13)
],
products: [
// Products define the executables and libraries a package produces, making them visible to other packages.
Expand Down
6 changes: 5 additions & 1 deletion Sources/QuilttConnector/QuilttConnectorWebview.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ class QuilttConnectorWebview: WKWebView, WKNavigationDelegate {
public init() {
let webConfiguration = WKWebViewConfiguration()
super.init(frame: .zero, configuration: webConfiguration)
self.configuration.defaultWebpagePreferences.allowsContentJavaScript = true
if #available(iOS 14.0, *) {
self.configuration.defaultWebpagePreferences.allowsContentJavaScript = true
} else {
self.configuration.preferences.javaScriptEnabled = true
}
self.scrollView.isScrollEnabled = true
self.isMultipleTouchEnabled = false
/** Enable isInspectable to debug webview */
Expand Down

0 comments on commit 2777a0c

Please sign in to comment.