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

Expo 49 installation issue #3232

Closed
Kylar13 opened this issue Dec 4, 2023 · 7 comments
Closed

Expo 49 installation issue #3232

Kylar13 opened this issue Dec 4, 2023 · 7 comments

Comments

@Kylar13
Copy link

Kylar13 commented Dec 4, 2023

Environment

  • MacOS 13.5.2
  • Apple M2 Pro

Steps to reproduce

  • On a managed expo project:
  • Install @rnmapbox/maps
  • Add the @rnmapbox/maps plugin to app.config.ts:
  plugins: [
    [
      "expo-location",
      {
        locationAlwaysAndWhenInUsePermission: "This is so we can show you cool places near you!",
        isIosBackgroundLocationEnabled: true,
        isAndroidBackgroundLocationEnabled: true,
      },
    ],
    [
      "@rnmapbox/maps",
      {
        RNMapboxMapsImpl: "mapbox-gl",
        RNMapboxMapsVersion: "11.0.0",
        RNMapboxMapsDownloadToken: "<token>",
      },
    ],
  ]
  • run npx expo prebuild to generate new pods

  • Get error:

Command `pod install` failed.
└─ Cause: CocoaPods could not find compatible versions for pod "Mapbox-iOS-SDK":
  In Podfile:
    rnmapbox-maps (from `../../../node_modules/@rnmapbox/maps`) was resolved to 10.0.15, which depends on
      Mapbox-iOS-SDK (= 11.0.0)

None of your spec sources contain a spec satisfying the dependency: `Mapbox-iOS-SDK (= 11.0.0)`.

You have either:
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.

pod exited with non-zero code: 31

The solution I found while browsing this was to run pod update MapboxMaps, but that isn't very helpful on an expo project 😅

Copy link

github-actions bot commented Dec 4, 2023

No code example found in issue body - More info

@Kylar13
Copy link
Author

Kylar13 commented Dec 4, 2023

No code example found in issue body - More info

Is there anything else I was supposed to provide?

@mfazekas
Copy link
Contributor

mfazekas commented Dec 4, 2023

@Kylar13

RNMapboxMapsImpl: "mapbox-gl",
RNMapboxMapsVersion: "11.0.0",
mapbox-gl doesn't supports mapbox 10.* or 11*

rnmapbox-maps (from ../../../node_modules/@rnmapbox/maps) was resolved to 10.0.15, which depends on
10.0.15 doesn't support mapbox 11.*

@Kylar13
Copy link
Author

Kylar13 commented Dec 4, 2023

@Kylar13

RNMapboxMapsImpl: "mapbox-gl",
RNMapboxMapsVersion: "11.0.0",
mapbox-gl doesn't supports mapbox 10.* or 11*

rnmapbox-maps (from ../../../node_modules/@rnmapbox/maps) was resolved to 10.0.15, which depends on
10.0.15 doesn't support mapbox 11.*

Awesome, where can I find those compatibility issues in the docs? To figure out if I wanna downgrade to use mapbox-gl anyway or see what version of rnmapbox-maps I should install

@Kylar13
Copy link
Author

Kylar13 commented Dec 4, 2023

For anyone coming back to this issue, this is what I ended up going for that worked:

  • package.json: "@rnmapbox/maps": "^10.0.15",
  • app.config.js:
    • RNMapboxMapsImpl: "mapbox",
    • RNMapboxMapsVersion: "10.16.2",

Thanks @mfazekas for the quick response!

@hamsterhomka
Copy link

hamsterhomka commented Dec 5, 2023

For anyone coming back to this issue, this is what I ended up going for that worked:

  • package.json: "@rnmapbox/maps": "^10.0.15",

  • app.config.js:

    • RNMapboxMapsImpl: "mapbox",
    • RNMapboxMapsVersion: "10.16.2",

Thanks @mfazekas for the quick response!

Thank you. That indeed helped! It desperately needs to be in the docs.

@chrisl777
Copy link

Note that I did not need to specify a version. The token does need to be correct though, otherwise for some reason it cannot download the pod.

[
      "@rnmapbox/maps",
      {
        RNMapboxMapsImpl: "mapbox",
        RNMapboxMapsDownloadToken: "sk...w"
      }
    ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants