Skip to content

Commit 2a054b7

Browse files
authored
Merge pull request LoopKit#247 from LoopKit/dev
Release 2.2
2 parents de1fbe0 + edd6732 commit 2a054b7

File tree

85 files changed

+3684
-369
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+3684
-369
lines changed

.travis.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
language: objective-c
2-
osx_image: xcode9.3
3-
#xcode_sdk: iphonesimulator11.3
4-
#xcode_project: LoopKit.xcodeproj
2+
osx_image: xcode10
53
xcode_scheme:
64
- LoopKit
75
- LoopKitUI
86
script:
9-
- xcodebuild -project LoopKit.xcodeproj -scheme LoopKit build -destination 'name=iPhone X' test
10-
- xcodebuild -project LoopKit.xcodeproj -scheme "LoopKit Example" build -destination 'name=iPhone X'
7+
- xcodebuild -project LoopKit.xcodeproj -scheme LoopKit build -destination 'name=iPhone SE' test
8+
- xcodebuild -project LoopKit.xcodeproj -scheme "LoopKit Example" build -destination 'name=iPhone SE'

Common/LocalizedString.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ private class FrameworkBundle {
1212
static let main = Bundle(for: FrameworkBundle.self)
1313
}
1414

15-
func LocalizedString(_ key: String, tableName: String? = nil, value: String = "", comment: String) -> String {
16-
return NSLocalizedString(key, tableName: tableName, bundle: FrameworkBundle.main, value: value, comment: comment)
15+
func LocalizedString(_ key: String, tableName: String? = nil, value: String? = nil, comment: String) -> String {
16+
if let value = value {
17+
return NSLocalizedString(key, tableName: tableName, bundle: FrameworkBundle.main, value: value, comment: comment)
18+
} else {
19+
return NSLocalizedString(key, tableName: tableName, bundle: FrameworkBundle.main, comment: comment)
20+
}
1721
}

LoopKit Example/AppDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDele
1313

1414
var window: UIWindow?
1515

16-
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
16+
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
1717
return true
1818
}
1919

LoopKit Example/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>APPL</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>2.1.5</string>
18+
<string>2.2</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>

LoopKit ExampleUITests/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>BNDL</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>2.1.5</string>
18+
<string>2.2</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>

LoopKit.xcodeproj/project.pbxproj

Lines changed: 144 additions & 19 deletions
Large diffs are not rendered by default.

LoopKit.xcodeproj/xcshareddata/xcschemes/LoopKit Example.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0940"
3+
LastUpgradeVersion = "1000"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

LoopKit.xcodeproj/xcshareddata/xcschemes/LoopKit.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0940"
3+
LastUpgradeVersion = "1000"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

LoopKit.xcodeproj/xcshareddata/xcschemes/LoopKitUI.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0940"
3+
LastUpgradeVersion = "1000"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

LoopKit/CGMManager.swift

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,19 @@ public protocol CGMManagerDelegate: class {
3333
/// - manager: The manager instance
3434
/// - result: The result of the update
3535
func cgmManager(_ manager: CGMManager, didUpdateWith result: CGMResult) -> Void
36+
37+
/// Informs the delegate that the manager is deactivating and should be deleted
38+
///
39+
/// - Parameter manager: The manager instance
40+
func cgmManagerWantsDeletion(_ manager: CGMManager)
3641
}
3742

3843

39-
public protocol CGMManager: CustomDebugStringConvertible {
44+
public protocol CGMManager: DeviceManager {
4045
var cgmManagerDelegate: CGMManagerDelegate? { get set }
4146

47+
var appURL: URL? { get }
48+
4249
/// Whether the device is capable of waking the app
4350
var providesBLEHeartbeat: Bool { get }
4451

@@ -58,3 +65,10 @@ public protocol CGMManager: CustomDebugStringConvertible {
5865
/// - completion: A closure called when operation has completed
5966
func fetchNewDataIfNeeded(_ completion: @escaping (CGMResult) -> Void) -> Void
6067
}
68+
69+
70+
public extension CGMManager {
71+
var appURL: URL? {
72+
return nil
73+
}
74+
}

0 commit comments

Comments
 (0)