nightscout / Trio

MIT License
49 stars 154 forks source link

Scrub Stats Upload #150

Closed MikePlante1 closed 2 months ago

MikePlante1 commented 2 months ago

Removes the upload of statistics to Nightscout. As far as I know, this data was only used to upload statistics to a website not associated with this project at all. Applying this code did not affect any of the in-app statistics in my testing.

marionbarker commented 2 months ago

I discovered some weird stuff in the FreeAPS.xcodeproj/project.pbxproj file. I don't know, but suspect this is related to the statistics you want to scrub.

                INFOPLIST_KEY_NSHealthClinicalHealthRecordsShareUsageDescription = "Bla bla Record Health";
                INFOPLIST_KEY_NSHealthShareUsageDescription = "Bla bla Share Health";
                INFOPLIST_KEY_NSHealthUpdateUsageDescription = "Bla bla Update Health";
                INFOPLIST_KEY_NSHealthClinicalHealthRecordsShareUsageDescription = "Bla bla Record Health";
                INFOPLIST_KEY_NSHealthShareUsageDescription = "Bla bla Share Health";
                INFOPLIST_KEY_NSHealthUpdateUsageDescription = "Bla bla Update Health";
MikePlante1 commented 2 months ago

I discovered some weird stuff in the FreeAPS.xcodeproj/project.pbxproj file. I don't know, but suspect this is related to the statistics you want to scrub.

              INFOPLIST_KEY_NSHealthClinicalHealthRecordsShareUsageDescription = "Bla bla Record Health";
              INFOPLIST_KEY_NSHealthShareUsageDescription = "Bla bla Share Health";
              INFOPLIST_KEY_NSHealthUpdateUsageDescription = "Bla bla Update Health";
              INFOPLIST_KEY_NSHealthClinicalHealthRecordsShareUsageDescription = "Bla bla Record Health";
              INFOPLIST_KEY_NSHealthShareUsageDescription = "Bla bla Share Health";
              INFOPLIST_KEY_NSHealthUpdateUsageDescription = "Bla bla Update Health";

I don't know what that's for, but it doesn't seem to be connected to uploading statistics

bjornoleh commented 2 months ago

I discovered some weird stuff in the FreeAPS.xcodeproj/project.pbxproj file. I don't know, but suspect this is related to the statistics you want to scrub.

              INFOPLIST_KEY_NSHealthClinicalHealthRecordsShareUsageDescription = "Bla bla Record Health";
              INFOPLIST_KEY_NSHealthShareUsageDescription = "Bla bla Share Health";
              INFOPLIST_KEY_NSHealthUpdateUsageDescription = "Bla bla Update Health";
              INFOPLIST_KEY_NSHealthClinicalHealthRecordsShareUsageDescription = "Bla bla Record Health";
              INFOPLIST_KEY_NSHealthShareUsageDescription = "Bla bla Share Health";
              INFOPLIST_KEY_NSHealthUpdateUsageDescription = "Bla bla Update Health";

These are usage descriptions that are mandatory to enter as an Apple developer when requesting access to use sensitive data like Apple Health data. We should obviously write proper descriptions for this. I assume we will find nice templates for this in Loop.

marionbarker commented 2 months ago

I believe you are incorrect @bjornoleh.

Try this command in LoopWorkspace - you will get silence. The same command in our repo provides those same 6 lines I reported about.

 find . -name "*.pbxproj" -exec grep -Hn INFOPLIST_KEY_NSHealth {} \;
marionbarker commented 2 months ago

Blame say jbm added this as part of a new build number (one more reason for atomic commits) in 3 Sep 2022.

https://github.com/Artificial-Pancreas/iAPS/commit/37d048a678fb52ac329c31553df4a50f45adf41d

bjornoleh commented 2 months ago

I believe you are incorrect @bjornoleh.

Try this command in LoopWorkspace - you will get silence. The same command in our repo provides those same 6 lines I reported about.

 find . -name "*.pbxproj" -exec grep -Hn INFOPLIST_KEY_NSHealth {} \;

So Loop does not have this, but here is the documentation:

https://developer.apple.com/documentation/bundleresources/information_property_list/nshealthshareusagedescription

And some discussion here: https://stackoverflow.com/questions/39596622/nshealthshareusagedescription-must-be-set-in-the-apps-info-plist-in-order-to-re

Edit:

Loop does seem to have those usage description strings in info.plist?

https://github.com/LoopKit/Loop/blob/6cf0285e13f6523339b6a4758558cd66d0153c2e/Loop/Info.plist#L68-L71

I am not finding NSHealthClinicalHealthRecords though

marionbarker commented 2 months ago

peace. Let's leave them alone. Sorry to highjack this PR comments.