diff --git a/.travis.yml b/.travis.yml
index 88cc82c9b..0aeaf06f6 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,7 +1,7 @@
language: objective-c
-osx_image: xcode8.3
-xcode_sdk: iphonesimulator10.3
+osx_image: xcode9
+xcode_sdk: iphonesimulator11
xcode_project: RileyLink.xcodeproj
xcode_scheme: RileyLink
script:
- - xcodebuild -project RileyLink.xcodeproj -scheme RileyLink -sdk iphonesimulator10.3 build -destination 'name=iPhone SE' test
+ - xcodebuild -project RileyLink.xcodeproj -scheme RileyLink build -destination 'name=iPhone SE' test
diff --git a/Crypto/Info.plist b/Crypto/Info.plist
index 1e79e1d69..fd435638f 100644
--- a/Crypto/Info.plist
+++ b/Crypto/Info.plist
@@ -15,7 +15,7 @@
CFBundlePackageType
FMWK
CFBundleShortVersionString
- 1.2.1
+ 1.2.2
CFBundleVersion
$(CURRENT_PROJECT_VERSION)
NSPrincipalClass
diff --git a/MinimedKit/Info.plist b/MinimedKit/Info.plist
index ae2dbbbfb..0eb186c06 100644
--- a/MinimedKit/Info.plist
+++ b/MinimedKit/Info.plist
@@ -15,7 +15,7 @@
CFBundlePackageType
FMWK
CFBundleShortVersionString
- 1.2.1
+ 1.2.2
CFBundleSignature
????
CFBundleVersion
diff --git a/MinimedKitTests/BasalScheduleTests.swift b/MinimedKitTests/BasalScheduleTests.swift
index 16b7c0553..2b9dc4718 100644
--- a/MinimedKitTests/BasalScheduleTests.swift
+++ b/MinimedKitTests/BasalScheduleTests.swift
@@ -24,20 +24,20 @@ class BasalScheduleTests: XCTestCase {
// Test each element
XCTAssertEqual(basalSchedule[0].index, 0)
XCTAssertEqual(basalSchedule[0].timeOffset, TimeInterval(minutes: 0))
- XCTAssertEqualWithAccuracy(basalSchedule[0].rate, 0.15, accuracy: .ulpOfOne)
+ XCTAssertEqual(basalSchedule[0].rate, 0.15, accuracy: .ulpOfOne)
XCTAssertEqual(basalSchedule[1].index, 1)
XCTAssertEqual(basalSchedule[1].timeOffset, TimeInterval(minutes: 30))
- XCTAssertEqualWithAccuracy(basalSchedule[1].rate, 2.05, accuracy: .ulpOfOne)
+ XCTAssertEqual(basalSchedule[1].rate, 2.05, accuracy: .ulpOfOne)
// Tests parsing rates that take two bytes to encode
XCTAssertEqual(basalSchedule[2].index, 2)
XCTAssertEqual(basalSchedule[2].timeOffset, TimeInterval(minutes: 60))
- XCTAssertEqualWithAccuracy(basalSchedule[2].rate, 35.00, accuracy: .ulpOfOne)
+ XCTAssertEqual(basalSchedule[2].rate, 35.00, accuracy: .ulpOfOne)
// Tests parsing entry on the second page
XCTAssertEqual(basalSchedule[25].index, 25)
XCTAssertEqual(basalSchedule[25].timeOffset, TimeInterval(minutes: 750))
- XCTAssertEqualWithAccuracy(basalSchedule[25].rate, 0.05, accuracy: .ulpOfOne)
+ XCTAssertEqual(basalSchedule[25].rate, 0.05, accuracy: .ulpOfOne)
}
}
diff --git a/MinimedKitTests/Info.plist b/MinimedKitTests/Info.plist
index 783a6936e..e4ede6701 100644
--- a/MinimedKitTests/Info.plist
+++ b/MinimedKitTests/Info.plist
@@ -15,7 +15,7 @@
CFBundlePackageType
BNDL
CFBundleShortVersionString
- 1.2.1
+ 1.2.2
CFBundleSignature
????
CFBundleVersion
diff --git a/MinimedKitTests/NSStringExtensions.swift b/MinimedKitTests/NSStringExtensions.swift
index ad445a477..2d76acf5f 100644
--- a/MinimedKitTests/NSStringExtensions.swift
+++ b/MinimedKitTests/NSStringExtensions.swift
@@ -14,7 +14,7 @@ extension String {
if newLength < toLength {
return String(repeatElement(character, count: toLength - newLength)) + self
} else {
- return self.substring(from: index(self.startIndex, offsetBy: newLength - toLength))
+ return String(self[index(startIndex, offsetBy: newLength - toLength)...])
}
}
}
diff --git a/NightscoutUploadKit/Info.plist b/NightscoutUploadKit/Info.plist
index ae2dbbbfb..0eb186c06 100644
--- a/NightscoutUploadKit/Info.plist
+++ b/NightscoutUploadKit/Info.plist
@@ -15,7 +15,7 @@
CFBundlePackageType
FMWK
CFBundleShortVersionString
- 1.2.1
+ 1.2.2
CFBundleSignature
????
CFBundleVersion
diff --git a/NightscoutUploadKitTests/Info.plist b/NightscoutUploadKitTests/Info.plist
index b91171ff3..f14c03683 100644
--- a/NightscoutUploadKitTests/Info.plist
+++ b/NightscoutUploadKitTests/Info.plist
@@ -15,7 +15,7 @@
CFBundlePackageType
BNDL
CFBundleShortVersionString
- 1.2.1
+ 1.2.2
CFBundleSignature
????
CFBundleVersion
diff --git a/RileyLink.xcodeproj/project.pbxproj b/RileyLink.xcodeproj/project.pbxproj
index 123f86e0d..25ac15119 100644
--- a/RileyLink.xcodeproj/project.pbxproj
+++ b/RileyLink.xcodeproj/project.pbxproj
@@ -64,6 +64,7 @@
438D39221D19011700D40CA4 /* PlaceholderPumpEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 438D39211D19011700D40CA4 /* PlaceholderPumpEvent.swift */; };
439731271CF21C3C00F474E5 /* RileyLinkDeviceTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 439731261CF21C3C00F474E5 /* RileyLinkDeviceTableViewCell.swift */; };
43A068EC1CF6BA6900F9EFE4 /* ReadRemainingInsulinMessageBodyTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43A068EB1CF6BA6900F9EFE4 /* ReadRemainingInsulinMessageBodyTests.swift */; };
+ 43A9E50E1F6B865000307931 /* NSData.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1EAD6BA1C826B92006DBA60 /* NSData.swift */; };
43B0ADC01D0FC03200AAD278 /* NSDateComponentsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43B0ADBF1D0FC03200AAD278 /* NSDateComponentsTests.swift */; };
43B0ADC21D12454700AAD278 /* TimestampedHistoryEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43B0ADC11D12454700AAD278 /* TimestampedHistoryEvent.swift */; };
43B0ADC41D12506A00AAD278 /* NSDateFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43B0ADC31D12506A00AAD278 /* NSDateFormatter.swift */; };
@@ -1800,7 +1801,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0730;
- LastUpgradeCheck = 0810;
+ LastUpgradeCheck = 0900;
ORGANIZATIONNAME = "Pete Schwamb";
TargetAttributes = {
430D64CA1CB855AB00FCA750 = {
@@ -1811,11 +1812,11 @@
};
43722FAD1CB9F7630038B7F2 = {
CreatedOnToolsVersion = 7.3;
- LastSwiftMigration = 0800;
+ LastSwiftMigration = 0900;
};
43722FB61CB9F7640038B7F2 = {
CreatedOnToolsVersion = 7.3;
- LastSwiftMigration = 0800;
+ LastSwiftMigration = 0900;
};
43C246921D8918AE0031F8D1 = {
CreatedOnToolsVersion = 8.0;
@@ -1823,14 +1824,14 @@
};
C10D9BC01C8269D500378342 = {
CreatedOnToolsVersion = 7.2.1;
- LastSwiftMigration = 0800;
+ LastSwiftMigration = 0900;
};
C10D9BC91C8269D500378342 = {
CreatedOnToolsVersion = 7.2.1;
- LastSwiftMigration = 0800;
+ LastSwiftMigration = 0900;
};
C12EA236198B436800309FA4 = {
- LastSwiftMigration = 0800;
+ LastSwiftMigration = 0900;
ProvisioningStyle = Automatic;
};
C12EA251198B436800309FA4 = {
@@ -1839,11 +1840,11 @@
};
C1B3830A1CD0665D00CE7782 = {
CreatedOnToolsVersion = 7.3;
- LastSwiftMigration = 0800;
+ LastSwiftMigration = 0900;
};
C1B383131CD0665D00CE7782 = {
CreatedOnToolsVersion = 7.3;
- LastSwiftMigration = 0800;
+ LastSwiftMigration = 0900;
};
};
};
@@ -2022,6 +2023,7 @@
buildActionMask = 2147483647;
files = (
2F962EBF1E678BAA0070EFBD /* PumpOpsSynchronousTests.swift in Sources */,
+ 43A9E50E1F6B865000307931 /* NSData.swift in Sources */,
2F962EC51E705C6E0070EFBD /* PumpOpsSynchronousBuildFromFramesTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -2418,11 +2420,11 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
- CURRENT_PROJECT_VERSION = 34;
+ CURRENT_PROJECT_VERSION = 35;
DEBUG_INFORMATION_FORMAT = dwarf;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
- DYLIB_CURRENT_VERSION = 34;
+ DYLIB_CURRENT_VERSION = 35;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
@@ -2446,11 +2448,11 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
COPY_PHASE_STRIP = NO;
- CURRENT_PROJECT_VERSION = 34;
+ CURRENT_PROJECT_VERSION = 35;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
- DYLIB_CURRENT_VERSION = 34;
+ DYLIB_CURRENT_VERSION = 35;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
@@ -2509,11 +2511,11 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
- CURRENT_PROJECT_VERSION = 34;
+ CURRENT_PROJECT_VERSION = 35;
DEBUG_INFORMATION_FORMAT = dwarf;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
- DYLIB_CURRENT_VERSION = 34;
+ DYLIB_CURRENT_VERSION = 35;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
@@ -2539,11 +2541,11 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
COPY_PHASE_STRIP = NO;
- CURRENT_PROJECT_VERSION = 34;
+ CURRENT_PROJECT_VERSION = 35;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
- DYLIB_CURRENT_VERSION = 34;
+ DYLIB_CURRENT_VERSION = 35;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
@@ -2574,7 +2576,6 @@
PRODUCT_BUNDLE_IDENTIFIER = com.rileylink.RileyLinkKitTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
- SWIFT_VERSION = 3.0;
};
name = Debug;
};
@@ -2593,7 +2594,6 @@
MTL_ENABLE_DEBUG_INFO = NO;
PRODUCT_BUNDLE_IDENTIFIER = com.rileylink.RileyLinkKitTests;
PRODUCT_NAME = "$(TARGET_NAME)";
- SWIFT_VERSION = 3.0;
};
name = Release;
};
@@ -2605,12 +2605,12 @@
CLANG_WARN_SUSPICIOUS_MOVES = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
- CURRENT_PROJECT_VERSION = 34;
+ CURRENT_PROJECT_VERSION = 35;
DEBUG_INFORMATION_FORMAT = dwarf;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
- DYLIB_CURRENT_VERSION = 34;
+ DYLIB_CURRENT_VERSION = 35;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Crypto/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
@@ -2633,12 +2633,12 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
COPY_PHASE_STRIP = NO;
- CURRENT_PROJECT_VERSION = 34;
+ CURRENT_PROJECT_VERSION = 35;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
- DYLIB_CURRENT_VERSION = 34;
+ DYLIB_CURRENT_VERSION = 35;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Crypto/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
@@ -2659,11 +2659,11 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
- CURRENT_PROJECT_VERSION = 34;
+ CURRENT_PROJECT_VERSION = 35;
DEBUG_INFORMATION_FORMAT = dwarf;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
- DYLIB_CURRENT_VERSION = 34;
+ DYLIB_CURRENT_VERSION = 35;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
@@ -2688,11 +2688,11 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
COPY_PHASE_STRIP = NO;
- CURRENT_PROJECT_VERSION = 34;
+ CURRENT_PROJECT_VERSION = 35;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
- DYLIB_CURRENT_VERSION = 34;
+ DYLIB_CURRENT_VERSION = 35;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
@@ -2752,19 +2752,25 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
- CURRENT_PROJECT_VERSION = 34;
+ CURRENT_PROJECT_VERSION = 35;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
@@ -2785,7 +2791,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 9.2;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
- SWIFT_VERSION = 3.0;
+ SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
WARNING_CFLAGS = "-Wall";
@@ -2800,19 +2806,25 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = YES;
- CURRENT_PROJECT_VERSION = 34;
+ CURRENT_PROJECT_VERSION = 35;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
@@ -2826,7 +2838,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 9.2;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
- SWIFT_VERSION = 3.0;
+ SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
@@ -2851,7 +2863,6 @@
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "RileyLink/RileyLink-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
- SWIFT_VERSION = 3.0;
WRAPPER_EXTENSION = app;
};
name = Debug;
@@ -2872,7 +2883,6 @@
PROVISIONING_PROFILE = "";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "RileyLink/RileyLink-Bridging-Header.h";
- SWIFT_VERSION = 3.0;
WRAPPER_EXTENSION = app;
};
name = Release;
@@ -2923,11 +2933,11 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
- CURRENT_PROJECT_VERSION = 34;
+ CURRENT_PROJECT_VERSION = 35;
DEBUG_INFORMATION_FORMAT = dwarf;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
- DYLIB_CURRENT_VERSION = 34;
+ DYLIB_CURRENT_VERSION = 35;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
@@ -2952,11 +2962,11 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
COPY_PHASE_STRIP = NO;
- CURRENT_PROJECT_VERSION = 34;
+ CURRENT_PROJECT_VERSION = 35;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
- DYLIB_CURRENT_VERSION = 34;
+ DYLIB_CURRENT_VERSION = 35;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
@@ -2986,7 +2996,6 @@
PRODUCT_BUNDLE_IDENTIFIER = com.rileylink.NightscoutUploadKitTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
- SWIFT_VERSION = 3.0;
};
name = Debug;
};
@@ -3005,7 +3014,6 @@
MTL_ENABLE_DEBUG_INFO = NO;
PRODUCT_BUNDLE_IDENTIFIER = com.rileylink.NightscoutUploadKitTests;
PRODUCT_NAME = "$(TARGET_NAME)";
- SWIFT_VERSION = 3.0;
};
name = Release;
};
diff --git a/RileyLink.xcodeproj/xcshareddata/xcschemes/Crypto.xcscheme b/RileyLink.xcodeproj/xcshareddata/xcschemes/Crypto.xcscheme
index 04fa069fc..54e731243 100644
--- a/RileyLink.xcodeproj/xcshareddata/xcschemes/Crypto.xcscheme
+++ b/RileyLink.xcodeproj/xcshareddata/xcschemes/Crypto.xcscheme
@@ -1,6 +1,6 @@
@@ -36,6 +37,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
diff --git a/RileyLink.xcodeproj/xcshareddata/xcschemes/MinimedKit.xcscheme b/RileyLink.xcodeproj/xcshareddata/xcschemes/MinimedKit.xcscheme
index 2990e0699..8ca49000e 100644
--- a/RileyLink.xcodeproj/xcshareddata/xcschemes/MinimedKit.xcscheme
+++ b/RileyLink.xcodeproj/xcshareddata/xcschemes/MinimedKit.xcscheme
@@ -1,6 +1,6 @@
@@ -110,6 +111,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
diff --git a/RileyLink.xcodeproj/xcshareddata/xcschemes/RileyLinkBLEKit.xcscheme b/RileyLink.xcodeproj/xcshareddata/xcschemes/RileyLinkBLEKit.xcscheme
index e9c1318cc..75b9ee9a8 100644
--- a/RileyLink.xcodeproj/xcshareddata/xcschemes/RileyLinkBLEKit.xcscheme
+++ b/RileyLink.xcodeproj/xcshareddata/xcschemes/RileyLinkBLEKit.xcscheme
@@ -1,6 +1,6 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 1.2.1
+ 1.2.2
CFBundleSignature
????
CFBundleVersion
diff --git a/RileyLinkBLEKit/Info.plist b/RileyLinkBLEKit/Info.plist
index ae2dbbbfb..0eb186c06 100644
--- a/RileyLinkBLEKit/Info.plist
+++ b/RileyLinkBLEKit/Info.plist
@@ -15,7 +15,7 @@
CFBundlePackageType
FMWK
CFBundleShortVersionString
- 1.2.1
+ 1.2.2
CFBundleSignature
????
CFBundleVersion
diff --git a/RileyLinkBLEKitTests/Info.plist b/RileyLinkBLEKitTests/Info.plist
index 783a6936e..e4ede6701 100644
--- a/RileyLinkBLEKitTests/Info.plist
+++ b/RileyLinkBLEKitTests/Info.plist
@@ -15,7 +15,7 @@
CFBundlePackageType
BNDL
CFBundleShortVersionString
- 1.2.1
+ 1.2.2
CFBundleSignature
????
CFBundleVersion
diff --git a/RileyLinkKit/Info.plist b/RileyLinkKit/Info.plist
index ae2dbbbfb..0eb186c06 100644
--- a/RileyLinkKit/Info.plist
+++ b/RileyLinkKit/Info.plist
@@ -15,7 +15,7 @@
CFBundlePackageType
FMWK
CFBundleShortVersionString
- 1.2.1
+ 1.2.2
CFBundleSignature
????
CFBundleVersion
diff --git a/RileyLinkKit/UI/CommandResponseViewController.swift b/RileyLinkKit/UI/CommandResponseViewController.swift
index 2d740ea73..f3c71ec62 100644
--- a/RileyLinkKit/UI/CommandResponseViewController.swift
+++ b/RileyLinkKit/UI/CommandResponseViewController.swift
@@ -53,7 +53,7 @@ class CommandResponseViewController: UIViewController, UIActivityItemSource {
return title ?? textView.text ?? ""
}
- func activityViewController(_ activityViewController: UIActivityViewController, itemForActivityType activityType: UIActivityType) -> Any? {
+ func activityViewController(_ activityViewController: UIActivityViewController, itemForActivityType activityType: UIActivityType?) -> Any? {
return textView.attributedText ?? ""
}
diff --git a/RileyLinkKitTests/Info.plist b/RileyLinkKitTests/Info.plist
index 783a6936e..e4ede6701 100644
--- a/RileyLinkKitTests/Info.plist
+++ b/RileyLinkKitTests/Info.plist
@@ -15,7 +15,7 @@
CFBundlePackageType
BNDL
CFBundleShortVersionString
- 1.2.1
+ 1.2.2
CFBundleSignature
????
CFBundleVersion
diff --git a/RileyLinkKitTests/PumpOpsSynchronousBuildFromFramesTests.swift b/RileyLinkKitTests/PumpOpsSynchronousBuildFromFramesTests.swift
index b809f61ce..c6da41ce0 100644
--- a/RileyLinkKitTests/PumpOpsSynchronousBuildFromFramesTests.swift
+++ b/RileyLinkKitTests/PumpOpsSynchronousBuildFromFramesTests.swift
@@ -191,7 +191,7 @@ class PumpOpsSynchronousBuildFromFramesTests: XCTestCase {
}
func buildPumpMessageFromFrame(_ frame: String) -> PumpMessage {
- let frameData: Data = dataFromHexString(frame)
+ let frameData = Data(hexadecimalString: frame)!
let getHistoryPageMessageBody = GetHistoryPageCarelinkMessageBody(rxData: frameData)!
let getHistoryPageMessage = PumpMessage(packetType: PacketType.carelink, address: self.pumpID, messageType: .getHistoryPage, messageBody: getHistoryPageMessageBody)
return getHistoryPageMessage
diff --git a/RileyLinkKitTests/PumpOpsSynchronousTests.swift b/RileyLinkKitTests/PumpOpsSynchronousTests.swift
index 664657711..978d8682b 100644
--- a/RileyLinkKitTests/PumpOpsSynchronousTests.swift
+++ b/RileyLinkKitTests/PumpOpsSynchronousTests.swift
@@ -261,26 +261,26 @@ class PumpOpsSynchronousTests: XCTestCase {
func createSquareBolusEvent2016() -> BolusNormalPumpEvent {
//2016-08-01 05:00:16 +000
let dateComponents = DateComponents(calendar: Calendar.current, timeZone: pumpState.timeZone, year: 2016, month: 8, day: 1, hour: 5, minute: 0, second: 16)
- let data = dataFromHexString("01009009600058008a344b1010")
+ let data = Data(hexadecimalString: "01009009600058008a344b1010")!
return BolusNormalPumpEvent(length: BolusNormalPumpEvent.calculateLength(pumpModel.larger), rawData: data, timestamp: dateComponents, unabsorbedInsulinRecord: nil, amount: 0.0, programmed: 0.0, unabsorbedInsulinTotal: 0.0, type: .square, duration: TimeInterval(minutes: 120))
}
func createSquareBolusEvent2010() -> BolusNormalPumpEvent {
//2010-08-01 05:00:16 +000
let dateComponents = DateComponents(calendar: Calendar.current, timeZone: pumpState.timeZone, year: 2010, month: 8, day: 1, hour: 5, minute: 0, second: 16)
- let data = dataFromHexString("01009000900058008a344b1010")
+ let data = Data(hexadecimalString: "01009000900058008a344b1010")!
return BolusNormalPumpEvent(length: BolusNormalPumpEvent.calculateLength(pumpModel.larger), rawData: data, timestamp: dateComponents, unabsorbedInsulinRecord: nil, amount: 0.0, programmed: 0.0, unabsorbedInsulinTotal: 0.0, type: .square, duration: TimeInterval(minutes: 120))
}
func createSquareBolusEvent(dateComponents: DateComponents) -> BolusNormalPumpEvent {
- let data = dataFromHexString(randomDataString(length: squareBolusDataLength))
+ let data = Data(hexadecimalString: randomDataString(length: squareBolusDataLength))!
return BolusNormalPumpEvent(length: BolusNormalPumpEvent.calculateLength(pumpModel.larger), rawData: data, timestamp: dateComponents, unabsorbedInsulinRecord: nil, amount: 0.0, programmed: 0.0, unabsorbedInsulinTotal: 0.0, type: .square, duration: TimeInterval(hours: 8))
}
func createBolusEvent2011() -> BolusNormalPumpEvent {
//2010-08-01 05:00:11 +000
let dateComponents = DateComponents(calendar: Calendar.current, timeZone: pumpState.timeZone, year: 2011, month: 8, day: 1, hour: 5, minute: 0, second: 16)
- let data = dataFromHexString("01009000900058008a344b10FF")
+ let data = Data(hexadecimalString: "01009000900058008a344b10FF")!
return BolusNormalPumpEvent(length: BolusNormalPumpEvent.calculateLength(pumpModel.larger), rawData: data, timestamp: dateComponents, unabsorbedInsulinRecord: nil, amount: 0.0, programmed: 0.0, unabsorbedInsulinTotal: 0.0, type: .normal, duration: TimeInterval(minutes: 120))
}
@@ -308,20 +308,6 @@ class PumpOpsSynchronousTests: XCTestCase {
}
}
-func dataFromHexString(_ hexString: String) -> Data {
- var data = Data()
- var hexString = hexString
- while(hexString.characters.count > 0) {
- let c: String = hexString.substring(to: hexString.index(hexString.startIndex, offsetBy: 2))
- hexString = hexString.substring(from: hexString.index(hexString.startIndex, offsetBy: 2))
- var ch: UInt32 = 0
- Scanner(string: c).scanHexInt32(&ch)
- var char = UInt8(ch)
- data.append(&char, count: 1)
- }
- return data
-}
-
// from comment at https://gist.github.com/szhernovoy/276e69eb90a0de84dd90
func randomDataString(length:Int) -> String {
let charSet = "abcdef0123456789"
diff --git a/RileyLinkTests/RileyLinkTests-Info.plist b/RileyLinkTests/RileyLinkTests-Info.plist
index 41a55f8b2..5bd2f9239 100644
--- a/RileyLinkTests/RileyLinkTests-Info.plist
+++ b/RileyLinkTests/RileyLinkTests-Info.plist
@@ -13,7 +13,7 @@
CFBundlePackageType
BNDL
CFBundleShortVersionString
- 1.2.1
+ 1.2.2
CFBundleSignature
????
CFBundleVersion