Skip to content

Conversation

joshdholtz
Copy link
Member

@joshdholtz joshdholtz commented Nov 11, 2020

Motivation

App support for updating App Data Usage for new app privacy policies

Description

Adds a new action called upload_app_privacy_details_to_app_store . Not only does this new action upload App Data Usage to App Store Connect API, it will provide interactive questions (similar to what the App Store Connect dashboard does). The answers from the interactive questions will upload the App Data Usage to App Store Connect but also create a JSON file that can be put into source control and used again without needing to answer the questions.

Interactive questions

52E1B1DE-FFE5-4605-88B3-9EC0D8DEC3C4

With JSON from previously answered questions

E1414A26-C1DC-4FFE-A6B9-38F86DFB4E31

JSON File

The questions are tedious to answer. The JSON file is not straight forward to manually put together since it can have a lot of options. This action generating and reusing the JSON file should help make this process much easier for the user while also keeping a history of what was answered in source control 😊

Categories

PAYMENT_INFORMATION, CREDIT_AND_FRAUD, OTHER_FINANCIAL_INFO, PRECISE_LOCATION, SENSITIVE_INFO, PHYSICAL_ADDRESS, EMAIL_ADDRESS, NAME, PHONE_NUMBER, OTHER_CONTACT_INFO, CONTACTS, EMAILS_OR_TEXT_MESSAGES, PHOTOS_OR_VIDEOS, AUDIO, GAMEPLAY_CONTENT, USTOMER_SUPPORT, OTHER_USER_CONTENT, BROWSING_HISTORY, SEARCH_HISTORY, USER_ID, DEVICE_ID, PURCHASE_HISTORY, PRODUCT_INTERACTION, ADVERTISING_DATA, OTHER_USAGE_DATA, CRASH_DATA, PERFORMANCE_DATA, OTHER_DIAGNOSTIC_DATA, OTHER_DATA, HEALTH, FITNESS, COARSE_LOCATION

Purposes

THIRD_PARTY_ADVERTISING, DEVELOPERS_ADVERTISING, ANALYTICS, PRODUCT_PERSONALIZATION, APP_FUNCTIONALITY, OTHER_PURPOSES

Data Protections

Use DATA_LINKED_TO_YOU or DATA_NOT_LINKED_TO_YOU
Optionally add DATA_USED_TO_TRACK_YOU

Example: Not Collecting Data

[
  {
    "data_protections": [
      "DATA_NOT_COLLECTED"
    ]
  }
]

Example: Collecting Data

[
  {
    "category": "NAME",
    "purposes": [
      "PRODUCT_PERSONALIZATION",
      "APP_FUNCTIONALITY"
    ],
    "data_protections": [
      "DATA_LINKED_TO_YOU"
    ]
  },
  {
    "category": "PURCHASE_HISTORY",
    "purposes": [
      "APP_FUNCTIONALITY"
    ],
    "data_protections": [
      "DATA_LINKED_TO_YOU",
      "DATA_USED_TO_TRACK_YOU"
    ]
  }
]

Run through CLI

With interactive questions

fastlane run upload_app_privacy_details_to_app_store \
  username:"your@email.com" \
  team_name:"Your Team" \
  app_identifier:"com.your.bundle"

With JSON file output from first step

fastlane run upload_app_privacy_details_to_app_store \
  username:"your@email.com" \
  team_name:"Your Team" \
  app_identifier:"com.your.bundle" \
  json_path:"fastlane/app_data_usages.json"

Run with Fastfile

With interactive questions

upload_app_privacy_details_to_app_store(
  username: "your@email.com",
  team_name: "Your Team”,
  app_identifier: "com.your.bundle"
)

With JSON file output from first step

upload_app_privacy_details_to_app_store(
  username: "your@email.com",
  team_name: "Your Team”,
  app_identifier: "com.your.bundle",
  json_path: "fastlane/app_data_usages.json"
)

@google-cla google-cla bot added the cla: yes label Nov 11, 2020
@fastlane-bot-helper
Copy link
Contributor

fastlane-bot-helper commented Nov 11, 2020

1 Warning
⚠️ Big PR

Generated by 🚫 Danger

@markreynoso
Copy link

Thank you!! 🥇

@Lukasz2891
Copy link

Are you going to release that :)?

@ryechus
Copy link

