Skip to content

Commit b40a368

Browse files
authored
Update host identifier for plugins, which is used for dataset name in TidepoolService (#664)
1 parent 6b31bf4 commit b40a368

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Loop/Managers/ServicesManager.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,13 @@ extension ServicesManager: StatefulPluggableDelegate {
263263

264264
extension ServicesManager: ServiceDelegate {
265265
var hostIdentifier: String {
266-
return "com.loopkit.Loop"
266+
var identifier = Bundle.main.bundleIdentifier ?? "com.loopkit.Loop"
267+
let components = identifier.components(separatedBy: ".")
268+
// DIY Loop has bundle identifiers like com.UY653SP37Q.loopkit.Loop
269+
if components[2] == "loopkit" && components[3] == "Loop" {
270+
identifier = "com.loopkit.Looo"
271+
}
272+
return identifier
267273
}
268274

269275
var hostVersion: String {

0 commit comments

Comments
 (0)