keychain-swift icon indicating copy to clipboard operation
keychain-swift copied to clipboard

Support Privacy Manifest

Open benMohamed opened this issue 5 months ago • 13 comments

I'm getting emails back from Apple about this because your library is not compliant.

ITMS-91053: Missing API declaration - Your app’s code in the “YourApp” 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.

benMohamed avatar Mar 15 '24 09:03 benMohamed

What keychain-swift version are you using? The privacy manifest has been included in version 21.

evgenyneu avatar Mar 16 '24 00:03 evgenyneu

Yes, I use version 21.0.0, I think your privacy should contain that key "NSPrivacyAccessedAPICategoryUserDefaults"

benMohamed avatar Mar 16 '24 10:03 benMohamed

This library does not use any of the API that are required for declaration, including UserDefaults.

See https://github.com/evgenyneu/keychain-swift/blob/master/Sources/PrivacyInfo.xcprivacy

The NSPrivacyAccessedAPICategoryUserDefaults is the value of NSPrivacyAccessedAPIType key in the dictionary inside NSPrivacyAccessedAPITypes array, which is empty for this library, since we are not using any APIs required for declaration

evgenyneu avatar Mar 16 '24 14:03 evgenyneu

in my app, the only library I use is KeychainSwift. Therefore, I believe you need to verify this key. You can create an empty project with only your library, then try to publish it. You will receive the same email automatically.

benMohamed avatar Mar 16 '24 14:03 benMohamed

Just FYI. Here's how I express this in my project. Apple hasn't nagged me about it (yet). Their documentation leaves a bit to be desired, but I think I got it right.

ChrisMarshallNY avatar Mar 17 '24 15:03 ChrisMarshallNY

please, @ChrisMarshallNY What does <string>CA92.1</string> mean ?

benMohamed avatar Mar 18 '24 16:03 benMohamed

That's the value that says basically that you are using it the way it says on the tin. It's like the "NO" thing in the uses encryption.

It might very well apply, here. Like I said, their documentation is ... sparse.

ChrisMarshallNY avatar Mar 18 '24 18:03 ChrisMarshallNY

thank you @ChrisMarshallNY

benMohamed avatar Mar 19 '24 14:03 benMohamed

@evgenyneu Here is PR that adds manifest to the pod spec, without it manifest file is missing in the framework we build via cocoapods https://github.com/evgenyneu/keychain-swift/pull/188

hatched-krzysztof avatar Apr 03 '24 13:04 hatched-krzysztof

@evgenyneu I created this PR to fix the privacy file issue

benMohamed avatar Apr 15 '24 10:04 benMohamed

@benMohamed

At present, the privacy file of version 22.0 is imported directly instead of bundle, causing a conflict with the privacy name of the project itself.

"resources": "Sources/PrivacyInfo.xcprivacy" should be modified to

"resource_bundles": { "KeychainSiwft": [ "Source/PrivacyInfo.xcprivacy" ] }

DeanCarter avatar Apr 22 '24 07:04 DeanCarter

@benMohamed

At present, the privacy file of version 22.0 is imported directly instead of bundle, causing a conflict with the privacy name of the project itself.

"resources": "Sources/PrivacyInfo.xcprivacy" should be modified to

"resource_bundles": { "KeychainSiwft": [ "Source/PrivacyInfo.xcprivacy" ] }

@DeanCarter @benMohamed @evgenyneu I have same issue. any idea to solve it?

Screenshot 2024-04-25 at 4 34 20 PM

ISSUE

Multiple commands produce '/Users/me/Library/Developer/Xcode/DerivedData/sharetec-aytxuukqkljfgpgqfcpiagtdqwwo/Build/Products/Debug-iphonesimulator/MyApp.app/PrivacyInfo.xcprivacy'

manuelsalinas-mx avatar Apr 25 '24 22:04 manuelsalinas-mx

@DeanCarter thanks, I updated podspec to use the resource_bundles as you suggested. Available in version 24.

evgenyneu avatar Apr 26 '24 02:04 evgenyneu