Xamarin Forms - API Declaration not working

Morning All,

just wanted a little help with my xamarin forms app. When I publish to test flight for a public test build I am always receiving the email about ITMS-91053: Missing API declaration. I have followed the steps and created a PrivacyInfo.xcprivacy in Xcode and I can see it in my xamarin iOS project but I still get the email saying it is missing. Is there something I am missing or ned to reference in the info.plist etc. My looks like the following:

<?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>NSPrivacyAccessedAPITypes</key> <array> <dict> <key>NSPrivacyAccessedAPIType</key> <string>NSPrivacyAccessedAPICategoryDiskSpace</string> <key>NSPrivacyAccessedAPITypeReasons</key> <array> <string>E174.1</string> </array> </dict> <dict> <key>NSPrivacyAccessedAPIType</key> <string>NSPrivacyAccessedAPICategoryUserDefaults</string> <key>NSPrivacyAccessedAPITypeReasons</key> <array> <string>CA92.1</string> </array> </dict> <dict> <key>NSPrivacyAccessedAPIType</key> <string>NSPrivacyAccessedAPICategoryFileTimestamp</string> <key>NSPrivacyAccessedAPITypeReasons</key> <array> <string>DDA9.1</string> <string>0A2A.1</string> </array> </dict> <dict> <key>NSPrivacyAccessedAPIType</key> <string>NSPrivacyAccessedAPICategorySystemBootTime</string> <key>NSPrivacyAccessedAPITypeReasons</key> <array> <string>35F9.1</string> </array> </dict> </array> </dict> </plist>

Replies

First thing you should do is make sure that the PrivacyInfo.xcprivacy file actually exists. This means that after you create the iOS App archive , you need to check that the .ipa build that you actually submit to the AppStore contains the privacy manifest at path: MyApp.ipa/Payload/MyApp.app/PrivacyInfo.xcprivacy. You can also check this by generating the Privacy Report from the Organizer Window in Xcode, and , if the privacy report can be generated, it means that Xcode found it in the correct place.

Another thing to check in Xcode in order to be sure your privacy manifest resource is copied inside the app is to select the target that you want to build -> go to Build Phases -> Copy Bundle Resources and make sure you find the privacy manifest in there somewhere.

Thanks for the reply, I have just noticed the file in my .iOS project had a build action as none so I have changed that to BundleResource and will see what happens when I upload again.

Many Thanks

  • @SquareoneJoey I have the same issue, was it solved by changing the build action to BundleResource or have you solved it in another way ?

Add a Comment