Skip to content

Commit f2aba1c

Browse files
committed
Ver 0.1 RC
1 parent 7b20940 commit f2aba1c

37 files changed

+435
-368
lines changed

.Sample/Sample.xcodeproj/project.pbxproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
F71046302B2353F10044BCE6 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F710462F2B2353F10044BCE6 /* Preview Assets.xcassets */; };
1515
F71046382B23587C0044BCE6 /* OnboardingUI in Frameworks */ = {isa = PBXBuildFile; productRef = F71046372B23587C0044BCE6 /* OnboardingUI */; };
1616
F742079B2B26BD790061AF69 /* Onboardings.swift in Sources */ = {isa = PBXBuildFile; fileRef = F742079A2B26BD790061AF69 /* Onboardings.swift */; };
17+
F783357E2B2DCC310022DC9C /* Localizable.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = F7B11FD22B2C46F800FBC2E0 /* Localizable.xcstrings */; };
1718
F7A6E4502B25762300D093AF /* WelcomeOnboardingSheetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7A6E44F2B25762300D093AF /* WelcomeOnboardingSheetView.swift */; };
1819
F7A6E4522B25779C00D093AF /* OnboardingCardView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7A6E4512B25779C00D093AF /* OnboardingCardView.swift */; };
19-
F7B11FD32B2C46F800FBC2E0 /* Localizable.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = F7B11FD22B2C46F800FBC2E0 /* Localizable.xcstrings */; };
2020
/* End PBXBuildFile section */
2121

2222
/* Begin PBXFileReference section */
@@ -68,7 +68,7 @@
6868
F71046272B2353F00044BCE6 /* SampleApp.swift */,
6969
F71046292B2353F00044BCE6 /* ContentView.swift */,
7070
F742079A2B26BD790061AF69 /* Onboardings.swift */,
71-
F7A6E44E2B2574E900D093AF /* SampleUI */,
71+
F7A6E44E2B2574E900D093AF /* UI */,
7272
F710462B2B2353F10044BCE6 /* Assets.xcassets */,
7373
F7B11FD22B2C46F800FBC2E0 /* Localizable.xcstrings */,
7474
F710462D2B2353F10044BCE6 /* Sample.entitlements */,
@@ -92,14 +92,14 @@
9292
name = Frameworks;
9393
sourceTree = "<group>";
9494
};
95-
F7A6E44E2B2574E900D093AF /* SampleUI */ = {
95+
F7A6E44E2B2574E900D093AF /* UI */ = {
9696
isa = PBXGroup;
9797
children = (
9898
F7A6E44F2B25762300D093AF /* WelcomeOnboardingSheetView.swift */,
9999
F60CCCD42B2C731C004C48E5 /* NewFeatureOnboardingSheetView.swift */,
100100
F7A6E4512B25779C00D093AF /* OnboardingCardView.swift */,
101101
);
102-
path = SampleUI;
102+
path = UI;
103103
sourceTree = "<group>";
104104
};
105105
/* End PBXGroup section */
@@ -166,7 +166,7 @@
166166
files = (
167167
F71046302B2353F10044BCE6 /* Preview Assets.xcassets in Resources */,
168168
F710462C2B2353F10044BCE6 /* Assets.xcassets in Resources */,
169-
F7B11FD32B2C46F800FBC2E0 /* Localizable.xcstrings in Resources */,
169+
F783357E2B2DCC310022DC9C /* Localizable.xcstrings in Resources */,
170170
);
171171
runOnlyForDeploymentPostprocessing = 0;
172172
};

.Sample/Sample/ContentView.swift

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//
22
// ContentView.swift
33
// Sample
4-
//
4+
//
55
// Created by Keisuke Chinone on 2023/12/08.
66
//
77

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

1515
@Environment(\.appVersionManager) private var appVersionManager
1616