ryechus commented Dec 2, 2020

@joshdholtz Apple is making a change where this will be required on Dec 8th, 2020.

@joshdholtz
Copy link
Member Author

@ryechus Yup yup! Finishing this PR up today 😊

@joshdholtz joshdholtz force-pushed the joshdholtz-app-privacy branch from 1cf7a89 to c4ac030 Compare December 3, 2020 15:24
@joshdholtz joshdholtz changed the title Initial app privacy [action] NEW ACTION: upload_app_data_usage_to_app_store for App Data Usages Dec 3, 2020
@joshdholtz joshdholtz changed the title [action] NEW ACTION: upload_app_data_usage_to_app_store for App Data Usages [action] NEW ACTION for App Data Usages: upload_app_data_usage_to_app_store Dec 3, 2020
@joshdholtz joshdholtz marked this pull request as ready for review December 3, 2020 16:38
@joshdholtz joshdholtz requested review from milch and max-ott December 3, 2020 16:38
Copy link
Collaborator

@milch milch left a comment

Choose a reason for hiding this comment

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

Mostly LGTM, just have a few minor comments and some questions

@joshdholtz joshdholtz requested a review from milch December 4, 2020 01:55
Copy link
Collaborator

@milch milch left a comment

Choose a reason for hiding this comment

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

🚀

I just marked some minor things which looked like typos to me

Josh Holtz and others added 3 commits December 4, 2020 07:55
…p_store.rb

Co-authored-by: Manu Wallner <manu@supermil.ch>
…p_store.rb

Co-authored-by: Manu Wallner <manu@supermil.ch>
…p_store.rb

Co-authored-by: Manu Wallner <manu@supermil.ch>
Josh Holtz and others added 2 commits December 4, 2020 07:55
@joshdholtz joshdholtz merged commit 600bcdf into master Dec 4, 2020
@joshdholtz joshdholtz deleted the joshdholtz-app-privacy branch December 4, 2020 14:58
@fastlane-bot
Copy link

Hey @joshdholtz 👋

Thank you for your contribution to fastlane and congrats on getting this pull request merged 🎉
The code change now lives in the master branch, however it wasn't released to RubyGems yet.
We usually ship about once a week, and your PR will be included in the next one.

Please let us know if this change requires an immediate release by adding a comment here 👍
We'll notify you once we shipped a new release with your changes 🚀

Copy link

@fastlane-bot fastlane-bot left a comment

Choose a reason for hiding this comment

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

Congratulations! 🎉 This was released as part of fastlane 2.170.0 🚀

@ryechus
Copy link

ryechus commented Dec 4, 2020

@joshdholtz Thank you so much! In case anyone else is confused, if your app isn't collecting data for a category you don't need to include the dictionary in the json file.

@sonjz
Copy link

sonjz commented Dec 11, 2020

i have it working for non-Admin 🎉
... but is there a way to check if App Privacy is completed?

we currently flag it in our system if we completed the app privacy for a non-Admin,
but for other team Admin/Account Holders that have to complete this manually, i'm not quite sure how to track it.

the only place i've seen an error during deliver, which is a bit further along the process than we'd like.

@guyaumetremblay
Copy link

guyaumetremblay commented Dec 11, 2020

Don't know if it's linked with @sonjz comment but in our case, we did completed this informations directly in App Store Connect some weeks ago but we get the error
Answers to what data your app collects and how it's used are needed
when we try to deliver with "submit to review"! Do we need to answer (or use this new action) every each time we deliver a new version?

@sonjz
Copy link

sonjz commented Dec 12, 2020

@guyaumetremblay that doesn't sound related. is it possible on the App Privacy page that one of your categories was missed or Publish at the top wasn't hit?

For my issue, received a thoughtful comment about download_app_privacy_details_from_app_store in the pipe: #17780 (comment)

@guyaumetremblay
Copy link

@sonjz OMG we didn't see the Publish button at the top!! Thanks a lot!!

@AliSoftware
Copy link
Contributor

FYI and for anyone curious, we started a proposal for implementing a new feature on CocoaPods that would hopefully work nicely with this fastlane feature here, as it would generate the json file used here by this fastlane action… from all the info extracted from the libs/pods you use in your app 🙂 (feedbacks on the proposal welcome)

@fastlane fastlane locked and limited conversation to collaborators Mar 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.