apache / cordova-ios

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

feat: add PrivacyInfo.xcprivacy for CordovaLib & app template #1383

Closed dpogue closed 2 months ago

dpogue commented 6 months ago

Platforms affected

iOS

Motivation and Context

Starting in April 2024, Apple requires that newly submitted apps include a Privacy Manifest that declares whether the app collects personal data, whether it uses that data for tracking purposes, and whether the app uses privacy-impacting system APIs.

Description

Adds a PrivacyInfo.xcprivacy manifest file to CordovaLib, declaring that CordovaLib does not do any tracking or use any privacy-impacting APIs.

Adds a PrivacyInfo.xcprivacy manifest file to the generated app template, with empty declarations. It is up to the app author to provide the correct privacy details for their application.

Minor cleanups to the CordovaLib project to improve both Xcode subproject and Swift package use.

Testing

Tested locally in Xcode.

Checklist

codecov-commenter commented 6 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 78.24%. Comparing base (92017bb) to head (be301c3). Report is 3 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1383 +/- ## ========================================== - Coverage 78.25% 78.24% -0.02% ========================================== Files 15 15 Lines 1789 1788 -1 ========================================== - Hits 1400 1399 -1 Misses 389 389 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

knaito-asial commented 2 months ago

Should we need to add 'Cordova' directory like this? Because Corodva/PrivacyInfo.xcprivacy file is added.

   for (const p of ['include', 'Classes', 'Cordova', 'CordovaLib.xcodeproj/project.pbxproj']) {

https://github.com/dpogue/cordova-ios/blob/8d69afdf4d01df1ed4cf4e48691f5292e73d090b/lib/create.js#L121

dpogue commented 2 months ago

Should we need to add 'Cordova' directory like this? Because Corodva/PrivacyInfo.xcprivacy file is added.

Good catch. I've added some changes to clean up the CordovaLib project structure a little bit (both for Xcode and for the Swift Package) and the files should be there as expected now.

dpogue commented 2 months ago

Note to self: https://github.com/apache/cordova-coho/pull/324/files needs to be updated after this is merged to use the correct path to Info.plist for versioning

mg commented 1 month ago

Hi. Are there any plans to back port this to Cordova iOS 6.x? Our plans are to update to 7.x in the fall.

dpogue commented 1 month ago

Are there any plans to back port this to Cordova iOS 6.x?

@mg Sadly no. Cordova is maintained by volunteers and we just don't have the resources or capacity to support multiple active branches.

mg commented 1 month ago

@dpogue roger, thanks for the response