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
11 changes: 11 additions & 0 deletions ShareClient/ShareClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,18 @@ public enum ShareError: Error {
public enum KnownShareServers: String {
case US="https://share1.dexcom.com"
case NON_US="https://shareous1.dexcom.com"
/*
To enable Loop to use a custom share server:
- remove the comment marker on line 44 and change the value of CUSTOM
- remove the comment markers on lines 34 and 35 in ShareClientUI/ShareService+UI.swift

Note: The URL in CUSTOM must start with 'https://' (NOT 'http://')

You can find installation instructions for one such custom share server at
https://github.com/dabear/NightscoutShareServer
*/

// case CUSTOM="https://yourusernameshareserver.herokuapp.com"
}

// From the Dexcom Share iOS app, via @bewest and @shanselman:
Expand Down
17 changes: 0 additions & 17 deletions ShareClient/ShareService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,6 @@ public class ShareService: ServiceAuthentication {
url?.absoluteString
]

/*
To enable Loop to use a custom share server, change the value of customServer
and remove the comment markers on line 55 and 62.

You can find installation instructions for one such custom share server at
https://github.com/dabear/NightscoutShareServer
*/

/*
let customServer = "https://REPLACEME"
let customServerTitle = "Custom"

credentials[2].options?.append(
(title: LocalizedString(customServerTitle, comment: "Custom share server option title"),
value: customServer))
*/

if let username = username, let password = password, let url = url {
isAuthorized = true
client = ShareClient(username: username, password: password, shareServer: url.absoluteString)
Expand Down
4 changes: 3 additions & 1 deletion ShareClientUI/ShareService+UI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ extension ShareService: ServiceAuthenticationUI {
value: KnownShareServers.US.rawValue),
(title: LocalizedString("Outside US", comment: "Outside US share server option title"),
value: KnownShareServers.NON_US.rawValue)

// remove the comment markers on lines 34 and 35 to use a custom share server
// ,(title: LocalizedString("Custom", comment: "Custom share server option title"),
// value: KnownShareServers.CUSTOM.rawValue)
]
)
]
Expand Down