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

Support for Privacy Manifest #19966

Closed
phillippschmedt opened this issue Jan 30, 2024 · 16 comments
Closed

Support for Privacy Manifest #19966

phillippschmedt opened this issue Jan 30, 2024 · 16 comments

Comments

@phillippschmedt
Copy link

phillippschmedt commented Jan 30, 2024

Starting in fall 2024 a privacy manifest will be mandatory for all iOS apps: https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api

Will this be supported by xamarin iOS?

@rolfbjarne
Copy link
Member

I'm not entirely sure what will happen with Xamarin.iOS (support for Xamarin will end on May 1st: https://dotnet.microsoft.com/en-us/platform/support/policy/xamarin), but there probably won't be support for privacy manifests in Xamarin.iOS.

In .NET, we'll support it.

@phillippschmedt
Copy link
Author

phillippschmedt commented Feb 7, 2024

@rolfbjarne Thank you. Please consider to extend the support for xamarin atleast to the point where we can comply with apple/google requirements. It's not that we do not want to migrate to .NET MAUI, in fact we have migrated all of our code but .NET MAUI is still unstable and not production ready. There is multiple open issues in the .NET MAUI tracker that need to be solved until we can even consider releasing our app on .NET MAUI.

@gabsamples6
Copy link

@rolfbjarne I would like to add my concern here, we are migrating to Maui and we are nearly there , but some Maui bugs are preventing us to be ready for April, and we are concerned that if we need to release a Xamarin fix in April because we are not maui ready we will be in trouble as it will require this privacy manifest. I do hope this gets the relevant attention as I guess there will be thousands of apps that might face this issue. Many thanks

@djunod
Copy link

djunod commented Mar 14, 2024

Same issues as the folks above mentioned. We definitely need support for this in Xamarin. Maui is unfortunately still not there.

@todorsp
Copy link

todorsp commented Mar 14, 2024

Same as the others. Asking here - would it be possible to add this by ourselves in our existing Xamarin Forms projects? From what I understand the is just another plist file to integrate in the build process. Am I wrong?
Thanks

@jasonleach
Copy link

This is me begging for help. Same issue as others above.
I don't see any support for a privacy manifest in Maui either. It needs to be there, and it needs to be soon.
Please work this out in both xamarin and maui, especially before you abandon all of us xamarin users and leave us with Maui which right now is the most undependable buggy thing produced in many years. practically windows millenial.

@solomonfried
Copy link

Just adding my vote. My MAUI migration is moving along slowly due to missing 3rd party library support and issues with deploying to Windows.
The Ios Privacy manifest will be required soon and hopefully will be supported by Xamarin.

I am being warned about the following...
NSPrivacyAccessedAPICategorySystemBootTime
NSPrivacyAccessedAPICategoryFileTimestamp
NSPrivacyAccessedAPICategoryDiskSpace
NSPrivacyAccessedAPICategoryUserDefaults

Does anyone know which libraries are triggering these warning? My guess is Xamarin or Xamarin Essentials. If so then it would be nice to have them provide the privacyinfo.xcprivacy file

@todorsp
Copy link

todorsp commented Mar 18, 2024

Just adding my vote. My MAUI migration is moving along slowly due to missing 3rd party library support and issues with deploying to Windows. The Ios Privacy manifest will be required soon and hopefully will be supported by Xamarin.

I am being warned about the following... NSPrivacyAccessedAPICategorySystemBootTime NSPrivacyAccessedAPICategoryFileTimestamp NSPrivacyAccessedAPICategoryDiskSpace NSPrivacyAccessedAPICategoryUserDefaults

Does anyone know which libraries are triggering these warning? My guess is Xamarin or Xamarin Essentials. If so then it would be nice to have them provide the privacyinfo.xcprivacy file

Hi, I have had exactly these warnings when submitting to the App Store for review.
What I have tried to do is 'compose' my own privacyinfo.xcprivacy (it's just a text file, similar to info.plist) including these fields and added it to the build process as bundle resource. I have resubmitted a new version of our app with this privacyinfo.xcprivacy included and am waiting for the Apple review.
I will post here the 'results' of this review (whether warnings still exist)...

@jasonleach
Copy link

Hi, I have had exactly these warnings when submitting to the App Store for review. What I have tried to do is 'compose' my own privacyinfo.xcprivacy (it's just a text file, similar to info.plist) including these fields and added it to the build process as bundle resource. I have resubmitted a new version of our app with this privacyinfo.xcprivacy included and am waiting for the Apple review. I will post here the 'results' of this review (whether warnings still exist)...

I tried this as well. I stuctured it as a plist, which is what XCode does. It still returned the same warning. it seems xamarin did not see it as a plist file that needed to be included in the ipa. I did not add it as a bundle resource, because info.plist is not added that way. I hope your method works!

@jasonleach
Copy link

jasonleach commented Mar 19, 2024

[todorsp] comment above: My attempt to use your method WORKED! this is a valid workaround. I got an email back from apple that the file was parsed, and one of my values was unacceptable. (typo in the code string) but the others were good.
so steps to remedy:

  • Create a plist file.
  • rename it Privacyinfo.xcprivacy. (I had the uppercase P, as apple does. don't know if it is case sensitive, but accepted the file like this so i am going with it)
  • set the build process to "bundle resource"
  • edit it to look like this: (change the accessed api types to the ones you need, obviously)
<?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>NSPrivacyTracking</key>
	  <false/>
	  <key>NSPrivacyTrackingDomains</key>
	  <array/>
	  <key>NSPrivacyCollectedDataTypes</key>
	  <array/>
	  <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>NSPrivacyAccessedAPICategorySystemBootTime</string>
			  <key>NSPrivacyAccessedAPITypeReasons</key>
			  <array>
				  <string>8FFB.1</string>
			  </array>
		  </dict>
	  </array>
  </dict>
</plist>

find your reason codes (the C617.1 nonsense) here:https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api

@giuseppenovielli
Copy link

[todorsp] comment above: My attempt to use your method WORKED! this is a valid workaround. I got an email back from apple that the file was parsed, and one of my values was unacceptable. (typo in the code string) but the others were good. so steps to remedy:

  • Create a plist file.
  • rename it Privacyinfo.xcprivacy. (I had the uppercase P, as apple does. don't know if it is case sensitive, but accepted the file like this so i am going with it)
  • set the build process to "bundle resource"
  • edit it to look like this: (change the accessed api types to the ones you need, obviously)
<?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>NSPrivacyTracking</key>
	  <false/>
	  <key>NSPrivacyTrackingDomains</key>
	  <array/>
	  <key>NSPrivacyCollectedDataTypes</key>
	  <array/>
	  <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>NSPrivacyAccessedAPICategorySystemBootTime</string>
			  <key>NSPrivacyAccessedAPITypeReasons</key>
			  <array>
				  <string>8FFB.1</string>
			  </array>
		  </dict>
	  </array>
  </dict>
</plist>

find your reason codes (the C617.1 nonsense) here:https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api

Does it works with Xamarin.Forms?

@todorsp
Copy link

todorsp commented Mar 19, 2024

@jasonleach - great news :-). I am still waiting for review in the App Store but no warnings up to now.
@giuseppenovielli - yes, this all is for Xamarin Forms (no Idea about Maui)...

@djunod
Copy link

djunod commented Mar 20, 2024

Can verify that todorsp and jasonleach method of including it as a bundled resource worked for me as well with Xamarin Forms.

@gabsamples6
Copy link

gabsamples6 commented Mar 20, 2024

Hi I have added below to the proj file (Maui) not done xamarin yet... but when I view the Build Action in file properties BundleResource is not there! What Am I missing? thanks

  <ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">
    <BundleResource Include="Platforms\iOS\PrivacyInfo.xcprivacy" LogicalName="PrivacyInfo.xcprivacy" />
  </ItemGroup>

@jasonleach
Copy link

Hi I have added below to the proj file (Maui) not done xamarin yet...

@gabsamples6 Yeah, for reasons unknown, BundleResource is not available in Maui. I have read elsewhere that listing it in the .proj file like you did actually works, but I have no evidence of that.

@solomonfried
Copy link

NSPrivacyTracking

NSPrivacyTrackingDomains

NSPrivacyCollectedDataTypes

Are the empty sections required?

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

No branches or pull requests

8 participants