diff --git a/AppResign/AppResign.xcodeproj/project.xcworkspace/xcuserdata/eular.xcuserdatad/UserInterfaceState.xcuserstate b/AppResign/AppResign.xcodeproj/project.xcworkspace/xcuserdata/eular.xcuserdatad/UserInterfaceState.xcuserstate index c3dacc3..0da7e52 100644 Binary files a/AppResign/AppResign.xcodeproj/project.xcworkspace/xcuserdata/eular.xcuserdatad/UserInterfaceState.xcuserstate and b/AppResign/AppResign.xcodeproj/project.xcworkspace/xcuserdata/eular.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/AppResign/AppResign/main.swift b/AppResign/AppResign/main.swift index 7ba2219..b01a618 100644 --- a/AppResign/AppResign/main.swift +++ b/AppResign/AppResign/main.swift @@ -30,20 +30,27 @@ func Usage() { exit(1) } +// deprecated +//func raw_input(_ prompt: String = "> ") -> String { +// print(prompt, terminator:"") +// var input: String = "" +// +// while true { +// let c = Character(UnicodeScalar(UInt32(fgetc(stdin)))!) +// if c == "\n" { +// return input +// } else { +// input.append(c) +// } +// } +//} + func raw_input(_ prompt: String = "> ") -> String { print(prompt, terminator:"") - var input: String = "" - - while true { - let c = Character(UnicodeScalar(UInt32(fgetc(stdin)))!) - if c == "\n" { - return input - } else { - input.append(c) - } - } + return readLine(strippingNewline: true) ?? "" } + func mainRoutine(_ input: String, output: String, certificate: String, provProfile: String, bundleId: String, displayName: String) { let support = ["deb", "ipa", "app", "xcarchive"] if support.contains(input.pathExtension) {