Skip to content

Commit abb838f

Browse files
committed
Merge pull request #22 from channemann/dev
Open appropriate Dexcom app
2 parents 89b1e04 + 9034258 commit abb838f

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Loop/Info.plist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
<key>LSApplicationQueriesSchemes</key>
2424
<array>
2525
<string>dexcomcgm</string>
26+
<string>dexcomshare</string>
2627
</array>
2728
<key>LSRequiresIPhoneOS</key>
2829
<true/>

Loop/View Controllers/StatusTableViewController.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,10 @@ class StatusTableViewController: UITableViewController, UIGestureRecognizerDeleg
552552
case .Charts:
553553
switch ChartRow(rawValue: indexPath.row)! {
554554
case .Glucose:
555-
if let URL = NSURL(string: "dexcomcgm://") {
555+
if let URL = NSURL(string: "dexcomcgm://") where UIApplication.sharedApplication().canOpenURL(URL) {
556+
UIApplication.sharedApplication().openURL(URL)
557+
}
558+
else if let URL = NSURL(string: "dexcomshare://") where UIApplication.sharedApplication().canOpenURL(URL) {
556559
UIApplication.sharedApplication().openURL(URL)
557560
}
558561
case .IOB, .Dose:

0 commit comments

Comments
 (0)