software-mansion / react-native-reanimated

React Native's Animated library reimplemented
https://docs.swmansion.com/react-native-reanimated/
MIT License
8.89k stars 1.3k forks source link

fix: build issues on visionOS #5980

Closed okwasniewski closed 5 months ago

okwasniewski commented 5 months ago

Summary

This PR fixes build issues for visionOS. The CACurrentMediaTime API comes from QuartzCore which was not imported in this file. Unfortunately, visionOS is more strict and requires explicit imports, this shouldn't cause any issues on other platforms.

Test plan

Build the app for visionOS

tomekzaw commented 5 months ago

@okwasniewski Thanks for the PR!

I've noticed that you've added an import in #if TARGET_IPHONE_SIMULATOR which is set only on simulators, is this intended?

okwasniewski commented 5 months ago

Thanks for checking the PR @tomekzaw ! You are right this import should be added for every configuration not only simulators. I've moved the import 👍🏻