diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 98166e2..f5ef077 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -86,7 +86,7 @@ jobs:
- name: Calculate SHA256 Checksum
if: startsWith(matrix.job.target,'ios')
run: |
- sha256sum hiddify-libcore-ios.xcframework.zip > hiddify-libcore-ios.xcframework.zip.sha256
+ sha256sum hiddify-libcore-ios.xcframework.zip | awk '{print $1}'> hiddify-libcore-ios.xcframework.zip.sha256
working-directory: bin
- uses: actions/upload-artifact@v3
if: ${{ success() }}
diff --git a/.swiftpm/xcode/package.xcworkspace/xcuserdata/amirsaam.xcuserdatad/UserInterfaceState.xcuserstate b/.swiftpm/xcode/package.xcworkspace/xcuserdata/amirsaam.xcuserdatad/UserInterfaceState.xcuserstate
index cbda1ad..8b6aa20 100644
Binary files a/.swiftpm/xcode/package.xcworkspace/xcuserdata/amirsaam.xcuserdatad/UserInterfaceState.xcuserstate and b/.swiftpm/xcode/package.xcworkspace/xcuserdata/amirsaam.xcuserdatad/UserInterfaceState.xcuserstate differ
diff --git a/.swiftpm/xcode/xcuserdata/amirsaam.xcuserdatad/xcschemes/xcschememanagement.plist b/.swiftpm/xcode/xcuserdata/amirsaam.xcuserdatad/xcschemes/xcschememanagement.plist
index f9ad2a0..717b296 100644
--- a/.swiftpm/xcode/xcuserdata/amirsaam.xcuserdatad/xcschemes/xcschememanagement.plist
+++ b/.swiftpm/xcode/xcuserdata/amirsaam.xcuserdatad/xcschemes/xcschememanagement.plist
@@ -12,11 +12,16 @@
hiddify-next-core-Package.xcscheme_^#shared#^_
orderHint
- 0
+ 1
SuppressBuildableAutocreation
+ Libcore
+
+ primary
+
+
hiddify-next-core
primary
diff --git a/Package.swift b/Package.swift
index cbd1e72..947c051 100644
--- a/Package.swift
+++ b/Package.swift
@@ -2,46 +2,30 @@
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
-
-func fetchChecksum(from url: String) throws -> String {
- guard let checksumURL = URL(string: url) else {
- throw NSError(domain: "Invalid URL", code: 0, userInfo: nil)
- }
-
- let checksumString = try String(contentsOf: checksumURL)
- return checksumString.trimmingCharacters(in: .whitespacesAndNewlines)
-}
+import Foundation
let version = "draft"
let baseURL = "https://github.com/hiddify/hiddify-next-core/releases/download/"
-let packageURL = "\(baseURL)\(version)/hiddify-libcore-ios.xcframework.zip"
-let checksumURL = "\(packageURL).sha256"
+let packageURL = baseURL + version + "/hiddify-libcore-ios.xcframework.zip"
-do {
- let package = Package(
- name: "Libcore",
- platforms: [
- .iOS(.v13) // Minimum platform version
- ],
- products: [
- .library(
- name: "Libcore",
- targets: ["Libcore"]),
- ],
- dependencies: [
- // No dependencies
- ],
- targets: [
- .binaryTarget(
- name: "Libcore",
- url: packageURL,
- checksum: try fetchChecksum(from: checksumURL)
- )
- ]
- )
-} catch {
- // Handle URL or checksum fetch errors
- print("Error: \(error)")
- // You might want to exit or handle the error in a way suitable for your application
- // exit(1)
-}
+let package = Package(
+ name: "Libcore",
+ platforms: [
+ .iOS(.v13) // Minimum platform version
+ ],
+ products: [
+ .library(
+ name: "Libcore",
+ targets: ["Libcore"]),
+ ],
+ dependencies: [
+ // No dependencies
+ ],
+ targets: [
+ .binaryTarget(
+ name: "Libcore",
+ url: packageURL,
+ checksum: "e42d176d32198bc33ae4f8aafa24814934bbc93cbc8747aa8a0353e8341dc3ff"
+ )
+ ]
+ )