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

RDART-964: Add PrivacyInfo.xcprivacy for iOS and macOS #1646

Merged
merged 2 commits into from
Apr 29, 2024

Conversation

nielsenko
Copy link
Contributor

@nielsenko nielsenko commented Apr 24, 2024

Adds privacy manifests to our iOS and macOS plugins.

While we only need to update the plugins listed here for now (ie RealmSwift), the wording of the page:

The following are commonly used SDKs in apps on the App Store

suggests that the list of things for which this is required is just an arbitrary cutoff rather than a conceptual distinction, so it seems safest to just assume the list will grow over time and do this for the realm flutter package as well. To be honest I don't trust that Apple got the list right.

Note that we are following the standard Flutter / Cocoapods implementation which has the following caveat:

The large caveat is that we do not currently know if this actually works. This is the method of inclusion that seems to be the consensus among people using Cocoapods, as bundling it directly as a resource causes problems for clients who do not use use_frameworks. (In theory it seems like a manifest would not actually be required in that case since there is no framework, but it has the potential to actually stomp top-level resources.) Hopefully the automated analysis that Apple will eventually roll out will tolerate the file being bundled in a resource bundle in the framework rather than a top-level manifest file. If not, however, it's not clear how Cocoapods can be supported, so we can adopt this common approach for now under the assumption that eventually tooling will adapt to the reality of the ecosystem, and revisit the exact bundling later if necessary.

Source: flutter/packages@c5349bc

The flutter repo is tracking the approach here.

As to why the we (and the flutter team) add _privacy to the resource bundle id see
flutter/packages#5846 (comment)

The actual privacy manifest files are lifted from the realm-swift repo.

I'll quote the commit message, as to. why it looks as it does:

Since we don't include the analytics code in builds for the app store, the only
thing we need to declare is that we call fstat() on files in the app container,
which core uses internally to check the size of Realm files. This is assuming
that if the app logs into Atlas that's something that the app itself has to
declare rather than us, as we don't automatically talk to the server on our own
behalf.

The CocoaPods bundling might not actually work. This is the approach that most
of the SDKs on the mandatory privacy manifest list are taking, but since Apple
isn't actually checking the manifests yet no one knows if they'll accept this
fairly weird way of bundling the xcprivacy file. The less weird way breaks
building pods as non-framework static libraries.

Fixes: #1551
Fixes: #1629
Fixes: #1630

@nielsenko nielsenko self-assigned this Apr 24, 2024
@cla-bot cla-bot bot added the cla: yes label Apr 24, 2024
@nielsenko nielsenko changed the base branch from main to kn/xcode-15 April 24, 2024 09:25
@nielsenko nielsenko changed the title Add PrivacyInfo.xcprivacy for iOS and macOS RDART-964: Add PrivacyInfo.xcprivacy for iOS and macOS Apr 24, 2024
Copy link
Member

@nirinchev nirinchev 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, should we symlink those manifests or duplicating them is fine?

@nielsenko
Copy link
Contributor Author

Looks good, should we symlink those manifests or duplicating them is fine?

I would prefer not, for now.

@nielsenko nielsenko changed the base branch from kn/xcode-15 to main April 29, 2024 15:20
@nielsenko nielsenko marked this pull request as ready for review April 29, 2024 15:21
@nielsenko nielsenko merged commit 6111633 into main Apr 29, 2024
4 checks passed
@nielsenko nielsenko deleted the kn/privacy-manifest branch April 29, 2024 15:24
nielsenko added a commit that referenced this pull request May 2, 2024
nirinchev added a commit that referenced this pull request May 27, 2024
* main: (37 commits)
  RDART-930: Refactor handles (#1550)
  Forgot to show GeoPolygon
  Add vNext Changelog header (#1687)
  [Release 2.3.0] (#1686)
  RDART-1028: Use Zone.current.bindUnaryCallbackGuarded for RawReceivePort.handler (#1683)
  RDART-1021: Wire up some basic dynamic setting and change notifications (#1669)
  RDART-1022: Drop x86 as target (#1682)
  RDART-1034: Update realm-core to v14.7.0 (#1681)
  Skip select test
  RDART-1018: Fix badly generated _fromJson (#1664)
  Add vNext Changelog header (#1660)
  [Release 2.2.1] (#1659)
  Update CHANGELOG.md
  RDART-1016: Cleanup iOS podspec (#1658)
  Add vNext Changelog header (#1655)
  [Release 2.2.0] (#1654)
  RDART-1015: Update core to v14.6.2 (#1651)
  RDART-950: Update nullability annotations for base url API (#1652)
  RDART-964: Add PrivacyInfo.xcprivacy for iOS and macOS (#1646)
  RDART-1014: Bump required sdk version to ^3.3.0 (#1648)
  ...

# Conflicts:
#	CHANGELOG.md
#	packages/realm_dart/lib/src/native/realm_core.dart
#	packages/realm_dart/src/realm-core
#	packages/realm_dart/test/realm_test.dart
#	packages/realm_dart/test/session_test.dart
#	packages/realm_dart/test/test.dart
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
2 participants