Skip to content

feat: add PrivacyInfo file to iOS framework#25405

Merged
asmorkalov merged 1 commit intoopencv:4.xfrom
VadimLevin:dev/vlevin/ios-framework-privacy-info
Apr 13, 2024
Merged

feat: add PrivacyInfo file to iOS framework#25405
asmorkalov merged 1 commit intoopencv:4.xfrom
VadimLevin:dev/vlevin/ios-framework-privacy-info

Conversation

@VadimLevin
Copy link
Copy Markdown
Contributor

closes #24951

Testing:

  • Build iOS framework
  • Ensure that PrivacyInfo.xcprivacy is included to framework resources.

Expected iOS framework structure:
image

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

@VadimLevin VadimLevin force-pushed the dev/vlevin/ios-framework-privacy-info branch from 686d479 to 079e615 Compare April 12, 2024 12:20
@asmorkalov
Copy link
Copy Markdown
Contributor

@komakai could you take a look?

@komakai
Copy link
Copy Markdown
Contributor

komakai commented Apr 13, 2024

@komakai could you take a look?

The changes look good.
I just wonder why actually OpenCV needs to access file timestamps. If they're not actually needed for anything then it might be better to remove the relevant API calls

@komakai
Copy link
Copy Markdown
Contributor

komakai commented Apr 13, 2024

The changes look good. I just wonder why actually OpenCV needs to access file timestamps. If they're not actually needed for anything then it might be better to remove the relevant API calls

I can see a few places in the code where stat is used to check for file existence. If just checking for file existence access( ... , R_OK) should work and not require a privacy info manifest entry

@asmorkalov
Copy link
Copy Markdown
Contributor

@komakai Thanks a lot for the investigation. Feel free submit a patch with stat->access replacement, if it's applicable everywhere.

@asmorkalov asmorkalov merged commit 002d054 into opencv:4.x Apr 13, 2024
@komakai
Copy link
Copy Markdown
Contributor

komakai commented Apr 14, 2024

@asmorkalov alas its not so simple - cv::utils::fs::isDirectory also calls stat - there is no simple alternative in C/C++. You could call [NSFileManager fileExistsAtPath:isDirectory:] from Objective-C but it requires a bit of work to call out to Obejctive-C from C++

@asmorkalov
Copy link
Copy Markdown
Contributor

Ok, let's stay it as is for now.

@asmorkalov asmorkalov mentioned this pull request Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Apple Privacy Info file

3 participants