reduce min swift version, cleanup last two warnings, add license

This commit is contained in:
2025-11-02 10:01:08 +01:00
parent f09a522156
commit 851ab88f85
3 changed files with 68 additions and 34 deletions

View File

@@ -1,21 +1,65 @@
MIT License
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (c) 2025 DevsForge ( undeaDD )
Copyright (C) 2025 DevsForge ( undeaDD )
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
---
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
### Preamble
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
The GNU General Public License is a free, copyleft license for software and other kinds of works.
The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program—to make sure it remains free software for all its users.
You can copy, distribute, and modify this software under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but **WITHOUT ANY WARRANTY**; without even the implied warranty of
**MERCHANTABILITY** or **FITNESS FOR A PARTICULAR PURPOSE**. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
---
### Terms and Conditions
1. **Source Code**
You must make the source code available under this same license when distributing copies or derivative works.
2. **Modifications**
You may modify your copy or copies of the Program or any portion of it, and distribute such modifications under the terms of this License, provided that you also meet all of these conditions:
- You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.
- You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy.
3. **Conveying Non-Source Forms**
You may distribute the Program in object code or executable form under the terms of Sections 4 and 5 of the GPL.
4. **No Warranty**
There is no warranty for the program, to the extent permitted by applicable law.
---
### How to Apply These Terms to Your New Programs
If you develop a new program and want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program.
It is safest to attach them to the start of each source file to convey the exclusion of warranty:
---
FakeWebKit — tvOS WKWebView wrapper / drop-in replacement
Copyright (C) 2025 DevsForge ( undeaDD )
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
---
See <https://www.gnu.org/licenses/gpl-3.0.html> for the full license text.

View File

@@ -1,6 +1,4 @@
// swift-tools-version: 6.2
// The swift-tools-version declares the minimum version of Swift required to build this package.
// swift-tools-version: 5.9
// Package: FakeWebKit
// Author: undeaDD
// Repository: https://github.com/undeaDD/FakeWebKit

View File

@@ -424,13 +424,9 @@ fileprivate class _DelegateProxy: NSObject {
return
}
do {
owner._updateJSBridgeBindings()
let count = owner._injectUserScripts(at: .atDocumentStart)
WKWebView.logger?.log("Injected \(count) user scripts at document start")
} catch let error {
WKWebView.logger?.logError("Failed injecting scripts at document start: \(error)")
}
owner._updateJSBridgeBindings()
let count = owner._injectUserScripts(at: .atDocumentStart)
WKWebView.logger?.log("Injected \(count) user scripts at document start")
owner.navigationDelegate?.webView(owner, didStartProvisionalNavigation: WKNavigation())
}
@@ -443,13 +439,9 @@ fileprivate class _DelegateProxy: NSObject {
return
}
do {
owner._updateJSBridgeBindings()
let count = owner._injectUserScripts(at: .atDocumentEnd)
WKWebView.logger?.log("Injected \(count) user scripts at document end")
} catch let error {
WKWebView.logger?.logError("Failed injecting scripts at document end: \(error)")
}
owner._updateJSBridgeBindings()
let count = owner._injectUserScripts(at: .atDocumentEnd)
WKWebView.logger?.log("Injected \(count) user scripts at document end")
owner.navigationDelegate?.webView(owner, didFinish: WKNavigation())
}