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

Replace systemUptime calls with CACurrentMediaTime() to comply with Apple privacy requirements #5819

Merged
merged 2 commits into from
Mar 21, 2024

Conversation

tomekzaw
Copy link
Member

@tomekzaw tomekzaw commented Mar 21, 2024

Summary

Closes #5801.

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

Test plan

Check if useAnimatedSensor with interval works properly.

@tomekzaw tomekzaw requested a review from piaskowyk March 21, 2024 10:54
@tomekzaw tomekzaw changed the title @tomekzaw/eliminate system uptime Replace systemUptime calls with CACurrentMediaTime() Mar 21, 2024
@tomekzaw tomekzaw changed the title Replace systemUptime calls with CACurrentMediaTime() Replace systemUptime calls with CACurrentMediaTime() to comply with Apple privacy requirements Mar 21, 2024
@tomekzaw tomekzaw added this pull request to the merge queue Mar 21, 2024
Merged via the queue into main with commit 1ea5d1d Mar 21, 2024
12 checks passed
@tomekzaw tomekzaw deleted the @tomekzaw/eliminate-system-uptime branch March 21, 2024 13:57
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this pull request Apr 15, 2024
This unfortunately causes a peer-dep warning:

  warning " > @react-navigation/material-top-tabs@6.6.13" has
    incorrect peer dependency "@react-navigation/native@^6.0.0".

But no issues have yet appeared in manual testing, and that's
consistent with the note on the React Navigation upgrade guide that
says, "To make upgrading easier, it is possible to mix packages from
the `6.x.x` and `5.x.x` version ranges.":
  https://reactnavigation.org/docs/upgrading-from-5.x#note-on-mixing-react-navigation-5-and-react-navigation-6-packages

Changelog:
  https://github.com/react-navigation/react-navigation/blob/main/packages/material-top-tabs/CHANGELOG.md

Done by reading and following the relevant parts of the React Nav
upgrade guide, including general information at the top and also the
section specific to Material Top Tabs:
  https://reactnavigation.org/docs/upgrading-from-5.x/#material-top-tab-navigator

Done now because it lets us get rid of react-native-reanimated, as
foreshadowed in our React Nav 6 upgrade issue:
  zulip#4936 (comment)

That's helpful because the old version of react-native-reanimated
that we're on uses a certain iOS API that Apple identifies as
privacy-sensitive, triggering a "Privacy Manifest" requirement:
  software-mansion/react-native-reanimated#5819
For zulip#5847, we're working on reducing and handling such requirements.

That API usage is removed in v2.9.0-rc.0 of Reanimated (see
just-linked PR), but I didn't pursue upgrading it because that path
seems to require abandoning remote JS debugging, at least according
to a note from 2022. For details on that, search for
"react-native-reanimated" here:
  zulip#5441

Related: zulip#5847
Fixes-partly: zulip#4936
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Apple privacy declaration
2 participants