17+
@State private var isMajor = true
18+
1719
var body: some View {
1820
@Bindable var appVersionManager = appVersionManager
1921
NavigationStack {
2022
Form {
2123
Section {
22-
NavigationLink("Show onboarding card") {
23-
OnboardingCardView()
24-
}
25-
2624
Button("Show onboarding sheets") {
2725
isOpenSheet.toggle()
2826
}
2927
.buttonStyle(.borderless)
3028
#if os(macOS)
3129
.frame(maxWidth: .infinity, alignment: .center)
3230
#endif
31+
NavigationLink("Show onboarding card") {
32+
OnboardingCardView()
33+
}
3334
} header: {
3435
Text("Onboarding protocol")
36+
} footer: {
37+
Text("This is a simple implementation using the Onboarding protocol")
3538
}
36-
#if DEBUG
39+
#if DEBUG
3740
Section {
38-
Button("Change to initial startup state") {
41+
Button("Initialization") {
3942
appVersionManager.lastOpenedVersion = ""
4043
}
4144
.buttonStyle(.borderless)
@@ -44,15 +47,15 @@ struct ContentView: View {
4447
.frame(maxWidth: .infinity, alignment: .center)
4548
#endif
4649

47-
Button("Changed to first startup status after update") {
50+
Button("After major update") {
4851
appVersionManager.lastOpenedVersion = "0.0.0"
4952
}
5053
.buttonStyle(.borderless)
5154
.foregroundStyle(Color.red)
5255
#if os(macOS)
5356
.frame(maxWidth: .infinity, alignment: .center)
5457
#endif
55-
Button("Changed to first startup status after update") {
58+
Button("After minor update") {
5659
appVersionManager.lastOpenedVersion = "1.0.0"
5760
}
5861
.buttonStyle(.borderless)
@@ -61,9 +64,11 @@ struct ContentView: View {
6164
.frame(maxWidth: .infinity, alignment: .center)
6265
#endif
6366
} header: {
64-
Text("AppVersionManager")
67+
Text("AppVersionManager environment variables and customizable views")
68+
} footer: {
69+
Text("This one is implemented with a customizable View and environment variables")
6570
}
66-
#endif
71+
#endif
6772
}
6873
.navigationTitle("OnboardingUI")
6974
.formStyle(.grouped)
@@ -83,7 +88,6 @@ struct ContentView: View {
8388
appVersionManager.isMinorOrPatchVersionUpdated = false
8489
})
8590
}
86-
8791
.sheetOnboarding(isPresented: $isOpenSheet, WelcomeOnboarding())
8892
}
8993
}

.Sample/Sample/Localizable.xcstrings

Lines changed: 69 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,32 @@
11
{
22
"sourceLanguage" : "en",
33
"strings" : {
4-
"AppVersionManager" : {
5-
4+
"After major update" : {
5+
"localizations" : {
6+
"ja" : {
7+
"stringUnit" : {
8+
"state" : "translated",
9+
"value" : "メジャーアップデート後"
10+
}
11+
}
12+
}
613
},
7-
"Change to initial startup state" : {
14+
"After minor update" : {
815
"localizations" : {
916
"ja" : {
1017
"stringUnit" : {
1118
"state" : "translated",
12-
"value" : "初回起動状態に変更"
19+
"value" : "マイナーアップデート後"
1320
}
1421
}
1522
}
1623
},
17-
"Changed to first startup status after update" : {
24+
"AppVersionManager environment variables and customizable views" : {
1825
"localizations" : {
1926
"ja" : {
2027
"stringUnit" : {
2128
"state" : "translated",
22-
"value" : "アップデート後、初起動の状態変更"
29+
"value" : "AppVersionManager環境変数とカスタマイズ可能なView"
2330
}
2431
}
2532
}
@@ -44,33 +51,33 @@
4451
}
4552
}
4653
},
47-
"Debugging of application launch history" : {
48-
"extractionState" : "stale",
54+
"Easy to Make" : {
4955
"localizations" : {
5056
"ja" : {
5157
"stringUnit" : {
5258
"state" : "translated",
53-
"value" : "アプリケーション起動履歴をデバッグ"
59+
"value" : "作成をより簡単に"
5460
}
5561
}
5662
}
5763
},
58-
"Easy to Make" : {
64+
"Initialization" : {
5965
"localizations" : {
6066
"ja" : {
6167
"stringUnit" : {
6268
"state" : "translated",
63-
"value" : "作成をより簡単に"
69+
"value" : "初回起動"
6470
}
6571
}
6672
}
6773
},
68-
"It supports multi-colors and hierarchies supported by iOS 15 and macOS 12, so you can customize it as you wish." : {
74+
"It supports multi-colors and hierarchies of SF Symbols, which can be freely customized. However, this feature is not supported by visionOS." : {
75+
"extractionState" : "manual",
6976
"localizations" : {
7077
"ja" : {
7178
"stringUnit" : {
7279
"state" : "translated",
73-
"value" : "iOS 15とmacOS 12でサポートされているマルチカラーと階層をサポートし、もっと自由にカスタマイズできます。"
80+
"value" : "マルチカラーやSFシンボルの階層をサポートし、自由にカスタマイズできます。ただし、この機能はvisionOSではサポートされていません。"
7481
}
7582
}
7683
}
@@ -85,6 +92,16 @@
8592
}
8693
}
8794
},
95+
"New AppVersionManager environment variable" : {
96+
"localizations" : {
97+
"ja" : {
98+
"stringUnit" : {
99+
"state" : "translated",
100+
"value" : "新しいAppVersionManager環境変数"
101+
}
102+
}
103+
}
104+
},
88105
"New Onboarding protocol and Feature structure" : {
89106
"localizations" : {
90107
"ja" : {
@@ -116,18 +133,21 @@
116133
}
117134
},
118135
"Onboarding Card" : {
119-
136+
"localizations" : {
137+
"ja" : {
138+
"stringUnit" : {
139+
"state" : "translated",
140+
"value" : "Onboardingカード"
141+
}
142+
}
143+
}
120144
},
121145
"Onboarding protocol" : {
122-
123-
},
124-
"Onboarding Sample App" : {
125-
"extractionState" : "stale",
126146
"localizations" : {
127147
"ja" : {
128148
"stringUnit" : {
129149
"state" : "translated",
130-
"value" : "オンボーディングサンプルアプリ"
150+
"value" : "Onboardingプロトコル"
131151
}
132152
}
133153
}
@@ -143,10 +163,24 @@
143163
}
144164
},
145165
"OnboardingUI" : {
146-
166+
"localizations" : {
167+
"ja" : {
168+
"stringUnit" : {
169+
"state" : "translated",
170+
"value" : "OnboardingUI"
171+
}
172+
}
173+
}
147174
},
148175
"Show onboarding card" : {
149-
176+
"localizations" : {
177+
"ja" : {
178+
"stringUnit" : {
179+
"state" : "translated",
180+
"value" : "Onboardingカードを表示"
181+
}
182+
}
183+
}
150184
},
151185
"Show onboarding sheets" : {
152186
"localizations" : {
@@ -158,24 +192,22 @@
158192
}
159193
}
160194
},
161-
"Show views with the onboarding card" : {
162-
"extractionState" : "stale",
195+
"Some Contents %lld" : {
163196
"localizations" : {
164197
"ja" : {
165198
"stringUnit" : {
166199
"state" : "translated",
167-
"value" : "オンボーディングのカード付きビューを表示"
200+
"value" : "あるビュー%lld"
168201
}
169202
}
170203
}
171204
},
172-
"Simple implementation using Onboarding protocol" : {
173-
"extractionState" : "stale",
205+
"The new AppVersionManager environment variable allows you to display onboarding at the intended time." : {
174206
"localizations" : {
175207
"ja" : {
176208
"stringUnit" : {
177209
"state" : "translated",
178-
"value" : "オンボーディングのプロトコルを使用した簡易的な実装"
210+
"value" : "新しいAppVersionManager環境変数により、意図した時間にオンボーディングを表示することができます。"
179211
}
180212
}
181213
}
@@ -190,53 +222,52 @@
190222
}
191223
}
192224
},
193-
"The View with the onboarding card" : {
194-
"extractionState" : "stale",
225+
"This is a simple implementation using the Onboarding protocol" : {
195226
"localizations" : {
196227
"ja" : {
197228
"stringUnit" : {
198229
"state" : "translated",
199-
"value" : "オンボーディングのカード付きビュー"
230+
"value" : "これはOnboardingプロトコルを使ったシンプルな実装です"
200231
}
201232
}
202233
}
203234
},
204-
"Vision Pro Support" : {
235+
"This one is implemented with a customizable View and environment variables" : {
205236
"localizations" : {
206237
"ja" : {
207238
"stringUnit" : {
208239
"state" : "translated",
209-
"value" : "Vision Proのサポート"
240+
"value" : "これはカスタマイズ可能なViewと環境変数で実装です"
210241
}
211242
}
212243
}
213244
},
214-
"Vision Pro support has also been added. Onboarding can be built just like any other platform." : {
245+
"Welcome to\nOnboardingUI" : {
215246
"localizations" : {
216247
"ja" : {
217248
"stringUnit" : {
218249
"state" : "translated",
219-
"value" : "Vision Proのサポートも追加しました。オンボーディングを他のプラットフォームと同様に構築できます。"
250+
"value" : "OnboardingUIへようこそ"
220251
}
221252
}
222253
}
223254
},
224-
"Welcome to\nOnboardingUI" : {
255+
"What's New in\nOnboardingUI" : {
225256
"localizations" : {
226257
"ja" : {
227258
"stringUnit" : {
228259
"state" : "translated",
229-
"value" : "OnboardingUIへようこそ"
260+
"value" : "OnboardingUIの新機能"
230261
}
231262
}
232263
}
233264
},
234-
"What's New in\nOnboardingUI" : {
265+
"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." : {
235266
"localizations" : {
236267
"ja" : {
237268
"stringUnit" : {
238269
"state" : "translated",
239-
"value" : "OnboardingUIの新機能"
270+
"value" : "カスタマイズ性の高い実装方法を用いた場合、マルチカラーやSFシンボルの階層をサポートし、自由にカスタマイズできます。ただし、この機能はvisionOSではサポートされていません。"
240271
}
241272
}
242273
}

0 commit comments

Comments
 (0)