Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apple privacy declaration #5801

Closed
johnhatvani opened this issue Mar 18, 2024 · 8 comments · Fixed by #5819
Closed

Apple privacy declaration #5801

johnhatvani opened this issue Mar 18, 2024 · 8 comments · Fixed by #5819
Assignees
Labels
Missing info The user didn't precise the problem enough Missing repro This issue need minimum repro scenario Platform: iOS This issue is specific to iOS

Comments

@johnhatvani
Copy link

johnhatvani commented Mar 18, 2024

Description

Summary

Apple's requirement to document usages of certain Api's is coming into effect May 1.
https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api

using these (here & here) tools to scan for usages of these API's/symbols

and there are a couple of results found for reanimated:

./node_modules/react-native-reanimated/ios/sensor/ReanimatedSensor.m:                    double currentTime = [[NSProcessInfo processInfo] systemUptime];
./node_modules/react-native-reanimated/ios/sensor/ReanimatedSensor.m:                                         double currentTime = [[NSProcessInfo processInfo] systemUptime];
./node_modules/react-native-reanimated/ios/sensor/ReanimatedSensor.m:                            double currentTime = [[NSProcessInfo processInfo] systemUptime];
./node_modules/react-native-reanimated/ios/sensor/ReanimatedSensor.m:                            double currentTime = [[NSProcessInfo processInfo] systemUptime];
./node_modules/react-native-reanimated/ios/sensor/ReanimatedSensor.m:                                                    double currentTime = [[NSProcessInfo processInfo] systemUptime];
Used symbols in binary ./Frameworks/RNReanimated.framework/RNReanimated: systemUptime

plus some peer dependencies:

./node_modules/react-native/Libraries/Image/RCTImageLoader.mm:  return (mach_absolute_time() * tb_info.numer) / tb_info.denom;

Used symbols in binary ./Frameworks/RCTSettings.framework/RCTSettings: NSUserDefaults
Used symbols in binary ./React-RCTImage/RCTImage.framework/RCTImage: mach_absolute_time
Used symbols in binary ./React-CoreModules/CoreModules.framework/CoreModules: NSUserDefaults
Used symbols in binary ./React-cxxreact/cxxreact.framework/cxxreact: fstat, stat

Is this something the team is aware of? or have an ETA for?

Steps to reproduce

Snack or a link to a repository

Reanimated version

3.3.0

React Native version

0.71.15

Platforms

iOS

JavaScript runtime

Hermes

Workflow

React Native

Architecture

Paper (Old Architecture)

Build type

Debug app & dev bundle

Device

Real device

Device model

No response

Acknowledgements

Yes

@github-actions github-actions bot added the Missing repro This issue need minimum repro scenario label Mar 18, 2024
Copy link

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?

@github-actions github-actions bot added the Missing info The user didn't precise the problem enough label Mar 18, 2024
Copy link

github-actions bot commented Mar 18, 2024

Hey! 👋

It looks like you've omitted a few important sections from the issue template.

Please complete Steps to reproduce and Snack or a link to a repository sections.

@github-actions github-actions bot added the Platform: iOS This issue is specific to iOS label Mar 18, 2024
@Vivek-rudhva
Copy link

facing the same issue, kindly add privacy manifest file for ios

@tomekzaw
Copy link
Member

tomekzaw commented Mar 21, 2024

Hey @johnhatvani, thanks for submitting this issue!

Is this something the team is aware of?

We were not aware of this requirement so thanks again!

Turns out we don't need to know the system uptime; instead of calling systemUptime we can just use CACurrentMediaTime() which is safe to use without a privacy manifest file.

or have an ETA for?

I've submitted a PR that resolves this issue (#5819). Once it lands on main, it will be available as nightly (yarn add react-native-reanimated@nightly). We can follow up with a stable release (3.9.0) quite soon.

plus some peer dependencies:

As for the peer dependencies, these are actually React Native core modules so we don't have control over them from the perspective of this repository and it needs to be changed directly in react-native repository. Here's a link to the discussion:

@tomekzaw tomekzaw self-assigned this Mar 21, 2024
github-merge-queue bot pushed a commit that referenced this issue Mar 21, 2024
…th Apple privacy requirements (#5819)

## Summary

Closes #5801.

This PR replaces all `[[NSProcessInfo processInfo] systemUptime]` calls
with `CACurrentMediaTime() * 1000`.

## Test plan

Check if `useAnimatedSensor` with interval works properly.
@james-ovens-eurostar
Copy link

james-ovens-eurostar commented Apr 19, 2024

We can follow up with a stable release (3.9.0) quite soon.

@tomekzaw Do you have a timeline for when this might be available?

@tomekzaw
Copy link
Member

@james-ovens-eurostar We plan to publish 3.9.0 next week.

@tdraper-dev
Copy link

@tomekzaw -- any timeline for getting the privacy work out of release candidate status and into an official release? The pre-release status is leading to some peer-dep conflicts for me, unfortunately :(

@tomekzaw
Copy link
Member

@tdraper-dev Sure, we're just doing some final round of testing for 3.9.0, hopefully should be published tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Missing info The user didn't precise the problem enough Missing repro This issue need minimum repro scenario Platform: iOS This issue is specific to iOS
Projects
None yet
5 participants