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
6 changes: 0 additions & 6 deletions Loop.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@
43B371861CE583890013C5A6 /* BasalStateView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43B371851CE583890013C5A6 /* BasalStateView.swift */; };
43B371881CE597D10013C5A6 /* ShareClient.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 43B371871CE597D10013C5A6 /* ShareClient.framework */; };
43C0944A1CACCC73001F6403 /* NotificationManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43C094491CACCC73001F6403 /* NotificationManager.swift */; };
43C418B31CE0550100405B6A /* NSBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43E344A51B9E1B3300C85C07 /* NSBundle.swift */; };
43C418B51CE0575200405B6A /* ShareGlucose+GlucoseKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43C418B41CE0575200405B6A /* ShareGlucose+GlucoseKit.swift */; };
43CA93371CB98079000026B5 /* MinimedKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 43CA93361CB98079000026B5 /* MinimedKit.framework */; };
43CE7CDE1CA8B63E003CC1B0 /* NSDate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43CE7CDD1CA8B63E003CC1B0 /* NSDate.swift */; };
Expand Down Expand Up @@ -120,7 +119,6 @@
43E2D9191D222759004DA55F /* LoopKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 43F78D4B1C914197002152D1 /* LoopKit.framework */; };
43E3449F1B9D68E900C85C07 /* StatusTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43E3449E1B9D68E900C85C07 /* StatusTableViewController.swift */; };
43E344A41B9E1B1C00C85C07 /* NSUserDefaults.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43E344A31B9E1B1C00C85C07 /* NSUserDefaults.swift */; };
43E344A61B9E1B3300C85C07 /* NSBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43E344A51B9E1B3300C85C07 /* NSBundle.swift */; };
43EB40861C82646A00472A8C /* StatusChartManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43EB40851C82646A00472A8C /* StatusChartManager.swift */; };
43EDDBF31C361C75007D89B5 /* xDripG5.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 43EDDBF11C361C75007D89B5 /* xDripG5.framework */; };
43F41C331D3A17AA00C11ED6 /* ChartAxisValueDoubleUnit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43F41C321D3A17AA00C11ED6 /* ChartAxisValueDoubleUnit.swift */; };
Expand Down Expand Up @@ -329,7 +327,6 @@
43E2D90F1D20C581004DA55F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
43E3449E1B9D68E900C85C07 /* StatusTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = StatusTableViewController.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
43E344A31B9E1B1C00C85C07 /* NSUserDefaults.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NSUserDefaults.swift; sourceTree = "<group>"; };
43E344A51B9E1B3300C85C07 /* NSBundle.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NSBundle.swift; sourceTree = "<group>"; };
43EB40851C82646A00472A8C /* StatusChartManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StatusChartManager.swift; sourceTree = "<group>"; };
43EDDBF01C361C75007D89B5 /* CommonCrypto.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CommonCrypto.framework; path = Carthage/Build/iOS/CommonCrypto.framework; sourceTree = "<group>"; };
43EDDBF11C361C75007D89B5 /* xDripG5.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = xDripG5.framework; path = Carthage/Build/iOS/xDripG5.framework; sourceTree = "<group>"; };
Expand Down Expand Up @@ -578,7 +575,6 @@
43649A621C7A347F00523D7F /* CollectionType.swift */,
434FF1E91CF26C29000DB779 /* IdentifiableClass.swift */,
434F54561D287FDB002A9274 /* NibLoadable.swift */,
43E344A51B9E1B3300C85C07 /* NSBundle.swift */,
43CE7CDD1CA8B63E003CC1B0 /* NSDate.swift */,
4398973A1CD2FC2000223065 /* NSDateFormatter.swift */,
439897341CD2F7DE00223065 /* NSTimeInterval.swift */,
Expand Down Expand Up @@ -969,7 +965,6 @@
437CEEBE1CD6E0CB003C8C80 /* LoopCompletionHUDView.swift in Sources */,
435400321C9F745500D5819C /* BolusSuggestionUserInfo.swift in Sources */,
43E3449F1B9D68E900C85C07 /* StatusTableViewController.swift in Sources */,
43E344A61B9E1B3300C85C07 /* NSBundle.swift in Sources */,
43DBF0531C93EC8200B3C386 /* DeviceDataManager.swift in Sources */,
43E2D8C81D208D5B004DA55F /* KeychainManager+Loop.swift in Sources */,
4346D1E71C77F5FE00ABAFE3 /* ChartTableViewCell.swift in Sources */,
Expand Down Expand Up @@ -1039,7 +1034,6 @@
43DE925A1C5479E4001FFDE1 /* CarbEntryUserInfo.swift in Sources */,
4328E0301CFBFAEB00E199AA /* NSTimeInterval.swift in Sources */,
43A9438E1B926B7B0051FA24 /* ComplicationController.swift in Sources */,
43C418B31CE0550100405B6A /* NSBundle.swift in Sources */,
4328E01A1CFBE1DA00E199AA /* StatusInterfaceController.swift in Sources */,
43DE925D1C547A20001FFDE1 /* WatchContext.swift in Sources */,
435400351C9F878D00D5819C /* SetBolusUserInfo.swift in Sources */,
Expand Down
27 changes: 0 additions & 27 deletions Loop/Extensions/NSBundle.swift

This file was deleted.

8 changes: 1 addition & 7 deletions Loop/Managers/AnalyticsManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,8 @@ class AnalyticsManager {
}

init() {
// Migrate RemoteSettings.plist to the Keychain
let keychain = KeychainManager()

if let APIKey = keychain.getAmplitudeAPIKey() {
if let APIKey = KeychainManager().getAmplitudeAPIKey() {
amplitudeService = AmplitudeService(APIKey: APIKey)
} else if let settings = NSBundle.mainBundle().remoteSettings, key = settings["AmplitudeAPIKey"] where !key.isEmpty {
try! keychain.setAmplitudeAPIKey(key)
amplitudeService = AmplitudeService(APIKey: key)
} else {
amplitudeService = AmplitudeService(APIKey: nil)
}
Expand Down
12 changes: 1 addition & 11 deletions Loop/Managers/DiagnosticLogger.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,7 @@ class DiagnosticLogger {
}

init() {
let keychain = KeychainManager()

// Migrate RemoteSettings.plist to the Keychain
if let (databaseName, APIKey) = keychain.getMLabCredentials() {
mLabService = MLabService(databaseName: databaseName, APIKey: APIKey)
} else if let settings = NSBundle.mainBundle().remoteSettings,
APIKey = settings["mLabAPIKey"],
APIPath = settings["mLabAPIPath"] where !APIKey.isEmpty
{
let databaseName = APIPath.componentsSeparatedByString("/")[1]
try! keychain.setMLabDatabaseName(databaseName, APIKey: APIKey)
if let (databaseName, APIKey) = KeychainManager().getMLabCredentials() {
mLabService = MLabService(databaseName: databaseName, APIKey: APIKey)
} else {
mLabService = MLabService(databaseName: nil, APIKey: nil)
Expand Down
15 changes: 0 additions & 15 deletions Loop/Managers/RemoteDataManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,29 +36,14 @@ class RemoteDataManager {
private let keychain = KeychainManager()

init() {
// Migrate RemoteSettings.plist to the Keychain
let settings = NSBundle.mainBundle().remoteSettings

if let (username, password) = keychain.getDexcomShareCredentials() {
shareService = ShareService(username: username, password: password)
} else if let username = settings?["ShareAccountName"],
password = settings?["ShareAccountPassword"]
where !username.isEmpty && !password.isEmpty
{
try! keychain.setDexcomShareUsername(username, password: password)
shareService = ShareService(username: username, password: password)
} else {
shareService = ShareService(username: nil, password: nil)
}

if let (siteURL, APISecret) = keychain.getNightscoutCredentials() {
nightscoutService = NightscoutService(siteURL: siteURL, APISecret: APISecret)
} else if let siteURLString = settings?["NightscoutSiteURL"],
APISecret = settings?["NightscoutAPISecret"],
siteURL = NSURL(string: siteURLString)
{
keychain.setNightscoutURL(siteURL, secret: APISecret)
nightscoutService = NightscoutService(siteURL: siteURL, APISecret: APISecret)
} else {
nightscoutService = NightscoutService(siteURL: nil, APISecret: nil)
}
Expand Down