Преглед изворни кода

Accept uppercased remote commands

Ivan Valkou пре 5 година
родитељ
комит
89767b9b9e
2 измењених фајлова са 4 додато и 2 уклоњено
  1. 2 0
      FreeAPS/Resources/Info.plist
  2. 2 2
      FreeAPS/Sources/Models/Announcement.swift

+ 2 - 0
FreeAPS/Resources/Info.plist

@@ -69,6 +69,8 @@
 	<array>
 		<string>UIInterfaceOrientationPortrait</string>
 	</array>
+	<key>ITSAppUsesNonExemptEncryption</key>
+	<false/>
 	<key>UISupportedInterfaceOrientations~ipad</key>
 	<array>
 		<string>UIInterfaceOrientationPortrait</string>

+ 2 - 2
FreeAPS/Sources/Models/Announcement.swift

@@ -12,8 +12,8 @@ struct Announcement: JSON {
         guard components.count == 2 else {
             return nil
         }
-        let command = String(components[0])
-        let arguments = String(components[1])
+        let command = String(components[0]).lowercased()
+        let arguments = String(components[1]).lowercased()
         switch command {
         case "bolus":
             guard let amount = Decimal(from: arguments) else { return nil }