File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 281281 "$(inherited)",
282282 "@executable_path/Frameworks",
283283 );
284- MARKETING_VERSION = 2.0;
284+ MARKETING_VERSION = 2.0.1 ;
285285 PRODUCT_BUNDLE_IDENTIFIER = "com.lemin.Pocket-Poster";
286286 PRODUCT_NAME = "$(TARGET_NAME)";
287287 SWIFT_EMIT_LOC_STRINGS = YES;
313313 "$(inherited)",
314314 "@executable_path/Frameworks",
315315 );
316- MARKETING_VERSION = 2.0;
316+ MARKETING_VERSION = 2.0.1 ;
317317 PRODUCT_BUNDLE_IDENTIFIER = "com.lemin.Pocket-Poster";
318318 PRODUCT_NAME = "$(TARGET_NAME)";
319319 SWIFT_EMIT_LOC_STRINGS = YES;
Original file line number Diff line number Diff line change @@ -23,6 +23,23 @@ struct SettingsView: View {
2323 TextField ( " Enter App Hash " , text: $pbHash)
2424 . textFieldStyle ( RoundedBorderTextFieldStyle ( ) )
2525 . font ( . system( . body, design: . monospaced) )
26+ . onChange ( of: pbHash) { _ in
27+ var separator : String ? = nil
28+ if pbHash. contains ( " " ) {
29+ separator = " "
30+ } else if pbHash. contains ( " \n " ) {
31+ separator = " \n "
32+ }
33+ if let separator = separator {
34+ let items = pbHash. split ( separator: separator)
35+ if let pb = items. first {
36+ pbHash = String ( pb)
37+ }
38+ if items. count >= 2 {
39+ cpHash = String ( items [ 1 ] )
40+ }
41+ }
42+ }
2643 HStack {
2744 Spacer ( )
2845 // Run task to check until file exists from Nugget pc over AFC
@@ -144,7 +161,11 @@ struct SettingsView: View {
144161 let contents = try String ( contentsOf: filePath)
145162 try ? FileManager . default. removeItem ( at: filePath)
146163 await MainActor . run {
147- let items = contents. split ( separator: " \n " )
164+ var separator = " "
165+ if contents. contains ( " \n " ) {
166+ separator = " \n "
167+ }
168+ let items = contents. split ( separator: separator)
148169 if let pb = items. first {
149170 pbHash = String ( pb)
150171 }
You can’t perform that action at this time.
0 commit comments