rnmapbox / maps

A Mapbox react native module for creating custom maps
MIT License
2.19k stars 834 forks source link

New project will not build with $RNMapboxMapsVersion = '=11.0.0' #3459

Closed grahamyesfit closed 4 months ago

grahamyesfit commented 4 months ago

Environment

Steps to reproduce

  1. Create a new RN project:
react-native init mapboxSample --version react-native@0.72.12
cd mapboxSample
npm install @rnmapbox/maps@10.1.19 --save`
  1. Run pod install:
cd ios
pod install
  1. Install fails with error:
[!] CocoaPods could not find compatible versions for pod "rnmapbox-maps":
  In Podfile:
    rnmapbox-maps (from `../node_modules/@rnmapbox/maps`)

Specs satisfying the `rnmapbox-maps (from `../node_modules/@rnmapbox/maps`)` dependency were found, but they required a higher minimum deployment target.

Note that pod install works when I remove the $RNMapboxMapsVersion variable from the pod file.

mfazekas commented 4 months ago

@grahamyesfit you'll need to up the deployment target in your Podfile project.

platform :ios, '13.4'

grahamyesfit commented 4 months ago

@mfazekas Hi, thanks for the tip. However, the IOS version is determined by the React Native version (from the min_ios_version_supported property). I'm using RN 0.72.12, and the min version is 12. It's raised to 13 in RN 0.73, which I'm not ready to go to yet.

I "fixed it" by changing the podspec back to 12.4 in the RNMapbox/maps project and using patch-package.

mfazekas commented 4 months ago

@grahamyesfit ah I see. This should be fixed on #main see https://github.com/rnmapbox/maps/pull/3433 will release a new version with that fix soon

doneill commented 1 month ago

NOTE: Fixed by removing Podfile.lock file and rebuilding deps

@mfazekas I have that version of the podspec and I got the error, then ran pod updateMapboxMaps which led leads to the following:

[!] CocoaPods could not find compatible versions for pod "Turf":
  In snapshot (Podfile.lock):
    Turf (= 2.7.0)

  In Podfile:
    rnmapbox-maps (from `../node_modules/@rnmapbox/maps`) was resolved to 10.1.28, which depends on
      MapboxMaps (= 11.3.0) was resolved to 11.3.0, which depends on
        Turf (= 2.8.0)

    rnmapbox-maps (from `../node_modules/@rnmapbox/maps`) was resolved to 10.1.28, which depends on
      Turf

You have either:
 * changed the constraints of dependency `Turf` inside your development pod `rnmapbox-maps`.
   You should run `pod update Turf` to apply changes you've made

The whole reason I am upgrading is I am blocked from releasing our app due to the privacy non-compliance.

react-native : 0.69.7 @rnmapbox/maps : 10.1.28 $RNMapboxMapsVersion = '= 11.3.0'

Podfile.lock

~Any suggestions?~!

Fixed by removing Podfile.lock file and rebuilding deps