From cc041a9ee9f8926dffd121cd74aa39e1adb6afc4 Mon Sep 17 00:00:00 2001 From: Nathan Racklyeft Date: Sun, 22 May 2016 22:39:28 -0700 Subject: [PATCH 1/9] Updating crypto dependency to resolve warnings --- Cartfile | 2 +- Cartfile.resolved | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cartfile b/Cartfile index 77b4b3a3..32e37244 100644 --- a/Cartfile +++ b/Cartfile @@ -1 +1 @@ -github "loudnate/Crypto" "master" +github "loudnate/Crypto" "build-warnings" diff --git a/Cartfile.resolved b/Cartfile.resolved index 67c8f37e..1731a2a7 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1 +1 @@ -github "loudnate/Crypto" "3e9fd522eba2b95c648229f9804b34773bb340a0" +github "loudnate/Crypto" "ad37efb5d1d93221d99ec47f1a51adfd7a841bcd" From 9b7b79a3d0d0772a88c7313de4ce144f1e37986f Mon Sep 17 00:00:00 2001 From: Nathan Racklyeft Date: Sat, 4 Jun 2016 11:47:28 -0700 Subject: [PATCH 2/9] Bumping version --- xDripG5.xcodeproj/project.pbxproj | 8 ++++---- xDripG5/Info.plist | 2 +- xDripG5Tests/Info.plist | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/xDripG5.xcodeproj/project.pbxproj b/xDripG5.xcodeproj/project.pbxproj index 8a7a7fd8..4d057a32 100644 --- a/xDripG5.xcodeproj/project.pbxproj +++ b/xDripG5.xcodeproj/project.pbxproj @@ -368,7 +368,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 9; + CURRENT_PROJECT_VERSION = 10; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; @@ -416,7 +416,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 9; + CURRENT_PROJECT_VERSION = 10; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -444,7 +444,7 @@ CLANG_ENABLE_MODULES = YES; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 9; + DYLIB_CURRENT_VERSION = 10; DYLIB_INSTALL_NAME_BASE = "@rpath"; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -466,7 +466,7 @@ CLANG_ENABLE_MODULES = YES; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 9; + DYLIB_CURRENT_VERSION = 10; DYLIB_INSTALL_NAME_BASE = "@rpath"; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", diff --git a/xDripG5/Info.plist b/xDripG5/Info.plist index 2bb1ea9d..7c9f8bd3 100644 --- a/xDripG5/Info.plist +++ b/xDripG5/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 0.4.1 + 0.4.2 CFBundleSignature ???? CFBundleVersion diff --git a/xDripG5Tests/Info.plist b/xDripG5Tests/Info.plist index 39412c11..a6ae57f6 100644 --- a/xDripG5Tests/Info.plist +++ b/xDripG5Tests/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 0.4.1 + 0.4.2 CFBundleSignature ???? CFBundleVersion From 77cff35eaed81cdbe9953b2ae756b87ebd692e42 Mon Sep 17 00:00:00 2001 From: Nathan Racklyeft Date: Sat, 4 Jun 2016 13:51:30 -0700 Subject: [PATCH 3/9] Adding some more message decoding Thanks to @mthatcher for the help! --- xDripG5.xcodeproj/project.pbxproj | 22 ++++++++- xDripG5/Messages/SessionStartRxMessage.swift | 38 +++++++++++++++ xDripG5/Messages/SessionStartTxMessage.swift | 7 ++- xDripG5/Messages/SessionStopRxMessage.swift | 35 ++++++++++++++ xDripG5/Messages/SessionStopTxMessage.swift | 7 ++- .../Messages/TransmitterTimeRxMessage.swift | 18 +++---- xDripG5Tests/SessionStartRxMessageTests.swift | 44 +++++++++++++++++ xDripG5Tests/SessionStopRxMessageTests.swift | 44 +++++++++++++++++ .../TransmitterTimeRxMessageTests.swift | 47 +++++++++++++++++++ 9 files changed, 250 insertions(+), 12 deletions(-) create mode 100644 xDripG5/Messages/SessionStartRxMessage.swift create mode 100644 xDripG5/Messages/SessionStopRxMessage.swift create mode 100644 xDripG5Tests/SessionStartRxMessageTests.swift create mode 100644 xDripG5Tests/SessionStopRxMessageTests.swift create mode 100644 xDripG5Tests/TransmitterTimeRxMessageTests.swift diff --git a/xDripG5.xcodeproj/project.pbxproj b/xDripG5.xcodeproj/project.pbxproj index 4d057a32..7465e57b 100644 --- a/xDripG5.xcodeproj/project.pbxproj +++ b/xDripG5.xcodeproj/project.pbxproj @@ -39,6 +39,11 @@ 43CE7CDC1CA77468003CC1B0 /* TransmitterStatus.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43CE7CDB1CA77468003CC1B0 /* TransmitterStatus.swift */; }; 43DC87C01C8B509B005BC30D /* NSData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43DC87BF1C8B509B005BC30D /* NSData.swift */; }; 43DC87C21C8B520F005BC30D /* GlucoseRxMessageTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43DC87C11C8B520F005BC30D /* GlucoseRxMessageTests.swift */; }; + 43F82BCC1D035AA4006F5DD7 /* TransmitterTimeRxMessageTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43F82BCB1D035AA4006F5DD7 /* TransmitterTimeRxMessageTests.swift */; }; + 43F82BCE1D035D5C006F5DD7 /* SessionStartRxMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43F82BCD1D035D5C006F5DD7 /* SessionStartRxMessage.swift */; }; + 43F82BD01D035D68006F5DD7 /* SessionStopRxMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43F82BCF1D035D68006F5DD7 /* SessionStopRxMessage.swift */; }; + 43F82BD21D037040006F5DD7 /* SessionStopRxMessageTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43F82BD11D037040006F5DD7 /* SessionStopRxMessageTests.swift */; }; + 43F82BD41D037227006F5DD7 /* SessionStartRxMessageTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43F82BD31D037227006F5DD7 /* SessionStartRxMessageTests.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -98,6 +103,11 @@ 43CE7CDB1CA77468003CC1B0 /* TransmitterStatus.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TransmitterStatus.swift; sourceTree = ""; }; 43DC87BF1C8B509B005BC30D /* NSData.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NSData.swift; sourceTree = ""; }; 43DC87C11C8B520F005BC30D /* GlucoseRxMessageTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GlucoseRxMessageTests.swift; sourceTree = ""; }; + 43F82BCB1D035AA4006F5DD7 /* TransmitterTimeRxMessageTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TransmitterTimeRxMessageTests.swift; sourceTree = ""; }; + 43F82BCD1D035D5C006F5DD7 /* SessionStartRxMessage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SessionStartRxMessage.swift; sourceTree = ""; }; + 43F82BCF1D035D68006F5DD7 /* SessionStopRxMessage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SessionStopRxMessage.swift; sourceTree = ""; }; + 43F82BD11D037040006F5DD7 /* SessionStopRxMessageTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SessionStopRxMessageTests.swift; sourceTree = ""; }; + 43F82BD31D037227006F5DD7 /* SessionStartRxMessageTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SessionStartRxMessageTests.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -159,9 +169,12 @@ 43CABE011C3506F100005705 /* xDripG5Tests */ = { isa = PBXGroup; children = ( - 43CABE041C3506F100005705 /* Info.plist */, 43DC87C11C8B520F005BC30D /* GlucoseRxMessageTests.swift */, + 43CABE041C3506F100005705 /* Info.plist */, 43DC87BF1C8B509B005BC30D /* NSData.swift */, + 43F82BCB1D035AA4006F5DD7 /* TransmitterTimeRxMessageTests.swift */, + 43F82BD11D037040006F5DD7 /* SessionStopRxMessageTests.swift */, + 43F82BD31D037227006F5DD7 /* SessionStartRxMessageTests.swift */, ); path = xDripG5Tests; sourceTree = ""; @@ -182,7 +195,9 @@ 43CABE1D1C350B3D00005705 /* GlucoseRxMessage.swift */, 43CABE1E1C350B3D00005705 /* GlucoseTxMessage.swift */, 43CABE1F1C350B3D00005705 /* KeepAliveTxMessage.swift */, + 43F82BCD1D035D5C006F5DD7 /* SessionStartRxMessage.swift */, 43CE7CCD1CA73C22003CC1B0 /* SessionStartTxMessage.swift */, + 43F82BCF1D035D68006F5DD7 /* SessionStopRxMessage.swift */, 43CE7CCF1CA73C57003CC1B0 /* SessionStopTxMessage.swift */, 43CABE201C350B3D00005705 /* TransmitterMessage.swift */, 43CABE211C350B3D00005705 /* TransmitterTimeRxMessage.swift */, @@ -324,6 +339,8 @@ 43CABE2B1C350B3D00005705 /* KeepAliveTxMessage.swift in Sources */, 43CABE241C350B3D00005705 /* AuthChallengeTxMessage.swift in Sources */, 43CE7CD21CA73CBC003CC1B0 /* CalibrateGlucoseTxMessage.swift in Sources */, + 43F82BD01D035D68006F5DD7 /* SessionStopRxMessage.swift in Sources */, + 43F82BCE1D035D5C006F5DD7 /* SessionStartRxMessage.swift in Sources */, 43CABE251C350B3D00005705 /* AuthRequestTxMessage.swift in Sources */, 430D64C51CB7846A00FCA750 /* NSData+CRC.swift in Sources */, ); @@ -333,7 +350,10 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 43F82BCC1D035AA4006F5DD7 /* TransmitterTimeRxMessageTests.swift in Sources */, + 43F82BD41D037227006F5DD7 /* SessionStartRxMessageTests.swift in Sources */, 43DC87C01C8B509B005BC30D /* NSData.swift in Sources */, + 43F82BD21D037040006F5DD7 /* SessionStopRxMessageTests.swift in Sources */, 43DC87C21C8B520F005BC30D /* GlucoseRxMessageTests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/xDripG5/Messages/SessionStartRxMessage.swift b/xDripG5/Messages/SessionStartRxMessage.swift new file mode 100644 index 00000000..89abd3db --- /dev/null +++ b/xDripG5/Messages/SessionStartRxMessage.swift @@ -0,0 +1,38 @@ +// +// SessionStartRxMessage.swift +// xDripG5 +// +// Created by Nathan Racklyeft on 6/4/16. +// Copyright © 2016 Nathan Racklyeft. All rights reserved. +// + +import Foundation + + +struct SessionStartRxMessage { + static let opcode: UInt8 = 0x27 + let status: TransmitterStatus + let received: UInt8 + + // I've only seen examples of these 2 values matching + let requestedStartTime: UInt32 + let sessionStartTime: UInt32 + + let transmitterTime: UInt32 + + init?(data: NSData) { + guard data.length == 17 && data.crcValid() else { + return nil + } + + guard data[0] == self.dynamicType.opcode else { + return nil + } + + status = TransmitterStatus(rawValue: data[1]) + received = data[2] + requestedStartTime = data[3...6] + sessionStartTime = data[7...10] + transmitterTime = data[11...14] + } +} diff --git a/xDripG5/Messages/SessionStartTxMessage.swift b/xDripG5/Messages/SessionStartTxMessage.swift index 61bb6f06..05101a90 100644 --- a/xDripG5/Messages/SessionStartTxMessage.swift +++ b/xDripG5/Messages/SessionStartTxMessage.swift @@ -9,6 +9,11 @@ import Foundation -struct SessionStartTxMessage { +struct SessionStartTxMessage: TransmitterTxMessage { let opcode: UInt8 = 0x26 + let startTime: UInt32 + + var byteSequence: [Any] { + return [opcode, startTime] + } } diff --git a/xDripG5/Messages/SessionStopRxMessage.swift b/xDripG5/Messages/SessionStopRxMessage.swift new file mode 100644 index 00000000..a0a484f1 --- /dev/null +++ b/xDripG5/Messages/SessionStopRxMessage.swift @@ -0,0 +1,35 @@ +// +// SessionStopRxMessage.swift +// xDripG5 +// +// Created by Nathan Racklyeft on 6/4/16. +// Copyright © 2016 Nathan Racklyeft. All rights reserved. +// + +import Foundation + + +struct SessionStopRxMessage { + static let opcode: UInt8 = 0x29 + let status: TransmitterStatus + let received: UInt8 + let sessionStopTime: UInt32 + let sessionStartTime: UInt32 + let transmitterTime: UInt32 + + init?(data: NSData) { + guard data.length == 17 && data.crcValid() else { + return nil + } + + guard data[0] == self.dynamicType.opcode else { + return nil + } + + status = TransmitterStatus(rawValue: data[1]) + received = data[2] + sessionStopTime = data[3...6] + sessionStartTime = data[7...10] + transmitterTime = data[11...14] + } +} diff --git a/xDripG5/Messages/SessionStopTxMessage.swift b/xDripG5/Messages/SessionStopTxMessage.swift index 7cd4c91b..8b4526b7 100644 --- a/xDripG5/Messages/SessionStopTxMessage.swift +++ b/xDripG5/Messages/SessionStopTxMessage.swift @@ -9,6 +9,11 @@ import Foundation -struct SessionStopTxMessage { +struct SessionStopTxMessage: TransmitterTxMessage { let opcode: UInt8 = 0x28 + let stopTime: UInt32 + + var byteSequence: [Any] { + return [opcode, stopTime] + } } diff --git a/xDripG5/Messages/TransmitterTimeRxMessage.swift b/xDripG5/Messages/TransmitterTimeRxMessage.swift index 24ba0a4d..5b5c43b2 100644 --- a/xDripG5/Messages/TransmitterTimeRxMessage.swift +++ b/xDripG5/Messages/TransmitterTimeRxMessage.swift @@ -16,16 +16,16 @@ struct TransmitterTimeRxMessage: TransmitterRxMessage { let sessionStartTime: UInt32 init?(data: NSData) { - if data.length == 16 && data.crcValid() { - if data[0] == self.dynamicType.opcode { - status = TransmitterStatus(rawValue: data[1]) - currentTime = data[2...5] - sessionStartTime = data[6...9] - } else { - return nil - } - } else { + guard data.length == 16 && data.crcValid() else { return nil } + + guard data[0] == self.dynamicType.opcode else { + return nil + } + + status = TransmitterStatus(rawValue: data[1]) + currentTime = data[2...5] + sessionStartTime = data[6...9] } } \ No newline at end of file diff --git a/xDripG5Tests/SessionStartRxMessageTests.swift b/xDripG5Tests/SessionStartRxMessageTests.swift new file mode 100644 index 00000000..fdecce80 --- /dev/null +++ b/xDripG5Tests/SessionStartRxMessageTests.swift @@ -0,0 +1,44 @@ +// +// SessionStartRxMessageTests.swift +// xDripG5 +// +// Created by Nathan Racklyeft on 6/4/16. +// Copyright © 2016 Nathan Racklyeft. All rights reserved. +// + +import XCTest +@testable import xDripG5 + +/// Thanks to https://github.com/mthatcher for the fixtures! +class SessionStartRxMessageTests: XCTestCase { + + func testSuccessfulStart() { + var data = NSData(hexadecimalString: "2700014bf871004bf87100e9f8710095d9")! + var message = SessionStartRxMessage(data: data)! + + XCTAssertEqual(TransmitterStatus.OK, message.status) + XCTAssertEqual(1, message.received) + XCTAssertEqual(7469131, message.requestedStartTime) + XCTAssertEqual(7469131, message.sessionStartTime) + XCTAssertEqual(7469289, message.transmitterTime) + + data = NSData(hexadecimalString: "2700012bfd71002bfd710096fd71000f6a")! + message = SessionStartRxMessage(data: data)! + + XCTAssertEqual(TransmitterStatus.OK, message.status) + XCTAssertEqual(1, message.received) + XCTAssertEqual(7470379, message.requestedStartTime) + XCTAssertEqual(7470379, message.sessionStartTime) + XCTAssertEqual(7470486, message.transmitterTime) + + data = NSData(hexadecimalString: "2700017cff71007cff7100eeff7100aeed")! + message = SessionStartRxMessage(data: data)! + + XCTAssertEqual(TransmitterStatus.OK, message.status) + XCTAssertEqual(1, message.received) + XCTAssertEqual(7470972, message.requestedStartTime) + XCTAssertEqual(7470972, message.sessionStartTime) + XCTAssertEqual(7471086, message.transmitterTime) + } + +} diff --git a/xDripG5Tests/SessionStopRxMessageTests.swift b/xDripG5Tests/SessionStopRxMessageTests.swift new file mode 100644 index 00000000..77495019 --- /dev/null +++ b/xDripG5Tests/SessionStopRxMessageTests.swift @@ -0,0 +1,44 @@ +// +// SessionStopRxMessageTests.swift +// xDripG5 +// +// Created by Nathan Racklyeft on 6/4/16. +// Copyright © 2016 Nathan Racklyeft. All rights reserved. +// + +import XCTest +@testable import xDripG5 + +/// Thanks to https://github.com/mthatcher for the fixtures! +class SessionStopRxMessageTests: XCTestCase { + + func testSuccessfulStop() { + var data = NSData(hexadecimalString: "29000128027200ffffffff47027200ba85")! + var message = SessionStopRxMessage(data: data)! + + XCTAssertEqual(TransmitterStatus.OK, message.status) + XCTAssertEqual(1, message.received) + XCTAssertEqual(7471656, message.sessionStopTime) + XCTAssertEqual(0xffffffff, message.sessionStartTime) + XCTAssertEqual(7471687, message.transmitterTime) + + data = NSData(hexadecimalString: "2900013ffe7100ffffffffc2fe71008268")! + message = SessionStopRxMessage(data: data)! + + XCTAssertEqual(TransmitterStatus.OK, message.status) + XCTAssertEqual(1, message.received) + XCTAssertEqual(7470655, message.sessionStopTime) + XCTAssertEqual(0xffffffff, message.sessionStartTime) + XCTAssertEqual(7470786, message.transmitterTime) + + data = NSData(hexadecimalString: "290001f5fb7100ffffffff6afc7100fa8a")! + message = SessionStopRxMessage(data: data)! + + XCTAssertEqual(TransmitterStatus.OK, message.status) + XCTAssertEqual(1, message.received) + XCTAssertEqual(7470069, message.sessionStopTime) + XCTAssertEqual(0xffffffff, message.sessionStartTime) + XCTAssertEqual(7470186, message.transmitterTime) + } + +} diff --git a/xDripG5Tests/TransmitterTimeRxMessageTests.swift b/xDripG5Tests/TransmitterTimeRxMessageTests.swift new file mode 100644 index 00000000..b1bf22dc --- /dev/null +++ b/xDripG5Tests/TransmitterTimeRxMessageTests.swift @@ -0,0 +1,47 @@ +// +// TransmitterTimeRxMessageTests.swift +// xDripG5 +// +// Created by Nathan Racklyeft on 6/4/16. +// Copyright © 2016 Nathan Racklyeft. All rights reserved. +// + +import XCTest +@testable import xDripG5 + +/// Thanks to https://github.com/mthatcher for the fixtures! +class TransmitterTimeRxMessageTests: XCTestCase { + + func testNoSession() { + var data = NSData(hexadecimalString: "2500e8f87100ffffffff010000000a70")! + var message = TransmitterTimeRxMessage(data: data)! + + XCTAssertEqual(TransmitterStatus.OK, message.status) + XCTAssertEqual(7469288, message.currentTime) + XCTAssertEqual(0xffffffff, message.sessionStartTime) + + data = NSData(hexadecimalString: "250096fd7100ffffffff01000000226d")! + message = TransmitterTimeRxMessage(data: data)! + + XCTAssertEqual(TransmitterStatus.OK, message.status) + XCTAssertEqual(7470486, message.currentTime) + XCTAssertEqual(0xffffffff, message.sessionStartTime) + + data = NSData(hexadecimalString: "2500eeff7100ffffffff010000008952")! + message = TransmitterTimeRxMessage(data: data)! + + XCTAssertEqual(TransmitterStatus.OK, message.status) + XCTAssertEqual(7471086, message.currentTime) + XCTAssertEqual(0xffffffff, message.sessionStartTime) + } + + func testInSession() { + let data = NSData(hexadecimalString: "2500470272007cff710001000000fa1d")! + let message = TransmitterTimeRxMessage(data: data)! + + XCTAssertEqual(TransmitterStatus.OK, message.status) + XCTAssertEqual(7471687, message.currentTime) + XCTAssertEqual(7470972, message.sessionStartTime) + + } +} From 382b80d4cf7e4a6038f3653e9c4ba20f4a92ef05 Mon Sep 17 00:00:00 2001 From: Nathan Racklyeft Date: Fri, 17 Jun 2016 18:06:04 -0700 Subject: [PATCH 4/9] Updating Crypto ref --- Cartfile | 2 +- Cartfile.resolved | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cartfile b/Cartfile index 32e37244..77b4b3a3 100644 --- a/Cartfile +++ b/Cartfile @@ -1 +1 @@ -github "loudnate/Crypto" "build-warnings" +github "loudnate/Crypto" "master" diff --git a/Cartfile.resolved b/Cartfile.resolved index 1731a2a7..31ffa277 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1 +1 @@ -github "loudnate/Crypto" "ad37efb5d1d93221d99ec47f1a51adfd7a841bcd" +github "loudnate/Crypto" "13fee45175b88629aeabe60b4b4fc3daf86fa0a3" From ab0b373212ed6336bc042a111a3674796623bb30 Mon Sep 17 00:00:00 2001 From: Nathan Racklyeft Date: Fri, 17 Jun 2016 19:21:34 -0700 Subject: [PATCH 5/9] Remove external dependencies --- Cartfile | 1 - Cartfile.resolved | 1 - Example/Podfile.lock | 9 ++---- Example/xDripG5.xcodeproj/project.pbxproj | 18 ++++++------ Pod/xDripG5.h | 3 +- xDripG5.podspec | 5 ++-- xDripG5.xcodeproj/project.pbxproj | 34 +++++++++-------------- xDripG5/AESCrypt.h | 19 +++++++++++++ xDripG5/AESCrypt.m | 33 ++++++++++++++++++++++ xDripG5/Info.plist | 2 +- xDripG5/Transmitter.swift | 22 +++------------ xDripG5/xDripG5.h | 2 +- xDripG5Tests/Info.plist | 2 +- 13 files changed, 88 insertions(+), 63 deletions(-) delete mode 100644 Cartfile delete mode 100644 Cartfile.resolved create mode 100644 xDripG5/AESCrypt.h create mode 100644 xDripG5/AESCrypt.m diff --git a/Cartfile b/Cartfile deleted file mode 100644 index 77b4b3a3..00000000 --- a/Cartfile +++ /dev/null @@ -1 +0,0 @@ -github "loudnate/Crypto" "master" diff --git a/Cartfile.resolved b/Cartfile.resolved deleted file mode 100644 index 31ffa277..00000000 --- a/Cartfile.resolved +++ /dev/null @@ -1 +0,0 @@ -github "loudnate/Crypto" "13fee45175b88629aeabe60b4b4fc3daf86fa0a3" diff --git a/Example/Podfile.lock b/Example/Podfile.lock index 88ce2e8e..24aaa36b 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -1,7 +1,5 @@ PODS: - - RNCryptor (4.0.0) - - xDripG5 (0.4.0): - - RNCryptor (~> 4.0) + - xDripG5 (0.4.1) DEPENDENCIES: - xDripG5 (from `../`) @@ -11,9 +9,8 @@ EXTERNAL SOURCES: :path: ../ SPEC CHECKSUMS: - RNCryptor: 59d6483908115af5c12b884db23392024e52a5fe - xDripG5: ebd5b967768e7823b80c504b87256fd5dd55d469 + xDripG5: 1e141a17dfdadc6b2b65868ba621ce0f63d7bbb6 PODFILE CHECKSUM: 6b30cba971694d5258509315fb52eb645c9bc5e3 -COCOAPODS: 1.0.0 +COCOAPODS: 1.0.1 diff --git a/Example/xDripG5.xcodeproj/project.pbxproj b/Example/xDripG5.xcodeproj/project.pbxproj index 10bb1f28..10708edc 100644 --- a/Example/xDripG5.xcodeproj/project.pbxproj +++ b/Example/xDripG5.xcodeproj/project.pbxproj @@ -121,12 +121,12 @@ isa = PBXNativeTarget; buildConfigurationList = 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "xDripG5_Example" */; buildPhases = ( - 1A9A76347F38888700DA6FA9 /* 📦 Check Pods Manifest.lock */, + 1A9A76347F38888700DA6FA9 /* [CP] Check Pods Manifest.lock */, 607FACCC1AFB9204008FA782 /* Sources */, 607FACCD1AFB9204008FA782 /* Frameworks */, 607FACCE1AFB9204008FA782 /* Resources */, - 4B912A9AD16911278D3DAA5C /* 📦 Embed Pods Frameworks */, - 2FC4228A9369221D367ED688 /* 📦 Copy Pods Resources */, + 4B912A9AD16911278D3DAA5C /* [CP] Embed Pods Frameworks */, + 2FC4228A9369221D367ED688 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -189,14 +189,14 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 1A9A76347F38888700DA6FA9 /* 📦 Check Pods Manifest.lock */ = { + 1A9A76347F38888700DA6FA9 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "📦 Check Pods Manifest.lock"; + name = "[CP] Check Pods Manifest.lock"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; @@ -204,14 +204,14 @@ shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; showEnvVarsInLog = 0; }; - 2FC4228A9369221D367ED688 /* 📦 Copy Pods Resources */ = { + 2FC4228A9369221D367ED688 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "📦 Copy Pods Resources"; + name = "[CP] Copy Pods Resources"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; @@ -219,14 +219,14 @@ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-xDripG5_Example/Pods-xDripG5_Example-resources.sh\"\n"; showEnvVarsInLog = 0; }; - 4B912A9AD16911278D3DAA5C /* 📦 Embed Pods Frameworks */ = { + 4B912A9AD16911278D3DAA5C /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "📦 Embed Pods Frameworks"; + name = "[CP] Embed Pods Frameworks"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; diff --git a/Pod/xDripG5.h b/Pod/xDripG5.h index b2fb2008..63dab445 100644 --- a/Pod/xDripG5.h +++ b/Pod/xDripG5.h @@ -6,4 +6,5 @@ // Copyright © 2015 Nathan Racklyeft. All rights reserved. // -@import RNCryptor; + +#import \ No newline at end of file diff --git a/xDripG5.podspec b/xDripG5.podspec index 3e698922..cc71cc89 100644 --- a/xDripG5.podspec +++ b/xDripG5.podspec @@ -20,9 +20,8 @@ Please note this project is neither created nor backed by Dexcom, Inc. Use of th s.platform = :ios, '9.3' s.requires_arc = true - s.source_files = ['xDripG5/**/*.swift', 'Pod/*.h'] - s.public_header_files = 'Pod/*.h' + s.source_files = ['xDripG5/**/*.swift', 'xDripG5/AESCrypt.{h,m}', 'Pod/*.h'] + s.public_header_files = ['Pod/*.h', 'xDripG5/AESCrypt.h'] s.frameworks = 'CoreBluetooth' - s.dependency 'RNCryptor', '~> 4.0' end diff --git a/xDripG5.xcodeproj/project.pbxproj b/xDripG5.xcodeproj/project.pbxproj index 7465e57b..638c3494 100644 --- a/xDripG5.xcodeproj/project.pbxproj +++ b/xDripG5.xcodeproj/project.pbxproj @@ -8,9 +8,6 @@ /* Begin PBXBuildFile section */ 430D64C51CB7846A00FCA750 /* NSData+CRC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 430D64C41CB7846A00FCA750 /* NSData+CRC.swift */; }; - 4337D7EB1C351B0B0016851F /* CommonCrypto.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4337D7EA1C351B0B0016851F /* CommonCrypto.framework */; }; - 4337D7ED1C3521210016851F /* CommonCrypto.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4337D7EA1C351B0B0016851F /* CommonCrypto.framework */; }; - 434FD68A1C3523A7000B4E2E /* CommonCrypto.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4337D7EA1C351B0B0016851F /* CommonCrypto.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 43CABDF71C3506F100005705 /* xDripG5.h in Headers */ = {isa = PBXBuildFile; fileRef = 43CABDF61C3506F100005705 /* xDripG5.h */; settings = {ATTRIBUTES = (Public, ); }; }; 43CABDFE1C3506F100005705 /* xDripG5.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 43CABDF31C3506F100005705 /* xDripG5.framework */; }; 43CABE121C350B2800005705 /* BluetoothManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43CABE0E1C350B2800005705 /* BluetoothManager.swift */; }; @@ -39,6 +36,8 @@ 43CE7CDC1CA77468003CC1B0 /* TransmitterStatus.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43CE7CDB1CA77468003CC1B0 /* TransmitterStatus.swift */; }; 43DC87C01C8B509B005BC30D /* NSData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43DC87BF1C8B509B005BC30D /* NSData.swift */; }; 43DC87C21C8B520F005BC30D /* GlucoseRxMessageTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43DC87C11C8B520F005BC30D /* GlucoseRxMessageTests.swift */; }; + 43EEA7111D14DC0800CBBDA0 /* AESCrypt.h in Headers */ = {isa = PBXBuildFile; fileRef = 43EEA70F1D14DC0800CBBDA0 /* AESCrypt.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 43EEA7121D14DC0800CBBDA0 /* AESCrypt.m in Sources */ = {isa = PBXBuildFile; fileRef = 43EEA7101D14DC0800CBBDA0 /* AESCrypt.m */; }; 43F82BCC1D035AA4006F5DD7 /* TransmitterTimeRxMessageTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43F82BCB1D035AA4006F5DD7 /* TransmitterTimeRxMessageTests.swift */; }; 43F82BCE1D035D5C006F5DD7 /* SessionStartRxMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43F82BCD1D035D5C006F5DD7 /* SessionStartRxMessage.swift */; }; 43F82BD01D035D68006F5DD7 /* SessionStopRxMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43F82BCF1D035D68006F5DD7 /* SessionStopRxMessage.swift */; }; @@ -63,7 +62,6 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( - 434FD68A1C3523A7000B4E2E /* CommonCrypto.framework in CopyFiles */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -71,7 +69,6 @@ /* Begin PBXFileReference section */ 430D64C41CB7846A00FCA750 /* NSData+CRC.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSData+CRC.swift"; sourceTree = ""; }; - 4337D7EA1C351B0B0016851F /* CommonCrypto.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CommonCrypto.framework; path = Carthage/Build/iOS/CommonCrypto.framework; sourceTree = ""; }; 43CABDF31C3506F100005705 /* xDripG5.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = xDripG5.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 43CABDF61C3506F100005705 /* xDripG5.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = xDripG5.h; sourceTree = ""; }; 43CABDF81C3506F100005705 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -103,6 +100,8 @@ 43CE7CDB1CA77468003CC1B0 /* TransmitterStatus.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TransmitterStatus.swift; sourceTree = ""; }; 43DC87BF1C8B509B005BC30D /* NSData.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NSData.swift; sourceTree = ""; }; 43DC87C11C8B520F005BC30D /* GlucoseRxMessageTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GlucoseRxMessageTests.swift; sourceTree = ""; }; + 43EEA70F1D14DC0800CBBDA0 /* AESCrypt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AESCrypt.h; sourceTree = ""; }; + 43EEA7101D14DC0800CBBDA0 /* AESCrypt.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AESCrypt.m; sourceTree = ""; }; 43F82BCB1D035AA4006F5DD7 /* TransmitterTimeRxMessageTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TransmitterTimeRxMessageTests.swift; sourceTree = ""; }; 43F82BCD1D035D5C006F5DD7 /* SessionStartRxMessage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SessionStartRxMessage.swift; sourceTree = ""; }; 43F82BCF1D035D68006F5DD7 /* SessionStopRxMessage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SessionStopRxMessage.swift; sourceTree = ""; }; @@ -115,7 +114,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 4337D7EB1C351B0B0016851F /* CommonCrypto.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -123,7 +121,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 4337D7ED1C3521210016851F /* CommonCrypto.framework in Frameworks */, 43CABDFE1C3506F100005705 /* xDripG5.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -134,7 +131,6 @@ 43CABDE91C3506F100005705 = { isa = PBXGroup; children = ( - 4337D7EA1C351B0B0016851F /* CommonCrypto.framework */, 43CABDF51C3506F100005705 /* xDripG5 */, 43CABE011C3506F100005705 /* xDripG5Tests */, 43CABDF41C3506F100005705 /* Products */, @@ -162,6 +158,8 @@ 43CABE111C350B2800005705 /* Transmitter.swift */, 43CE7CDB1CA77468003CC1B0 /* TransmitterStatus.swift */, 43CABE161C350B2E00005705 /* Messages */, + 43EEA70F1D14DC0800CBBDA0 /* AESCrypt.h */, + 43EEA7101D14DC0800CBBDA0 /* AESCrypt.m */, ); path = xDripG5; sourceTree = ""; @@ -215,6 +213,7 @@ buildActionMask = 2147483647; files = ( 43CABDF71C3506F100005705 /* xDripG5.h in Headers */, + 43EEA7111D14DC0800CBBDA0 /* AESCrypt.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -264,7 +263,7 @@ 43CABDEA1C3506F100005705 /* Project object */ = { isa = PBXProject; attributes = { - LastSwiftUpdateCheck = 0720; + LastSwiftUpdateCheck = 0730; LastUpgradeCheck = 0720; ORGANIZATIONNAME = "Nathan Racklyeft"; TargetAttributes = { @@ -328,6 +327,7 @@ 43CABE2A1C350B3D00005705 /* GlucoseTxMessage.swift in Sources */, 43CE7CC81CA73AEB003CC1B0 /* FirmwareVersionTxMessage.swift in Sources */, 43CE7CCC1CA73BCC003CC1B0 /* BatteryStatusTxMessage.swift in Sources */, + 43EEA7121D14DC0800CBBDA0 /* AESCrypt.m in Sources */, 43CE7CCE1CA73C22003CC1B0 /* SessionStartTxMessage.swift in Sources */, 43CABE2E1C350B3D00005705 /* TransmitterTimeTxMessage.swift in Sources */, 43CABE2C1C350B3D00005705 /* TransmitterMessage.swift in Sources */, @@ -388,7 +388,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 10; + CURRENT_PROJECT_VERSION = 11; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; @@ -436,7 +436,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 10; + CURRENT_PROJECT_VERSION = 11; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -464,12 +464,8 @@ CLANG_ENABLE_MODULES = YES; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 10; + DYLIB_CURRENT_VERSION = 11; DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - ); INFOPLIST_FILE = xDripG5/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; @@ -486,12 +482,8 @@ CLANG_ENABLE_MODULES = YES; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 10; + DYLIB_CURRENT_VERSION = 11; DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - ); INFOPLIST_FILE = xDripG5/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; diff --git a/xDripG5/AESCrypt.h b/xDripG5/AESCrypt.h new file mode 100644 index 00000000..357420d6 --- /dev/null +++ b/xDripG5/AESCrypt.h @@ -0,0 +1,19 @@ +// +// AESCrypt.h +// xDripG5 +// +// Created by Nate Racklyeft on 6/17/16. +// Copyright © 2016 Nathan Racklyeft. All rights reserved. +// + +#import + +@interface AESCrypt : NSObject + +NS_ASSUME_NONNULL_BEGIN + ++ (nullable NSData *)encryptData:(NSData *)data usingKey:(NSData *)key error:(NSError **)error; + +NS_ASSUME_NONNULL_END + +@end diff --git a/xDripG5/AESCrypt.m b/xDripG5/AESCrypt.m new file mode 100644 index 00000000..1c3850b6 --- /dev/null +++ b/xDripG5/AESCrypt.m @@ -0,0 +1,33 @@ +// +// AESCrypt.m +// xDripG5 +// +// Created by Nate Racklyeft on 6/17/16. +// Copyright © 2016 Nathan Racklyeft. All rights reserved. +// + +#import "AESCrypt.h" +#import + +@implementation AESCrypt + ++ (NSData *)encryptData:(NSData *)data usingKey:(NSData *)key error:(NSError * _Nullable __autoreleasing *)error +{ + NSMutableData *dataOut = [[NSMutableData alloc] initWithCapacity:16]; + + CCCryptorStatus status = CCCrypt(kCCEncrypt, + kCCAlgorithmAES, + kCCOptionECBMode, + key.bytes, + key.length, + NULL, + data.bytes, + data.length, + dataOut.mutableBytes, + dataOut.length, + NULL); + + return status == kCCSuccess ? dataOut : nil; +} + +@end diff --git a/xDripG5/Info.plist b/xDripG5/Info.plist index 7c9f8bd3..288c341b 100644 --- a/xDripG5/Info.plist +++ b/xDripG5/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 0.4.2 + 0.5.0 CFBundleSignature ???? CFBundleVersion diff --git a/xDripG5/Transmitter.swift b/xDripG5/Transmitter.swift index f5642b3a..d1e020cc 100644 --- a/xDripG5/Transmitter.swift +++ b/xDripG5/Transmitter.swift @@ -284,31 +284,17 @@ public class Transmitter: BluetoothManagerDelegate { } private func calculateHash(data: NSData) -> NSData? { - guard data.length == 8, let key = cryptKey, outData = NSMutableData(length: 16) else { + guard data.length == 8, let key = cryptKey else { return nil } let doubleData = NSMutableData(data: data) doubleData.appendData(data) - let status = CCCrypt( - 0, // kCCEncrypt - 0, // kCCAlgorithmAES - 0x0002, // kCCOptionECBMode - key.bytes, - key.length, - nil, - doubleData.bytes, - doubleData.length, - outData.mutableBytes, - outData.length, - nil - ) - - if status != 0 { // kCCSuccess + guard let outData = try? AESCrypt.encryptData(doubleData, usingKey: key) else { return nil - } else { - return outData[0..<8] } + + return outData[0..<8] } } \ No newline at end of file diff --git a/xDripG5/xDripG5.h b/xDripG5/xDripG5.h index 1ac6a8b8..3b949160 100644 --- a/xDripG5/xDripG5.h +++ b/xDripG5/xDripG5.h @@ -7,7 +7,7 @@ // #import -@import CommonCrypto; +#import //! Project version number for xDripG5. FOUNDATION_EXPORT double xDripG5VersionNumber; diff --git a/xDripG5Tests/Info.plist b/xDripG5Tests/Info.plist index a6ae57f6..94b6ed95 100644 --- a/xDripG5Tests/Info.plist +++ b/xDripG5Tests/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 0.4.2 + 0.5.0 CFBundleSignature ???? CFBundleVersion From 9586691d44e3a7601471dd3fe9952b79a77c0dd5 Mon Sep 17 00:00:00 2001 From: Nathan Racklyeft Date: Fri, 17 Jun 2016 19:24:53 -0700 Subject: [PATCH 6/9] Fix travis --- .travis.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1cdc8320..1ba53645 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,8 +3,6 @@ osx_image: xcode7.3 #before_install: # - brew update # - brew install carthage -before_script: - - carthage bootstrap before_deploy: - carthage build --no-skip-current From f36435a0cd3de8be3459afe9a8bee8487f9f8f71 Mon Sep 17 00:00:00 2001 From: Nathan Racklyeft Date: Fri, 17 Jun 2016 19:27:10 -0700 Subject: [PATCH 7/9] Updating podspec version --- xDripG5.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xDripG5.podspec b/xDripG5.podspec index cc71cc89..5151c924 100644 --- a/xDripG5.podspec +++ b/xDripG5.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "xDripG5" - s.version = "0.4.1" + s.version = "0.5.0" s.summary = "An interface for communicating with the G5 glucose transmitter over Bluetooth." s.description = <<-DESC From ca34019e3dfcf8292b9c7baf0613e847ee14b872 Mon Sep 17 00:00:00 2001 From: Nathan Racklyeft Date: Fri, 17 Jun 2016 19:30:50 -0700 Subject: [PATCH 8/9] More travis fixes --- .travis.yml | 14 +++++--------- Example/Podfile.lock | 4 ++-- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1ba53645..7a0a66ed 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,20 +1,16 @@ language: objective-c osx_image: xcode7.3 -#before_install: -# - brew update -# - brew install carthage before_deploy: - carthage build --no-skip-current cache: cocoapods -# podfile: Example/Podfile +podfile: Example/Podfile -# before_install: +before_install: # - gem install cocoapods # Since Travis is not always on latest version -# - pod install --project-directory=Example +- pod install --project-directory=Example script: -# TODO: Build the CocoaPods project -# - set -o pipefail && xcodebuild -workspace Example/xDripG5.xcworkspace -scheme xDripG5-Example -sdk iphonesimulator -destination name="iPhone 6" ONLY_ACTIVE_ARCH=NO | xcpretty +- set -o pipefail && xcodebuild -workspace Example/xDripG5.xcworkspace -scheme xDripG5-Example -sdk iphonesimulator -destination name="iPhone 6" ONLY_ACTIVE_ARCH=NO | xcpretty - xctool -project xDripG5.xcodeproj -scheme xDripG5 -sdk iphonesimulator9.3 build test -- pod lib lint --allow-warnings +- pod lib lint diff --git a/Example/Podfile.lock b/Example/Podfile.lock index 24aaa36b..9eb2715d 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -1,5 +1,5 @@ PODS: - - xDripG5 (0.4.1) + - xDripG5 (0.5.0) DEPENDENCIES: - xDripG5 (from `../`) @@ -9,7 +9,7 @@ EXTERNAL SOURCES: :path: ../ SPEC CHECKSUMS: - xDripG5: 1e141a17dfdadc6b2b65868ba621ce0f63d7bbb6 + xDripG5: 0e6b96df757adbd51d5aa24c1ef63cb25a2d2b72 PODFILE CHECKSUM: 6b30cba971694d5258509315fb52eb645c9bc5e3 From 5c8fb32cef998168f89e815ba473e35b3954c663 Mon Sep 17 00:00:00 2001 From: Nathan Racklyeft Date: Fri, 17 Jun 2016 19:36:09 -0700 Subject: [PATCH 9/9] Try updating cocoapods --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7a0a66ed..4c1311b1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ cache: cocoapods podfile: Example/Podfile before_install: -# - gem install cocoapods # Since Travis is not always on latest version +- gem install cocoapods # Since Travis is not always on latest version - pod install --project-directory=Example script: