Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@ script:
# Build cocoapods example project
# - set -o pipefail && xcodebuild -workspace Example/xDripG5.xcworkspace -scheme xDripG5-Example -sdk iphonesimulator -destination name="iPhone SE" ONLY_ACTIVE_ARCH=NO | xcpretty
# Build Travis project and run tests
- xcodebuild -project xDripG5.xcodeproj -scheme xDripG5 build -destination name="iPhone SE" test
- xcodebuild -project CGMBLEKit.xcodeproj -scheme CGMBLEKit build -destination name="iPhone SE" test
- xcodebuild -project CGMBLEKit.xcodeproj -scheme "CGMBLEKit Example" build -destination name="iPhone SE"
- xcodebuild -project CGMBLEKit.xcodeproj -scheme ResetTransmitter build -destination name="iPhone SE"
# - pod lib lint
2 changes: 1 addition & 1 deletion CGMBLEKit Example/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

import UIKit
import xDripG5
import CGMBLEKit
import CoreBluetooth

@UIApplicationMain
Expand Down
2 changes: 1 addition & 1 deletion CGMBLEKit Example/CommandQueue.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

import Foundation
import xDripG5
import CGMBLEKit


class CommandQueue {
Expand Down
2 changes: 1 addition & 1 deletion CGMBLEKit Example/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import UIKit
import HealthKit
import xDripG5
import CGMBLEKit

class ViewController: UIViewController, TransmitterDelegate, UITextFieldDelegate {

Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "43CABDF21C3506F100005705"
BuildableName = "xDripG5.framework"
BlueprintName = "xDripG5"
ReferencedContainer = "container:xDripG5.xcodeproj">
BuildableName = "CGMBLEKit.framework"
BlueprintName = "CGMBLEKit"
ReferencedContainer = "container:CGMBLEKit.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
Expand All @@ -33,19 +33,19 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "43CABDFC1C3506F100005705"
BuildableName = "xDripG5Tests.xctest"
BlueprintName = "xDripG5Tests"
ReferencedContainer = "container:xDripG5.xcodeproj">
BuildableName = "CGMBLEKitTests.xctest"
BlueprintName = "CGMBLEKitTests"
ReferencedContainer = "container:CGMBLEKit.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "43CABDF21C3506F100005705"
BuildableName = "xDripG5.framework"
BlueprintName = "xDripG5"
ReferencedContainer = "container:xDripG5.xcodeproj">
BuildableName = "CGMBLEKit.framework"
BlueprintName = "CGMBLEKit"
ReferencedContainer = "container:CGMBLEKit.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
Expand All @@ -65,9 +65,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "43CABDF21C3506F100005705"
BuildableName = "xDripG5.framework"
BlueprintName = "xDripG5"
ReferencedContainer = "container:xDripG5.xcodeproj">
BuildableName = "CGMBLEKit.framework"
BlueprintName = "CGMBLEKit"
ReferencedContainer = "container:CGMBLEKit.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
Expand All @@ -83,9 +83,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "43CABDF21C3506F100005705"
BuildableName = "xDripG5.framework"
BlueprintName = "xDripG5"
ReferencedContainer = "container:xDripG5.xcodeproj">
BuildableName = "CGMBLEKit.framework"
BlueprintName = "CGMBLEKit"
ReferencedContainer = "container:CGMBLEKit.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@ class BluetoothManager: NSObject {

// MARK: - GCD Management

private let managerQueue = DispatchQueue(label: "com.loudnate.xDripG5.bluetoothManagerQueue", qos: .utility)
private let managerQueue = DispatchQueue(label: "com.loudnate.CGMBLEKit.bluetoothManagerQueue", qos: .utility)

override init() {
super.init()

manager = CBCentralManager(delegate: self, queue: managerQueue, options: [CBCentralManagerOptionRestoreIdentifierKey: "com.loudnate.xDripG5"])
manager = CBCentralManager(delegate: self, queue: managerQueue, options: [CBCentralManagerOptionRestoreIdentifierKey: "com.loudnate.CGMBLEKit"])
}

// MARK: - Actions
Expand Down
File renamed without changes.
File renamed without changes.
17 changes: 17 additions & 0 deletions CGMBLEKit/CGMBLEKit.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//
// CGMBLEKit.h
// xDripG5
//
// Created by Nathan Racklyeft on 12/30/15.
// Copyright © 2015 Nathan Racklyeft. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <CGMBLEKit/AESCrypt.h>

//! Project version number for CGMBLEKIt.
FOUNDATION_EXPORT double CGMBLEKitVersionNumber;

//! Project version string for CGMBLEKit.
FOUNDATION_EXPORT const unsigned char CGMBLEKitVersionString[];

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion xDripG5/OSLog.swift → CGMBLEKit/OSLog.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import os.log

extension OSLog {
convenience init(category: String) {
self.init(subsystem: "com.loopkit.xDripG5", category: category)
self.init(subsystem: "com.loopkit.CGMBLEKit", category: category)
}

func debug(_ message: StaticString, _ args: CVarArg...) {
Expand Down
1 change: 1 addition & 0 deletions xDripG5/Opcode.swift → CGMBLEKit/Opcode.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// Copyright © 2018 LoopKit Authors. All rights reserved.
//

import Foundation

enum Opcode: UInt8 {
// Auth
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion xDripG5/Transmitter.swift → CGMBLEKit/Transmitter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public final class Transmitter: BluetoothManagerDelegate {

private let bluetoothManager = BluetoothManager()

private let delegateQueue = DispatchQueue(label: "com.loudnate.xDripG5.delegateQueue", qos: .utility)
private let delegateQueue = DispatchQueue(label: "com.loudnate.CGMBLEKit.delegateQueue", qos: .utility)

public init(id: String, passiveModeEnabled: Bool = false) {
self.id = TransmitterID(id: id)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,11 @@
//

import XCTest
@testable import xDripG5
@testable import CGMBLEKit


class CalibrationDataRxMessageTests: XCTestCase {

override func setUp() {
super.setUp()
// Put setup code here. This method is called before the invocation of each test method in the class.
}

override func tearDown() {
// Put teardown code here. This method is called after the invocation of each test method in the class.
super.tearDown()
}

func testMessage() {
let data = Data(hexadecimalString: "33002b290090012900ae00800050e929001225")!
XCTAssertNotNil(CalibrationDataRxMessage(data: data))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//

import XCTest
@testable import xDripG5
@testable import CGMBLEKit

class GlucoseBackfillMessageTests: XCTestCase {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

import XCTest
@testable import xDripG5
@testable import CGMBLEKit


class GlucoseRxMessageTests: XCTestCase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import XCTest
import HealthKit
@testable import xDripG5
@testable import CGMBLEKit

class GlucoseTests: XCTestCase {

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

import XCTest
@testable import xDripG5
@testable import CGMBLEKit

/// Thanks to https://github.com/mthatcher for the fixtures!
class SessionStartRxMessageTests: XCTestCase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

import XCTest
@testable import xDripG5
@testable import CGMBLEKit

/// Thanks to https://github.com/mthatcher for the fixtures!
class SessionStopRxMessageTests: XCTestCase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//

import XCTest
@testable import xDripG5
@testable import CGMBLEKit

class TransmitterIDTests: XCTestCase {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

import XCTest
@testable import xDripG5
@testable import CGMBLEKit

/// Thanks to https://github.com/mthatcher for the fixtures!
class TransmitterTimeRxMessageTests: XCTestCase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

import XCTest
@testable import xDripG5
@testable import CGMBLEKit

class TransmitterVersionRxMessageTests: XCTestCase {

Expand Down
4 changes: 2 additions & 2 deletions Pod/xDripG5.h → Pod/CGMBLEKit.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
//
// xDripG5.h
// CGMBLEKit.h
// xDripG5
//
// Created by Nathan Racklyeft on 12/31/15.
// Copyright © 2015 Nathan Racklyeft. All rights reserved.
//


#import <xDripG5/AESCrypt.h>
#import <CGMBLEKit/AESCrypt.h>
17 changes: 7 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
# xDripG5
# CGMBLEKit

[![CI Status](http://img.shields.io/travis/LoopKit/xDripG5.svg?style=flat)](https://travis-ci.org/LoopKit/xDripG5)
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
[![Version](https://img.shields.io/cocoapods/v/xDripG5.svg?style=flat)](http://cocoapods.org/pods/xDripG5)
[![License](https://img.shields.io/cocoapods/l/xDripG5.svg?style=flat)](http://cocoapods.org/pods/xDripG5)
[![Platform](https://img.shields.io/cocoapods/p/xDripG5.svg?style=flat)](http://cocoapods.org/pods/xDripG5)

A iOS framework providing an interface for communicating with the G5 glucose transmitter over Bluetooth. The name and inspiration comes from [xDrip](http://stephenblackwasalreadytaken.github.io/xDrip/), a breakthrough application for connecting to the G4 system.
A iOS framework providing an interface for communicating with the G5 glucose transmitter over Bluetooth.

*Please note this project is neither created nor backed by Dexcom, Inc. This software is not intended for use in therapy.*

Expand All @@ -18,13 +15,13 @@ This framework connects to a G5 Mobile Transmitter via Bluetooth LE. It does not

### Carthage

xDripG5 is available through [Carthage](https://github.com/Carthage/Carthage). To install it, add the following line to your Cartfile:
CGMBLEKit is available through [Carthage](https://github.com/Carthage/Carthage). To install it, add the following line to your Cartfile:

```ruby
github "LoopKit/xDripG5"
```

Note that you'll need to confgure your target to link against `CommonCrypto.framework` in addition to `xDripG5.framework`
Note that you'll need to confgure your target to link against `CommonCrypto.framework` in addition to `CGMBLEKit.framework`

## Usage

Expand All @@ -36,11 +33,11 @@ If you plan to run your app alongside the G5 Mobile application, make sure to se

## ResetTransmitter App Installation

Download the XdripG5 code by clicking on the green `Clone or Download` button (scroll up on this page and you'll find it), then select `Download Zip`
Download the CGMBLEKit code by clicking on the green `Clone or Download` button (scroll up on this page and you'll find it), then select `Download Zip`

![ResetTransmitter help](https://github.com/Kdisimone/images/blob/master/resetTransmitter-first.png)

Then navigate to the `XdripG5-dev` folder that just downloaded to your computer. Double-click on the `xDripG5.xcodeproj` file to open the project in Xcode.
Then navigate to the `XdripG5-dev` folder that just downloaded to your computer. Double-click on the `CGMBLEKit.xcodeproj` file to open the project in Xcode.

![ResetTransmitter help](https://github.com/Kdisimone/images/blob/master/resetTransmitter-download.png)

Expand All @@ -55,4 +52,4 @@ Please note that this project is released with a [Contributor Code of Conduct](h

## License

xDripG5 is available under the MIT license. See the LICENSE file for more info.
CGMBLEKit is available under the MIT license. See the LICENSE file for more info.
2 changes: 1 addition & 1 deletion ResetTransmitter/ResetManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Copyright © 2018 LoopKit Authors. All rights reserved.
//

import xDripG5
import CGMBLEKit
import os.log


Expand Down
8 changes: 4 additions & 4 deletions xDripG5.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ By using this framework in your own app, you can get access to your glucose read
Please note this project is neither created nor backed by Dexcom, Inc. Use of this software is not intended for therapy.
DESC

s.homepage = "https://github.com/LoopKit/xDripG5"
s.homepage = "https://github.com/LoopKit/CGMBLEKit"
s.license = 'MIT'
s.author = { "Nathan Racklyeft" => "loudnate@gmail.com" }
s.source = { :git => "https://github.com/LoopKit/xDripG5.git", :tag => s.version.to_s }
s.source = { :git => "https://github.com/LoopKit/CGMBLEKit.git", :tag => s.version.to_s }

s.platform = :ios, '9.3'
s.requires_arc = true

s.source_files = ['xDripG5/**/*.swift', 'xDripG5/AESCrypt.{h,m}', 'Pod/*.h']
s.public_header_files = ['Pod/*.h', 'xDripG5/AESCrypt.h']
s.source_files = ['CGMBLEKit/**/*.swift', 'CGMBLEKit/AESCrypt.{h,m}', 'Pod/*.h']
s.public_header_files = ['Pod/*.h', 'CGMBLEKit/AESCrypt.h']

s.frameworks = 'CoreBluetooth'
end

This file was deleted.

17 changes: 0 additions & 17 deletions xDripG5/xDripG5.h

This file was deleted.