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

chore(ios) handle Apple privacy manifest changes #14007

Merged
merged 1 commit into from Mar 28, 2024

Conversation

hansemannn
Copy link
Collaborator

@hansemannn hansemannn commented Mar 16, 2024

Todos

  • Identify affected APIs
  • Guard affected APIs by pre-compile statements if used in single methods / properties
  • Document privacy changes for the affected APIs
  • Add a guide for the new privacy changes (Done, here]
  • Generate privacy manifest for APIs that have to be declared by default (e.g. Ti.App.Properties and Ti.App.iOS.UserDefaults) as well as own APIs (e.g. modules)
  • Submit several test builds to verify the fixes

Context

There are more and more warnings popping up around privacy changes at Apple recently, generating some warning when uploading a build to App Store Connect:

ITMS-91053: Missing API declaration - Your app’s code in the “MyApp” file references one or more APIs that require reasons, including the following API categories: NSPrivacyAccessedAPICategoryDiskSpace. While no action is required at this time, starting May 1, 2024, when you upload a new app or app update, you must include a NSPrivacyAccessedAPITypes array in your app’s privacy manifest to provide approved reasons for these APIs used by your app’s code. For more details about this policy, including a list of required reason APIs and approved reasons for usage, visit: https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api.

ITMS-91053: Missing API declaration - Your app’s code in the “MyApp” file references one or more APIs that require reasons, including the following API categories: NSPrivacyAccessedAPICategoryUserDefaults. While no action is required at this time, starting May 1, 2024, when you upload a new app or app update, you must include a NSPrivacyAccessedAPITypes array in your app’s privacy manifest to provide approved reasons for these APIs used by your app’s code. For more details about this policy, including a list of required reason APIs and approved reasons for usage, visit: https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api.

ITMS-91053: Missing API declaration - Your app’s code in the “MyApp” file references one or more APIs that require reasons, including the following API categories: NSPrivacyAccessedAPICategoryFileTimestamp. While no action is required at this time, starting May 1, 2024, when you upload a new app or app update, you must include a NSPrivacyAccessedAPITypes array in your app’s privacy manifest to provide approved reasons for these APIs used by your app’s code. For more details about this policy, including a list of required reason APIs and approved reasons for usage, visit: https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api.

ITMS-91053: Missing API declaration - Your app’s code in the “MyApp” file references one or more APIs that require reasons, including the following API categories: NSPrivacyAccessedAPICategorySystemBootTime. While no action is required at this time, starting May 1, 2024, when you upload a new app or app update, you must include a NSPrivacyAccessedAPITypes array in your app’s privacy manifest to provide approved reasons for these APIs used by your app’s code. For more details about this policy, including a list of required reason APIs and approved reasons for usage, visit: https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api.

Most of them are used in Ti.Filesystem APIs, so I will try to add guard for them or replace them with more top-level APIs. The docs will also be changed to make sure developers know about the priacy keys when using certain file APIs.

This will take some more time, but a PR should be ready by next week! Apple does not block apps with these warnings, yet, but it'll be good to be up-to-date as one of the first app frameworks (again) :leichtes_lächeln:

In addition, I'll try to support the "privacy manifest" in Titanium, a special configuration file that needs to be embedded into the generated Xcode project. Fun fun fun!

Code strong! 🚀

@hansemannn hansemannn changed the title chore(ios) handle privacy manifest changes. chore(ios) handle Apple privacy manifest changes Mar 16, 2024
@cb1kenobi
Copy link
Contributor

This is awesome! Great work!

@hansemannn
Copy link
Collaborator Author

Okay, our test builds all gone through while triggering warnings before. I think this is ready to merge!

@hansemannn hansemannn merged commit 76dc1db into tidev:master Mar 28, 2024
6 checks passed
@hansemannn hansemannn deleted the feature/privacy-manifest branch March 28, 2024 08:52
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

2 participants