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

UIScreen' is unavailable: not available on visionOS #5047

Closed
purevsurena opened this issue May 9, 2024 · 1 comment
Closed

UIScreen' is unavailable: not available on visionOS #5047

purevsurena opened this issue May 9, 2024 · 1 comment
Labels
bug Something isn't working invalid This doesn't seem right

Comments

@purevsurena
Copy link

Summary

When integrating the react-native-maps library with a React Native app that utilizes the callstack/react-native-visionos library for visionOS development, a build error occurs. The error, as shown in the attached screenshot, indicates a Library not found for -lGoogleMaps issue. This issue prevents successful app compilation and might be related to compatibility between the two libraries.
Screenshot 2024-05-09 at 11 31 10

Reproducible sample code

<MapView
   style={{ flex: 1, backgroundColor: Colors.white100 }}
   initialRegion={region}
   provider={PROVIDER_GOOGLE}
   region={region}
   showsUserLocation
   onRegionChangeComplete={onRegionChangeComplete}
   clusterColor="#703ED9"
>

Steps to reproduce

  1. Create a React Native project with callstack/react-native-visionos.
  2. Install react-native-maps using the recommended installation method.
  3. Attempt to build the app.
  4. Observe the build error.

Expected result

The app should compile successfully and include react-native-maps functionality.

Actual result

The builds fail with the error Library not found for -lGoogleMaps.

React Native Maps Version

1.15.1

What platforms are you seeing the problem on?

iOS (Apple Maps), iOS (Google Maps)

React Native Version

0.73.6

What version of Expo are you using?

Not using Expo

Device(s)

VisionPro Simulator

Additional information

No response

@purevsurena purevsurena added the bug Something isn't working label May 9, 2024
@salah-ghanim
Copy link
Collaborator

@purevsurena google-maps-sdk is not compatible with visionOS, see releases by google here:
https://developers.google.com/maps/documentation/ios-sdk/release-notes
I believe that the MapKit from apple works with visionOS, but I haven't tested so:

  1. please use react-native-maps pod instead of react-native-google-maps pod.
  2. you can try to exclude the GoogleMaps Pod from visionOS build, for that you need to look outside this lib since it's a generic xcode build config (excluding dependency from a specific OS / target).

I'm closing this issue as out of scope.

@salah-ghanim salah-ghanim added the invalid This doesn't seem right label May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants