Skip to content

Commit

Permalink
Ver 0.1 RC
Browse files Browse the repository at this point in the history
  • Loading branch information
KC-2001MS committed Dec 17, 2023
1 parent 7b20940 commit f2aba1c
Show file tree
Hide file tree
Showing 37 changed files with 435 additions and 368 deletions.
10 changes: 5 additions & 5 deletions .Sample/Sample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
F71046302B2353F10044BCE6 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F710462F2B2353F10044BCE6 /* Preview Assets.xcassets */; };
F71046382B23587C0044BCE6 /* OnboardingUI in Frameworks */ = {isa = PBXBuildFile; productRef = F71046372B23587C0044BCE6 /* OnboardingUI */; };
F742079B2B26BD790061AF69 /* Onboardings.swift in Sources */ = {isa = PBXBuildFile; fileRef = F742079A2B26BD790061AF69 /* Onboardings.swift */; };
F783357E2B2DCC310022DC9C /* Localizable.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = F7B11FD22B2C46F800FBC2E0 /* Localizable.xcstrings */; };
F7A6E4502B25762300D093AF /* WelcomeOnboardingSheetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7A6E44F2B25762300D093AF /* WelcomeOnboardingSheetView.swift */; };
F7A6E4522B25779C00D093AF /* OnboardingCardView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7A6E4512B25779C00D093AF /* OnboardingCardView.swift */; };
F7B11FD32B2C46F800FBC2E0 /* Localizable.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = F7B11FD22B2C46F800FBC2E0 /* Localizable.xcstrings */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand Down Expand Up @@ -68,7 +68,7 @@
F71046272B2353F00044BCE6 /* SampleApp.swift */,
F71046292B2353F00044BCE6 /* ContentView.swift */,
F742079A2B26BD790061AF69 /* Onboardings.swift */,
F7A6E44E2B2574E900D093AF /* SampleUI */,
F7A6E44E2B2574E900D093AF /* UI */,
F710462B2B2353F10044BCE6 /* Assets.xcassets */,
F7B11FD22B2C46F800FBC2E0 /* Localizable.xcstrings */,
F710462D2B2353F10044BCE6 /* Sample.entitlements */,
Expand All @@ -92,14 +92,14 @@
name = Frameworks;
sourceTree = "<group>";
};
F7A6E44E2B2574E900D093AF /* SampleUI */ = {
F7A6E44E2B2574E900D093AF /* UI */ = {
isa = PBXGroup;
children = (
F7A6E44F2B25762300D093AF /* WelcomeOnboardingSheetView.swift */,
F60CCCD42B2C731C004C48E5 /* NewFeatureOnboardingSheetView.swift */,
F7A6E4512B25779C00D093AF /* OnboardingCardView.swift */,
);
path = SampleUI;
path = UI;
sourceTree = "<group>";
};
/* End PBXGroup section */
Expand Down Expand Up @@ -166,7 +166,7 @@
files = (
F71046302B2353F10044BCE6 /* Preview Assets.xcassets in Resources */,
F710462C2B2353F10044BCE6 /* Assets.xcassets in Resources */,
F7B11FD32B2C46F800FBC2E0 /* Localizable.xcstrings in Resources */,
F783357E2B2DCC310022DC9C /* Localizable.xcstrings in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
28 changes: 16 additions & 12 deletions .Sample/Sample/ContentView.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// ContentView.swift
// Sample
//
//
// Created by Keisuke Chinone on 2023/12/08.
//

Expand All @@ -14,28 +14,31 @@ struct ContentView: View {

@Environment(\.appVersionManager) private var appVersionManager

@State private var isMajor = true

var body: some View {
@Bindable var appVersionManager = appVersionManager
NavigationStack {
Form {
Section {
NavigationLink("Show onboarding card") {
OnboardingCardView()
}

Button("Show onboarding sheets") {
isOpenSheet.toggle()
}
.buttonStyle(.borderless)
#if os(macOS)
.frame(maxWidth: .infinity, alignment: .center)
#endif
NavigationLink("Show onboarding card") {
OnboardingCardView()
}
} header: {
Text("Onboarding protocol")
} footer: {
Text("This is a simple implementation using the Onboarding protocol")
}
#if DEBUG
#if DEBUG
Section {
Button("Change to initial startup state") {
Button("Initialization") {
appVersionManager.lastOpenedVersion = ""
}
.buttonStyle(.borderless)
Expand All @@ -44,15 +47,15 @@ struct ContentView: View {
.frame(maxWidth: .infinity, alignment: .center)
#endif

Button("Changed to first startup status after update") {
Button("After major update") {
appVersionManager.lastOpenedVersion = "0.0.0"
}
.buttonStyle(.borderless)
.foregroundStyle(Color.red)
#if os(macOS)
.frame(maxWidth: .infinity, alignment: .center)
#endif
Button("Changed to first startup status after update") {
Button("After minor update") {
appVersionManager.lastOpenedVersion = "1.0.0"
}
.buttonStyle(.borderless)
Expand All @@ -61,9 +64,11 @@ struct ContentView: View {
.frame(maxWidth: .infinity, alignment: .center)
#endif
} header: {
Text("AppVersionManager")
Text("AppVersionManager environment variables and customizable views")
} footer: {
Text("This one is implemented with a customizable View and environment variables")
}
#endif
#endif
}
.navigationTitle("OnboardingUI")
.formStyle(.grouped)
Expand All @@ -83,7 +88,6 @@ struct ContentView: View {
appVersionManager.isMinorOrPatchVersionUpdated = false
})
}

.sheetOnboarding(isPresented: $isOpenSheet, WelcomeOnboarding())
}
}
Expand Down
107 changes: 69 additions & 38 deletions .Sample/Sample/Localizable.xcstrings
Original file line number Diff line number Diff line change
@@ -1,25 +1,32 @@
{
"sourceLanguage" : "en",
"strings" : {
"AppVersionManager" : {

"After major update" : {
"localizations" : {
"ja" : {
"stringUnit" : {
"state" : "translated",
"value" : "メジャーアップデート後"
}
}
}
},
"Change to initial startup state" : {
"After minor update" : {
"localizations" : {
"ja" : {
"stringUnit" : {
"state" : "translated",
"value" : "初回起動状態に変更"
"value" : "マイナーアップデート後"
}
}
}
},
"Changed to first startup status after update" : {
"AppVersionManager environment variables and customizable views" : {
"localizations" : {
"ja" : {
"stringUnit" : {
"state" : "translated",
"value" : "アップデート後、初起動の状態変更"
"value" : "AppVersionManager環境変数とカスタマイズ可能なView"
}
}
}
Expand All @@ -44,33 +51,33 @@
}
}
},
"Debugging of application launch history" : {
"extractionState" : "stale",
"Easy to Make" : {
"localizations" : {
"ja" : {
"stringUnit" : {
"state" : "translated",
"value" : "アプリケーション起動履歴をデバッグ"
"value" : "作成をより簡単に"
}
}
}
},
"Easy to Make" : {
"Initialization" : {
"localizations" : {
"ja" : {
"stringUnit" : {
"state" : "translated",
"value" : "作成をより簡単に"
"value" : "初回起動"
}
}
}
},
"It supports multi-colors and hierarchies supported by iOS 15 and macOS 12, so you can customize it as you wish." : {
"It supports multi-colors and hierarchies of SF Symbols, which can be freely customized. However, this feature is not supported by visionOS." : {
"extractionState" : "manual",
"localizations" : {
"ja" : {
"stringUnit" : {
"state" : "translated",
"value" : "iOS 15とmacOS 12でサポートされているマルチカラーと階層をサポートし、もっと自由にカスタマイズできます。"
"value" : "マルチカラーやSFシンボルの階層をサポートし、自由にカスタマイズできます。ただし、この機能はvisionOSではサポートされていません。"
}
}
}
Expand All @@ -85,6 +92,16 @@
}
}
},
"New AppVersionManager environment variable" : {
"localizations" : {
"ja" : {
"stringUnit" : {
"state" : "translated",
"value" : "新しいAppVersionManager環境変数"
}
}
}
},
"New Onboarding protocol and Feature structure" : {
"localizations" : {
"ja" : {
Expand Down Expand Up @@ -116,18 +133,21 @@
}
},
"Onboarding Card" : {

"localizations" : {
"ja" : {
"stringUnit" : {
"state" : "translated",
"value" : "Onboardingカード"
}
}
}
},
"Onboarding protocol" : {

},
"Onboarding Sample App" : {
"extractionState" : "stale",
"localizations" : {
"ja" : {
"stringUnit" : {
"state" : "translated",
"value" : "オンボーディングサンプルアプリ"
"value" : "Onboardingプロトコル"
}
}
}
Expand All @@ -143,10 +163,24 @@
}
},
"OnboardingUI" : {

"localizations" : {
"ja" : {
"stringUnit" : {
"state" : "translated",
"value" : "OnboardingUI"
}
}
}
},
"Show onboarding card" : {

"localizations" : {
"ja" : {
"stringUnit" : {
"state" : "translated",
"value" : "Onboardingカードを表示"
}
}
}
},
"Show onboarding sheets" : {
"localizations" : {
Expand All @@ -158,24 +192,22 @@
}
}
},
"Show views with the onboarding card" : {
"extractionState" : "stale",
"Some Contents %lld" : {
"localizations" : {
"ja" : {
"stringUnit" : {
"state" : "translated",
"value" : "オンボーディングのカード付きビューを表示"
"value" : "あるビュー%lld"
}
}
}
},
"Simple implementation using Onboarding protocol" : {
"extractionState" : "stale",
"The new AppVersionManager environment variable allows you to display onboarding at the intended time." : {
"localizations" : {
"ja" : {
"stringUnit" : {
"state" : "translated",
"value" : "オンボーディングのプロトコルを使用した簡易的な実装"
"value" : "新しいAppVersionManager環境変数により、意図した時間にオンボーディングを表示することができます。"
}
}
}
Expand All @@ -190,53 +222,52 @@
}
}
},
"The View with the onboarding card" : {
"extractionState" : "stale",
"This is a simple implementation using the Onboarding protocol" : {
"localizations" : {
"ja" : {
"stringUnit" : {
"state" : "translated",
"value" : "オンボーディングのカード付きビュー"
"value" : "これはOnboardingプロトコルを使ったシンプルな実装です"
}
}
}
},
"Vision Pro Support" : {
"This one is implemented with a customizable View and environment variables" : {
"localizations" : {
"ja" : {
"stringUnit" : {
"state" : "translated",
"value" : "Vision Proのサポート"
"value" : "これはカスタマイズ可能なViewと環境変数で実装です"
}
}
}
},
"Vision Pro support has also been added. Onboarding can be built just like any other platform." : {
"Welcome to\nOnboardingUI" : {
"localizations" : {
"ja" : {
"stringUnit" : {
"state" : "translated",
"value" : "Vision Proのサポートも追加しました。オンボーディングを他のプラットフォームと同様に構築できます。"
"value" : "OnboardingUIへようこそ"
}
}
}
},
"Welcome to\nOnboardingUI" : {
"What's New in\nOnboardingUI" : {
"localizations" : {
"ja" : {
"stringUnit" : {
"state" : "translated",
"value" : "OnboardingUIへようこそ"
"value" : "OnboardingUIの新機能"
}
}
}
},
"What's New in\nOnboardingUI" : {
"When using a highly customizable implementation method, multi-color and SF symbol hierarchies are supported and can be freely customized. However, this feature is not supported in visionOS." : {
"localizations" : {
"ja" : {
"stringUnit" : {
"state" : "translated",
"value" : "OnboardingUIの新機能"
"value" : "カスタマイズ性の高い実装方法を用いた場合、マルチカラーやSFシンボルの階層をサポートし、自由にカスタマイズできます。ただし、この機能はvisionOSではサポートされていません。"
}
}
}
Expand Down
Loading

0 comments on commit f2aba1c

Please sign in to comment.