From 1f2d4e4cb6524094db4ac5aa1f69083ffb4ec927 Mon Sep 17 00:00:00 2001 From: KC-2001MS Date: Wed, 9 Oct 2024 09:45:42 +0900 Subject: [PATCH] fix docc --- Note.md | 26 ------------------- .../xcshareddata/swiftpm/Package.resolved | 12 ++++----- Package.resolved | 16 ++++++------ Package.swift | 9 ++++--- Sample/Sample.xcodeproj/project.pbxproj | 4 +-- .../UI/Modifier/OnboardingSheet.swift | 4 +-- .../UI/View/OnboardingCardView.swift | 4 +-- .../UI/View/Parts/OnboardingButton.swift | 2 +- 8 files changed, 27 insertions(+), 50 deletions(-) delete mode 100644 Note.md diff --git a/Note.md b/Note.md deleted file mode 100644 index c73cec005..000000000 --- a/Note.md +++ /dev/null @@ -1,26 +0,0 @@ -# Note - -## How to Build Swift-DocC -1. Change the following code -``` swift - Text("Continue", bundle: .module) -``` -to -``` swift - Text("Continue") -``` -2. Save Workspace -3. Open Terminal -4. Go to the root path of this repository -5. Execute the following command -``` zsh - make docc -``` -6. Revert the code as follows -``` swift - Text("Continue") -``` -to -``` swift - Text("Continue", bundle: .module) -``` diff --git a/OnboardingUI.xcworkspace/xcshareddata/swiftpm/Package.resolved b/OnboardingUI.xcworkspace/xcshareddata/swiftpm/Package.resolved index 0ee7507c8..d2807aeb0 100644 --- a/OnboardingUI.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/OnboardingUI.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -5,14 +5,14 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-docc-plugin", "state" : { - "revision" : "26ac5758409154cc448d7ab82389c520fa8a8247", - "version" : "1.3.0" + "revision" : "85e4bb4e1cd62cec64a4b8e769dcefdf0c5b9d64", + "version" : "1.4.3" } }, { "identity" : "swift-docc-symbolkit", "kind" : "remoteSourceControl", - "location" : "https://github.com/apple/swift-docc-symbolkit", + "location" : "https://github.com/swiftlang/swift-docc-symbolkit", "state" : { "revision" : "b45d1f2ed151d057b54504d653e0da5552844e34", "version" : "1.0.0" @@ -21,7 +21,7 @@ { "identity" : "swift-syntax", "kind" : "remoteSourceControl", - "location" : "https://github.com/apple/swift-syntax.git", + "location" : "https://github.com/swiftlang/swift-syntax.git", "state" : { "revision" : "82a453c2dfa335c7e778695762438dfe72b328d2", "version" : "600.0.0-prerelease-2024-07-24" @@ -32,8 +32,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-testing.git", "state" : { - "revision" : "69d59cfc76e5daf498ca61f5af409f594768eef9", - "version" : "0.10.0" + "revision" : "c55848b2aa4b29a4df542b235dfdd792a6fbe341", + "version" : "0.12.0" } } ], diff --git a/Package.resolved b/Package.resolved index 0d740f725..5671531a3 100644 --- a/Package.resolved +++ b/Package.resolved @@ -5,14 +5,14 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-docc-plugin", "state" : { - "revision" : "26ac5758409154cc448d7ab82389c520fa8a8247", - "version" : "1.3.0" + "revision" : "85e4bb4e1cd62cec64a4b8e769dcefdf0c5b9d64", + "version" : "1.4.3" } }, { "identity" : "swift-docc-symbolkit", "kind" : "remoteSourceControl", - "location" : "https://github.com/apple/swift-docc-symbolkit", + "location" : "https://github.com/swiftlang/swift-docc-symbolkit", "state" : { "revision" : "b45d1f2ed151d057b54504d653e0da5552844e34", "version" : "1.0.0" @@ -21,10 +21,10 @@ { "identity" : "swift-syntax", "kind" : "remoteSourceControl", - "location" : "https://github.com/apple/swift-syntax.git", + "location" : "https://github.com/swiftlang/swift-syntax.git", "state" : { - "revision" : "4c6cc0a3b9e8f14b3ae2307c5ccae4de6167ac2c", - "version" : "600.0.0-prerelease-2024-06-12" + "revision" : "0687f71944021d616d34d922343dcef086855920", + "version" : "600.0.1" } }, { @@ -32,8 +32,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-testing.git", "state" : { - "revision" : "69d59cfc76e5daf498ca61f5af409f594768eef9", - "version" : "0.10.0" + "revision" : "399f76dcd91e4c688ca2301fa24a8cc6d9927211", + "version" : "0.99.0" } } ], diff --git a/Package.swift b/Package.swift index 5e6598a0e..af76eee54 100644 --- a/Package.swift +++ b/Package.swift @@ -13,13 +13,16 @@ let package = Package( targets: ["OnboardingUI"]), ], dependencies: [ - .package(url: "https://github.com/apple/swift-docc-plugin", from: "1.3.0"), - .package(url: "https://github.com/apple/swift-testing.git", from: "0.10.0"), + .package(url: "https://github.com/apple/swift-docc-plugin", from: "1.4.0"), + .package(url: "https://github.com/apple/swift-testing.git", from: "0.12.0"), ], targets: [ .target( name: "OnboardingUI", - dependencies: [] + resources: [ +// .process("Media.xcassets"), + .process("Localizable.xcstrings") + ] ), .testTarget( name: "OnboardingUITests", diff --git a/Sample/Sample.xcodeproj/project.pbxproj b/Sample/Sample.xcodeproj/project.pbxproj index 6fbc4a42c..4298d7f81 100644 --- a/Sample/Sample.xcodeproj/project.pbxproj +++ b/Sample/Sample.xcodeproj/project.pbxproj @@ -346,7 +346,7 @@ SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx xros xrsimulator"; SUPPORTS_MACCATALYST = NO; SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; + SWIFT_VERSION = 6.0; TARGETED_DEVICE_FAMILY = "1,2,3,7"; TVOS_DEPLOYMENT_TARGET = 15.0; XROS_DEPLOYMENT_TARGET = 1.0; @@ -390,7 +390,7 @@ SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx xros xrsimulator"; SUPPORTS_MACCATALYST = NO; SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; + SWIFT_VERSION = 6.0; TARGETED_DEVICE_FAMILY = "1,2,3,7"; TVOS_DEPLOYMENT_TARGET = 15.0; XROS_DEPLOYMENT_TARGET = 1.0; diff --git a/Sources/OnboardingUI/UI/Modifier/OnboardingSheet.swift b/Sources/OnboardingUI/UI/Modifier/OnboardingSheet.swift index 3987b2647..98f337525 100644 --- a/Sources/OnboardingUI/UI/Modifier/OnboardingSheet.swift +++ b/Sources/OnboardingUI/UI/Modifier/OnboardingSheet.swift @@ -53,9 +53,9 @@ public extension View { } #Preview { - @State var isPresented: Bool = true + @Previewable @State var isPresented: Bool = true - return Group { + Group { Button(String("Open Onboarding")) { isPresented = true } diff --git a/Sources/OnboardingUI/UI/View/OnboardingCardView.swift b/Sources/OnboardingUI/UI/View/OnboardingCardView.swift index 8c40f531b..16a6c9102 100644 --- a/Sources/OnboardingUI/UI/View/OnboardingCardView.swift +++ b/Sources/OnboardingUI/UI/View/OnboardingCardView.swift @@ -79,9 +79,9 @@ public struct OnboardingCardView: View { } #Preview { - @State var isPresented = true + @Previewable @State var isPresented = true - return ScrollView { + ScrollView { OnboardingCardView(isPresented: $isPresented, onboarding: PreviewWhatIsNewOnboarding()) .padding() } diff --git a/Sources/OnboardingUI/UI/View/Parts/OnboardingButton.swift b/Sources/OnboardingUI/UI/View/Parts/OnboardingButton.swift index 8b831eb98..e65413adb 100644 --- a/Sources/OnboardingUI/UI/View/Parts/OnboardingButton.swift +++ b/Sources/OnboardingUI/UI/View/Parts/OnboardingButton.swift @@ -49,7 +49,7 @@ public struct ContinueButton: View { /// View public var body: some View { Button(action: action) { - Text("Continue") + Text("Continue", bundle: Bundle.module) } #if !os(tvOS) .buttonStyle(ColorButtonStyle(foregroundColor: foregroundColor, backgroundColor: backgroundColor))