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

Privacy Manifest support would be needed in realm-wrappers #3541

Closed
takeshik opened this issue Mar 5, 2024 · 10 comments
Closed

Privacy Manifest support would be needed in realm-wrappers #3541

takeshik opened this issue Mar 5, 2024 · 10 comments

Comments

@takeshik
Copy link

takeshik commented Mar 5, 2024

Problem

Like realm-swift did, it seems that realm-dotnet also need to address Apple's new Privacy Manifest reguration.

Apple has announced that new publication and updates must support Privacy Manifests starting May 1.

Solution

To compliant the new regulation, it would be needed to include a privacy manifest file into realm-wrappers.framework.

As an experiment, I wrote some patch to include a manifest into realm-wrappers.framework.
In this patch, PrivacyInfo.xcprivacy is brought from realm/realm-swift#8455. I think that the declaration in the manifest can be appropriated as is, but I'm not certain.

Alternatives

No response

How important is this improvement for you?

Would be a major improvement

Feature would mainly be used with

Local Database only

Copy link

sync-by-unito bot commented Mar 5, 2024

➤ PM Bot commented:

Jira ticket: RNET-1119

@nirinchev
Copy link
Member

Thanks for bringing it to our attention. We'll schedule some work to make sure it's done before May 1st.

@takeshik
Copy link
Author

takeshik commented Mar 6, 2024

Thanks a lot for your comment. I'm relieved to hear that.

By the way, I previously wrote that the declaration in the manifest can be appropriated as is. But after that, I found that realm-wrappers seems to use not only fstat and stat, but also statvfs.
realm-swift's PrivacyInfo.xcprivacy only declares NSPrivacyAccessedAPICategoryFileTimestamp (for fstat and stat).
In realm-wrappers, it might be also needed to declare NSPrivacyAccessedAPICategoryDiskSpace in the manifest.

FYI: PrivacyInfo.xcprivacy
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>NSPrivacyAccessedAPITypes</key>
	<array>
		<dict>
			<key>NSPrivacyAccessedAPIType</key>
			<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
			<key>NSPrivacyAccessedAPITypeReasons</key>
			<array>
				<string>C617.1</string>
			</array>
		</dict>
		<dict>
			<key>NSPrivacyAccessedAPIType</key>
			<string>NSPrivacyAccessedAPICategoryDiskSpace</string>
			<key>NSPrivacyAccessedAPITypeReasons</key>
			<array>
				<string>E174.1</string>
			</array>
		</dict>
	</array>
	<key>NSPrivacyTracking</key>
	<false/>
	<key>NSPrivacyTrackingDomains</key>
	<array>
	</array>
	<key>NSPrivacyCollectedDataTypes</key>
	<array>
	</array>
</dict>
</plist>

@tgoyne
Copy link
Member

tgoyne commented Mar 11, 2024

I thought that the call to statvfs was only hit in testing code, but after double-checking it's also called when backing up realm files prior to file format upgrades, so RealmSwift needs to add that too. Thanks for catching that.

@papafe papafe self-assigned this Apr 23, 2024
@papafe
Copy link
Contributor

papafe commented Apr 23, 2024

@nirinchev
Copy link
Member

Note that it appears we don't have to add this by May 1st as the Realm .NET SDK is not included in that list: https://developer.apple.com/support/third-party-SDK-requirements/.

@papafe
Copy link
Contributor

papafe commented Apr 24, 2024

Yes, fortunately we're not there. It's mostly a nice thing so developers don't have to do it themselves

@papafe
Copy link
Contributor

papafe commented May 1, 2024

Looking at the documentation, it seems that the minimum privacy manifest necessary for iOS application already contains the keys that we wanted to include in out privacy manifest. For this reason we believe we should not do anything on our side, so I'm closing this ticket but feel free to reopen it if you experience any issue.

On a side note, @takeshik thanks a lot for reporting this and also spending the time to investigate how to fix it. I verified that your patch puts the privacy framework in the right place for iOS before noticing we probably don't need it. So thanks a lot on our side 😄

@papafe papafe closed this as completed May 1, 2024
@roycho111
Copy link

Hello @papafe

i'm wondering if Realm dotnet uses these C# .Net framework APIs

if so, it would be needed to include a privacy manifest file into realm-wrappers.framework as @takeshik mentioned

i might be wrong, it's quite confusing :(

@papafe
Copy link
Contributor

papafe commented May 16, 2024

It seems that our usage is already covered by the default privacy manifest that MAUI needs, so we should be fine. I've also tried to send a test app to Apple for review and did not get any warning/errors about the privacy manifest, so hopefully we are already covered.

That said, feel free to reopen this if you get any errors about Realm when submitting to Apple.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants