Explorar el Código

Accept uppercased remote commands

Ivan Valkou hace 5 años
padre
commit
89767b9b9e
Se han modificado 2 ficheros con 4 adiciones y 2 borrados
  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>
 	<array>
 		<string>UIInterfaceOrientationPortrait</string>
 		<string>UIInterfaceOrientationPortrait</string>
 	</array>
 	</array>
+	<key>ITSAppUsesNonExemptEncryption</key>
+	<false/>
 	<key>UISupportedInterfaceOrientations~ipad</key>
 	<key>UISupportedInterfaceOrientations~ipad</key>
 	<array>
 	<array>
 		<string>UIInterfaceOrientationPortrait</string>
 		<string>UIInterfaceOrientationPortrait</string>

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

@@ -12,8 +12,8 @@ struct Announcement: JSON {
         guard components.count == 2 else {
         guard components.count == 2 else {
             return nil
             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 {
         switch command {
         case "bolus":
         case "bolus":
             guard let amount = Decimal(from: arguments) else { return nil }
             guard let amount = Decimal(from: arguments) else { return nil }