Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scrub Stats Upload #150

Merged
merged 2 commits into from
May 10, 2024
Merged

Scrub Stats Upload #150

merged 2 commits into from
May 10, 2024

Conversation

MikePlante1
Copy link
Contributor

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.

Removes the upload of statistics to Nightscout
@marionbarker
Copy link
Contributor

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
Copy link
Contributor Author

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
Copy link
Contributor

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.

@MikePlante1 MikePlante1 requested a review from bjornoleh May 5, 2024 15:43
@marionbarker
Copy link
Contributor

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
Copy link
Contributor

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

Artificial-Pancreas/iAPS@37d048a

@bjornoleh
Copy link
Contributor

bjornoleh commented May 5, 2024

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
Copy link
Contributor

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

Copy link
Contributor

@AndreasStokholm AndreasStokholm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great! 👏

Copy link
Contributor

@bjornoleh bjornoleh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Built and tested briefly, nothing unusual to report. The Upload statistics toggle is removed from NS settings as expected.

@bjornoleh bjornoleh merged commit bcef643 into nightscout:dev May 10, 2024
@MikePlante1 MikePlante1 mentioned this pull request May 11, 2024
4 tasks
@MikePlante1 MikePlante1 deleted the purge-stats branch June 19, 2024 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants