Last active
September 16, 2024 08:09
-
-
Save vladdeSV/68fb9a52a54f87f9ccbafdf9d0072556 to your computer and use it in GitHub Desktop.
StarMicronics model id to name mapping
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// StarMicronics identifier to name mapping in Swift. | |
// | |
// Leave a star on this Gist if you found it helpful. | |
// Contributions and corrections greatly appreciated. | |
// | |
// Sources & references, latest update at 2024-09-16. | |
// | |
// - https://star-m.jp/products/s_print/sdk/starxpand/manual/en/ios-swift-api-reference/star-printer-model/index.html | |
// - https://github.com/star-micronics/StarXpand-SDK-iOS/blob/2fc49f245a0c8e2e460cb53383c908011e1e9d1f/StarIO10.xcframework/ios-arm64/StarIO10.framework/Modules/StarIO10.swiftmodule/arm64-apple-ios.swiftinterface#L740-L760 | |
// - https://star-m.jp/products/s_print/sdk/starxpand/manual/en/index.html | |
// get identifier from printer, could be a nil value. | |
let starPrinter: StarPrinter | |
let identifier = starPrinter.information?.model.description | |
// get name based on identifier; place in a function. | |
switch identifer { | |
case "bsc10II": return "BSC10II" | |
case "mC_Label3": return "mC-Label3" | |
case "mC_Print2": return "mC-Print2" | |
case "mC_Print3": return "mC-Print3" | |
case "mPOP": return "mPOP" | |
case "sm_L200": return "SM-L200" | |
case "sm_L300": return "SM-L300" | |
case "sm_S210i": return "SM-S210i" | |
case "sm_S230i": return "SM-S230i" | |
case "sm_T300i": return "SM-T300i" | |
case "sm_T400i": return "SM-T400i" | |
case "sp700": return "SP700" | |
case "tsp100IIIBI": return "TSP100IIIBI" | |
case "tsp100IIILAN": return "TSP100IIILAN" | |
case "tsp100IIIU": return "TSP100IIIU" | |
case "tsp100IIIW": return "TSP100IIIW" | |
case "tsp100IV": return "TSP100IV" | |
case "tsp100IV_SK": return "TSP100IV SK" | |
case "tsp650II": return "TSP650II" | |
case "tsp700II": return "TSP700II" | |
case "tsp800II": return "TSP800II" | |
default: return identifer | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment