From f31674a60aa635eafb3fa10891e482bdd789c530 Mon Sep 17 00:00:00 2001 From: zici <1940699+zizicici@users.noreply.github.com> Date: Thu, 1 Jun 2023 09:51:27 +0800 Subject: [PATCH 1/8] Update Package.swift --- Package.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Package.swift b/Package.swift index 11558a4..fd30a69 100644 --- a/Package.swift +++ b/Package.swift @@ -3,6 +3,8 @@ // Copyright © 2022 Kam Dracc. All rights reserved. // MIT License @ end of file. +// swift-tools-version:5.8 + import PackageDescription let package = Package( From 289a9aa218a52310a2e5dd2d1ce3a8e9b5d22726 Mon Sep 17 00:00:00 2001 From: zici <1940699+zizicici@users.noreply.github.com> Date: Thu, 1 Jun 2023 09:53:28 +0800 Subject: [PATCH 2/8] Update Package.swift --- Package.swift | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Package.swift b/Package.swift index fd30a69..e7bfa1d 100644 --- a/Package.swift +++ b/Package.swift @@ -1,9 +1,4 @@ -// Package.swift - -// Copyright © 2022 Kam Dracc. All rights reserved. -// MIT License @ end of file. - -// swift-tools-version:5.8 +// swift-tools-version:5.7 import PackageDescription From 045e6744851a5ed41de8309f722b31da3ec77288 Mon Sep 17 00:00:00 2001 From: zici <1940699+zizicici@users.noreply.github.com> Date: Thu, 1 Jun 2023 09:59:00 +0800 Subject: [PATCH 3/8] Update version --- MoonTool.xcodeproj/project.pbxproj | 14 ++++++++++++-- Package.swift | 4 +--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/MoonTool.xcodeproj/project.pbxproj b/MoonTool.xcodeproj/project.pbxproj index 61767a4..5ae7cea 100644 --- a/MoonTool.xcodeproj/project.pbxproj +++ b/MoonTool.xcodeproj/project.pbxproj @@ -406,16 +406,21 @@ FRAMEWORK_VERSION = A; INFOPLIST_FILE = "$(SRCROOT)/Resources/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/../Frameworks", "@loader_path/Frameworks", ); - MACOSX_DEPLOYMENT_TARGET = 10.9; + MACOSX_DEPLOYMENT_TARGET = 12.0; PRODUCT_BUNDLE_IDENTIFIER = com.Socii.MoonTool; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 1; }; name = Debug; }; @@ -433,16 +438,21 @@ FRAMEWORK_VERSION = A; INFOPLIST_FILE = "$(SRCROOT)/Resources/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/../Frameworks", "@loader_path/Frameworks", ); - MACOSX_DEPLOYMENT_TARGET = 10.9; + MACOSX_DEPLOYMENT_TARGET = 12.0; PRODUCT_BUNDLE_IDENTIFIER = com.Socii.MoonTool; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 1; }; name = Release; }; diff --git a/Package.swift b/Package.swift index e7bfa1d..a8ffb4c 100644 --- a/Package.swift +++ b/Package.swift @@ -5,9 +5,7 @@ import PackageDescription let package = Package( name: "MoonTool", platforms: [ - .iOS(.v10), - .macOS(.v10_11), - .tvOS(.v10) + .iOS(.v15) ], products: [ .library(name: "MoonTool", targets: ["MoonTool"]), From fa89a64f6c6375fac4ce940b7616e73cbaeed0f1 Mon Sep 17 00:00:00 2001 From: zici <1940699+zizicici@users.noreply.github.com> Date: Thu, 1 Jun 2023 10:08:55 +0800 Subject: [PATCH 4/8] Update Package.swift --- Package.swift | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Package.swift b/Package.swift index a8ffb4c..06e2e88 100644 --- a/Package.swift +++ b/Package.swift @@ -8,13 +8,15 @@ let package = Package( .iOS(.v15) ], products: [ - .library(name: "MoonTool", targets: ["MoonTool"]), + .library( + name: "MoonTool", + targets: ["MoonTool"] + ) ], - targets: [ - .target(name: "SnapKit", path: "Sources"), + dependencies: [ ], - swiftLanguageVersions: [ - .v5 + targets: [ + .target(name: "MoonTool", path: "Sources"), ] ) From 44b9e63cdbc8de763e738b4932a1187f528639a6 Mon Sep 17 00:00:00 2001 From: zici <1940699+zizicici@users.noreply.github.com> Date: Thu, 1 Jun 2023 10:10:11 +0800 Subject: [PATCH 5/8] Update Moon+Phase.swift --- Sources/Moon/Moon+Phase.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Moon/Moon+Phase.swift b/Sources/Moon/Moon+Phase.swift index df1a7c9..5ecf3f0 100644 --- a/Sources/Moon/Moon+Phase.swift +++ b/Sources/Moon/Moon+Phase.swift @@ -193,7 +193,7 @@ extension Moon.Phase { case 0.00..<0.25: return .waxingCrescent case 0.25..<0.50: return .waxingGibbous case 0.50..<0.75: return .waningGibbous - case 0.75..<1.00: return .waxingGibbous + case 0.75..<1.00: return .waningCrescent default: preconditionFailure("Phase must be in the range 0..<1") } } From 07dfe9fd3055e6ca7a0960b3a73102e35d0de523 Mon Sep 17 00:00:00 2001 From: zici <1940699+zizicici@users.noreply.github.com> Date: Thu, 1 Jun 2023 10:12:46 +0800 Subject: [PATCH 6/8] Update Package.swift --- MoonTool.xcodeproj/project.pbxproj | 22 ++++++++++++---------- Package.swift | 4 +++- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/MoonTool.xcodeproj/project.pbxproj b/MoonTool.xcodeproj/project.pbxproj index 5ae7cea..f21dac8 100644 --- a/MoonTool.xcodeproj/project.pbxproj +++ b/MoonTool.xcodeproj/project.pbxproj @@ -406,21 +406,22 @@ FRAMEWORK_VERSION = A; INFOPLIST_FILE = "$(SRCROOT)/Resources/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/../Frameworks", "@loader_path/Frameworks", ); - MACOSX_DEPLOYMENT_TARGET = 12.0; + MACOSX_DEPLOYMENT_TARGET = 11.0; PRODUCT_BUNDLE_IDENTIFIER = com.Socii.MoonTool; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; - SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; - SUPPORTS_MACCATALYST = NO; + SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx"; + SUPPORTS_MACCATALYST = YES; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = 1; + TARGETED_DEVICE_FAMILY = "1,2,3"; + TVOS_DEPLOYMENT_TARGET = 11.0; }; name = Debug; }; @@ -438,21 +439,22 @@ FRAMEWORK_VERSION = A; INFOPLIST_FILE = "$(SRCROOT)/Resources/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/../Frameworks", "@loader_path/Frameworks", ); - MACOSX_DEPLOYMENT_TARGET = 12.0; + MACOSX_DEPLOYMENT_TARGET = 11.0; PRODUCT_BUNDLE_IDENTIFIER = com.Socii.MoonTool; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; - SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; - SUPPORTS_MACCATALYST = NO; + SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx"; + SUPPORTS_MACCATALYST = YES; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = 1; + TARGETED_DEVICE_FAMILY = "1,2,3"; + TVOS_DEPLOYMENT_TARGET = 11.0; }; name = Release; }; diff --git a/Package.swift b/Package.swift index 06e2e88..4202a89 100644 --- a/Package.swift +++ b/Package.swift @@ -5,7 +5,9 @@ import PackageDescription let package = Package( name: "MoonTool", platforms: [ - .iOS(.v15) + .iOS(.v11) + .macCatalyst(.v11) + .macOS(.v11) ], products: [ .library( From 09d5c476e210b3ee6e282c45a4bca3aa1ac6e5ae Mon Sep 17 00:00:00 2001 From: zici <1940699+zizicici@users.noreply.github.com> Date: Thu, 1 Jun 2023 10:15:13 +0800 Subject: [PATCH 7/8] Remove Debug.swift --- MoonTool.xcodeproj/project.pbxproj | 4 ---- Sources/Debug.swift | 31 ------------------------------ 2 files changed, 35 deletions(-) delete mode 100644 Sources/Debug.swift diff --git a/MoonTool.xcodeproj/project.pbxproj b/MoonTool.xcodeproj/project.pbxproj index f21dac8..0fb71e5 100644 --- a/MoonTool.xcodeproj/project.pbxproj +++ b/MoonTool.xcodeproj/project.pbxproj @@ -15,7 +15,6 @@ 3A43416C232C168900BA0153 /* Accuracy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A434167232C168900BA0153 /* Accuracy.swift */; }; 3A43416D232C168900BA0153 /* Math.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A434168232C168900BA0153 /* Math.swift */; }; 3A43416E232C168900BA0153 /* Moon.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A434169232C168900BA0153 /* Moon.swift */; }; - 3A434170232C17E300BA0153 /* Debug.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A43416F232C17E300BA0153 /* Debug.swift */; }; 3A9ED97223632C9D00E0B2DD /* Moon+Transition.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A9ED97123632C9D00E0B2DD /* Moon+Transition.swift */; }; 3A9ED97423632CE600E0B2DD /* Moon+Phase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A9ED97323632CE600E0B2DD /* Moon+Phase.swift */; }; 3AE0A9CA236B220100C0B22F /* JulianTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AE0A9C9236B220100C0B22F /* JulianTests.swift */; }; @@ -43,7 +42,6 @@ 3A434167232C168900BA0153 /* Accuracy.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Accuracy.swift; sourceTree = ""; }; 3A434168232C168900BA0153 /* Math.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Math.swift; sourceTree = ""; }; 3A434169232C168900BA0153 /* Moon.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Moon.swift; sourceTree = ""; }; - 3A43416F232C17E300BA0153 /* Debug.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Debug.swift; sourceTree = ""; }; 3A5E16A42784BB1800028305 /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = ""; }; 3A9ED97123632C9D00E0B2DD /* Moon+Transition.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Moon+Transition.swift"; sourceTree = ""; }; 3A9ED97323632CE600E0B2DD /* Moon+Phase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Moon+Phase.swift"; sourceTree = ""; }; @@ -116,7 +114,6 @@ 3A434165232C168800BA0153 /* Julian.swift */, 3A434168232C168900BA0153 /* Math.swift */, 3A9ED97023632B4000E0B2DD /* Moon */, - 3A43416F232C17E300BA0153 /* Debug.swift */, ); path = Sources; sourceTree = ""; @@ -242,7 +239,6 @@ files = ( 3A9ED97423632CE600E0B2DD /* Moon+Phase.swift in Sources */, 3A43416E232C168900BA0153 /* Moon.swift in Sources */, - 3A434170232C17E300BA0153 /* Debug.swift in Sources */, 3A43416A232C168900BA0153 /* Julian.swift in Sources */, 3A43416C232C168900BA0153 /* Accuracy.swift in Sources */, 3A43416B232C168900BA0153 /* Date.swift in Sources */, diff --git a/Sources/Debug.swift b/Sources/Debug.swift deleted file mode 100644 index 19bfbaf..0000000 --- a/Sources/Debug.swift +++ /dev/null @@ -1,31 +0,0 @@ -// Debug.swift - -// Copyright © 2019 Socii. All rights reserved. -// MIT License @ end of file. - -#if DEBUG - -import Cocoa - -enum LogLevel: String { - case none = "" - case passed = "✅ " - case warning = "⚠️ " - case error = "‼️ " -} - -/// Outputs the given item to the standard console, -/// along with the calling class and function name. -/// -/// - Parameters: -/// - item: The object to print to the console. -/// - level: The log level as defined in the LogLevel enum. -/// - fileName: The callers filename. -/// - function: The callers function. -/// -func logln(_ item: Any, level: LogLevel = .none, fileName: String = #file, function: String = #function) { - let className = URL(fileURLWithPath: fileName).deletingPathExtension().lastPathComponent - print("————————————————————————————————————\n\(className).\(function)\n\(level.rawValue)\(item)\n") -} - -#endif From 62e5a2579e7fbd169c772b4061c4c2a2f656281e Mon Sep 17 00:00:00 2001 From: zici <1940699+zizicici@users.noreply.github.com> Date: Thu, 1 Jun 2023 10:19:11 +0800 Subject: [PATCH 8/8] Update Package.swift --- MoonTool.xcodeproj/project.pbxproj | 16 ++++++++-------- Package.swift | 6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/MoonTool.xcodeproj/project.pbxproj b/MoonTool.xcodeproj/project.pbxproj index 0fb71e5..d501592 100644 --- a/MoonTool.xcodeproj/project.pbxproj +++ b/MoonTool.xcodeproj/project.pbxproj @@ -402,21 +402,21 @@ FRAMEWORK_VERSION = A; INFOPLIST_FILE = "$(SRCROOT)/Resources/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/../Frameworks", "@loader_path/Frameworks", ); - MACOSX_DEPLOYMENT_TARGET = 11.0; + MACOSX_DEPLOYMENT_TARGET = 13.0; PRODUCT_BUNDLE_IDENTIFIER = com.Socii.MoonTool; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; - SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; SUPPORTS_MACCATALYST = YES; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2,3"; + TARGETED_DEVICE_FAMILY = "1,2"; TVOS_DEPLOYMENT_TARGET = 11.0; }; name = Debug; @@ -435,21 +435,21 @@ FRAMEWORK_VERSION = A; INFOPLIST_FILE = "$(SRCROOT)/Resources/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/../Frameworks", "@loader_path/Frameworks", ); - MACOSX_DEPLOYMENT_TARGET = 11.0; + MACOSX_DEPLOYMENT_TARGET = 13.0; PRODUCT_BUNDLE_IDENTIFIER = com.Socii.MoonTool; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; - SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; SUPPORTS_MACCATALYST = YES; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2,3"; + TARGETED_DEVICE_FAMILY = "1,2"; TVOS_DEPLOYMENT_TARGET = 11.0; }; name = Release; diff --git a/Package.swift b/Package.swift index 4202a89..fead267 100644 --- a/Package.swift +++ b/Package.swift @@ -5,9 +5,9 @@ import PackageDescription let package = Package( name: "MoonTool", platforms: [ - .iOS(.v11) - .macCatalyst(.v11) - .macOS(.v11) + .iOS(.v15), + .macCatalyst(.v15), + .macOS(.v13) ], products: [ .library(