apache / cordova-ios

Apache Cordova iOS
https://cordova.apache.org/
Apache License 2.0
2.15k stars 986 forks source link

Missing API declaration on iOS app submission to App Store #1424

Closed VenuKG closed 3 weeks ago

VenuKG commented 3 weeks ago

Ionic framework use cordova-ios- 6.2.0

submission for TestFlight review was successful, you may want to correct the following issues in your next submission for TestFlight review. Once you've corrected the issues, upload a new binary to App Store Connect.

ITMS-91053: Missing API declaration - Your app’s code in the “Wunderbook” file references one or more APIs that require reasons, including the following API categories: NSPrivacyAccessedAPICategoryDiskSpace. 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.

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

ITMS-91053: Missing API declaration - Your app’s code in the “Wunderbook” file references one or more APIs that require reasons, including the following API categories: NSPrivacyAccessedAPICategoryFileTimestamp. 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.

dpogue commented 3 weeks ago

What plugins does your app use? Those APIs are not used by Cordova itself, so they are likely coming from plugins, which will need to provide their own Privacy Manifest (or you will need to declare their API usage in your app's Privacy Manifest).

Additionally, you'll need to update to cordova-ios 7.1.0 for Privacy Manifest support.

sandy1198 commented 3 weeks ago

how to I find the plugin which have using that API's and How to declare in code ?

breautek commented 3 weeks ago

Ionic framework use cordova-ios- 6.2.0

Presumably by noting the use of the framework, the Ionic webview is being used. The ionic webview does use APIs that now requires a "required use reason" to be declared. I'm not sure if it uses all of the mentioned, but I know it uses NSUserDefaults. If Ionic hasn't already updated their webview and plugin to include a manifest, then an issue should be raised with ionic.

Additionally, as dpogue pointed out, a privacy manifest for the cordova framework itself was introduced in 7.1.0.

how to I find the plugin which have using that API's and How to declare in code ?

Apple has a list of APIs for each category in which they look for and expected a required use reason to be declared. Because Cordova Apps don't work directly in native code, this is almost exclusively caused by plugins in which uses an API that's in that list.

Ideally the plugin authors will produce a resource bundle so that they they declare the reasons themselves (Plugin authors can use https://github.com/apache/cordova-plugin-file/pull/621 as an example on how to do this). If the plugin authors are active, I'd raise an issue so that they can provide their own privacy manifest, but if you're using a plugin that's unmaintained, then you'll need to scan / reverse engineer the plugin for any uses of the APIs listed in the Apple docs and determine why the plugin is using that API, and declare it appropriately based on a reason code also supplied by Apple. App developers has a config.xml directives introduced in cordova-ios 7.1.0 to supply an app manifest. This isn't documented yet, but details and examples can be found at https://github.com/apache/cordova-ios/pull/1406

Closing because this isn't a bug with cordova-ios. If there is further questions, Apache Discussions can be used to discuss topics.

sandy1198 commented 3 weeks ago

@breautek thanks for a clear explanation, I will try this 1406 solution Cheers!

sandy1198 commented 3 weeks ago

thanks @breautek this solution works for me !! app store approved the app