maps icon indicating copy to clipboard operation
maps copied to clipboard

MacOS 15 Xcode build Error

Open Bayramito opened this issue 1 year ago • 18 comments

Environment

  • macOS 15.0 (24A335)
  • @rnmapbox/maps": "^10.1.31"
  • react-native": "0.72.14"

Steps to reproduce

Ekran Resmi 2024-09-17 13 21 56

i got this error after i upgraded my xcode to 16

Bayramito avatar Sep 17 '24 10:09 Bayramito

Hi,

just got the same issue few minutes ago 🫤 I also had to upgrade sentry to ~5.30.0 to fix another issue mixing up package deps validation with expo

Regards 73k05

73k05 avatar Sep 17 '24 10:09 73k05

Hi,

just got the same issue few minutes ago 🫤 I also had to upgrade sentry to ~5.30.0 to fix another issue mixing up package deps validation with expo

Regards 73k05

Same here. I also upgraded to latest

Bayramito avatar Sep 17 '24 11:09 Bayramito

I've managed to build the app on Xcode 16 and iOS 18 with the following changes:

  1. upgrade the Mapbox version in the pod file $RNMapboxMapsVersion = '=11.6.0' Previously I had $RNMapboxMapsVersion = '=11.3.0' After this first change, I've received another error, and with the help from here: https://stackoverflow.com/a/78633109/590626
  2. adding the following code into the target.build_configurations.each do |config| block
if target.name == 'BoringSSL-GRPC'
  target.source_build_phase.files.each do |file|
    if file.settings && file.settings['COMPILER_FLAGS']
      flags = file.settings['COMPILER_FLAGS'].split
      flags.reject! { |flag| flag == '-GCC_WARN_INHIBIT_ALL_WARNINGS' }
      file.settings['COMPILER_FLAGS'] = flags.join(' ')
    end
  end
end

predescu avatar Sep 17 '24 13:09 predescu

Hi @predescu

thank you for the quick & dirty, I still have the error with the command bun expo run ios I guess you execute pod install in the meantime? I can't use this command at the moment...

Regards 73k05

73k05 avatar Sep 17 '24 14:09 73k05

I got the same error with this dependency after fixing the sentry issue. These errors occurred after upgrading my mac to xcode 16 too. I was able to resolve the issue by upgrading the mapbox version in my podfile to $RNMapboxMapsVersion = '=11.6.0' & then upgrading to the latest version of this dependency: "@rnmapbox/maps": "10.1.31"

I'm running expo 51 & react native 0.74.5

chris-gaona avatar Sep 17 '24 17:09 chris-gaona

I've managed to build the app on Xcode 16 and iOS 18 with the following changes: ... 2. adding the following code into the target.build_configurations.each do |config| block

if target.name == 'BoringSSL-GRPC'
  target.source_build_phase.files.each do |file|
    if file.settings && file.settings['COMPILER_FLAGS']
      flags = file.settings['COMPILER_FLAGS'].split
      flags.reject! { |flag| flag == '-GCC_WARN_INHIBIT_ALL_WARNINGS' }
      file.settings['COMPILER_FLAGS'] = flags.join(' ')
    end
  end
end

I guess it's pretty obvious but you need to change the name check to if target.name == 'MapboxMaps' so in case anyone is copy-pasta'ing without reading too carefully ;) ,

if target.name == 'MapboxMaps'
  target.source_build_phase.files.each do |file|
    if file.settings && file.settings['COMPILER_FLAGS']
      flags = file.settings['COMPILER_FLAGS'].split
      flags.reject! { |flag| flag == '-GCC_WARN_INHIBIT_ALL_WARNINGS' }
      file.settings['COMPILER_FLAGS'] = flags.join(' ')
    end
  end
end

cc @73k05 in case this was your issue.

enlivn avatar Sep 17 '24 19:09 enlivn

I've managed to build the app on Xcode 16 and iOS 18 with the following changes: ... 2. adding the following code into the target.build_configurations.each do |config| block

if target.name == 'BoringSSL-GRPC'
  target.source_build_phase.files.each do |file|
    if file.settings && file.settings['COMPILER_FLAGS']
      flags = file.settings['COMPILER_FLAGS'].split
      flags.reject! { |flag| flag == '-GCC_WARN_INHIBIT_ALL_WARNINGS' }
      file.settings['COMPILER_FLAGS'] = flags.join(' ')
    end
  end
end

I guess it's pretty obvious but you need to change the name check to if target.name == 'MapboxMaps' so in case anyone is copy-pasta'ing without reading too carefully ;) ,

if target.name == 'MapboxMaps'
  target.source_build_phase.files.each do |file|
    if file.settings && file.settings['COMPILER_FLAGS']
      flags = file.settings['COMPILER_FLAGS'].split
      flags.reject! { |flag| flag == '-GCC_WARN_INHIBIT_ALL_WARNINGS' }
      file.settings['COMPILER_FLAGS'] = flags.join(' ')
    end
  end
end

cc @73k05 in case this was your issue.

Unfortunately this one did not help to me

Bayramito avatar Sep 17 '24 20:09 Bayramito

EDIT: it was my fault that i leave some miss version implementation of mapbox in podfile. Now it's working fine

Bayramito avatar Sep 17 '24 21:09 Bayramito

Hi @Bayramito ,

It worked for me thank you guys! Indeed I followed @chris-gaona steps:

I got the same error with this dependency after fixing the sentry issue. These errors occurred after upgrading my mac to xcode 16 too. I was able to resolve the issue by upgrading the mapbox version in my podfile to $RNMapboxMapsVersion = '=11.6.0' & then upgrading to the latest version of this dependency: "@rnmapbox/maps": "10.1.31"

I'm running expo 51 & react native 0.74.5

I also upgraded macOS to Sequoia 15.0

@enlivn thank you, I did not need to have to add the specific COMPILER_FLAGS loop code to make it work but I had to remove the Podfile.lock after having this issue:

⚠️  Something went wrong running `pod install` in the `ios` directory.
Command `pod install` failed.
└─ Cause: CocoaPods could not find compatible versions for pod "MapboxMaps":
  In snapshot (Podfile.lock):
    MapboxMaps (= 11.0.0)
  In Podfile:
    rnmapbox-maps (from `../node_modules/@rnmapbox/maps`) was resolved to 10.1.31, which depends on
      MapboxMaps (= 11.6.0)
You have either:
 * changed the constraints of dependency `MapboxMaps` inside your development pod `rnmapbox-maps`.
   You should run `pod update MapboxMaps` to apply changes you've made.
pod install --repo-update --ansi exited with non-zero code: 1

Build on iOS

  • Upgrading to the latest version of this dependency: "@sentry/react-native": "5.30.0", in package.json
  • Upgrading to the latest version of this dependency: "@rnmapbox/maps": "10.1.31" in package.json
  • Upgrading the mapbox version to $RNMapboxMapsVersion = '=11.6.0' in ios/Podfile
  • Deleting lock file rm ios/Podfile.lock
  • Build & Run bun expo run ios

Expo 50.0.17 ReactNative 0.73.6 iOS 18 Xcode 16.0 macOS Sequoia 15.0

Peace 73k05

73k05 avatar Sep 18 '24 06:09 73k05

I got the same error with this dependency after fixing the sentry issue. These errors occurred after upgrading my mac to xcode 16 too. I was able to resolve the issue by upgrading the mapbox version in my podfile to $RNMapboxMapsVersion = '=11.6.0' & then upgrading to the latest version of this dependency: "@rnmapbox/maps": "10.1.31"

I'm running expo 51 & react native 0.74.5

It worked! Thanks @chris-gaona!

waraness99 avatar Sep 18 '24 21:09 waraness99

https://github.com/rnmapbox/maps/issues/3625#issuecomment-2357615603

That worked for me, thanks @73k05

But in my case, After the app is uploaded, shows me some warnings, should I be worried about that?

jael0x avatar Sep 18 '24 22:09 jael0x

Updating maps to v11 doesn't work for me as I also use MapboxNavigation v2 which depends on Maps v10. So I had to make a dirty change directly in ViewAnnotationManager.swift, to get it to at least compile until I found a solution

public var annotations: [UIView: ViewAnnotationOptions] {
    idsByView.compactMapValues { [mapboxMap] id in
        try? mapboxMap.options(forViewAnnotationWithId: id)
    } as [UIView: ViewAnnotationOptions]
}

gremech avatar Sep 19 '24 20:09 gremech

UPD. For those who have to stay on maps v10 MapboxMaps v10.18.2 is compatible with MapboxNavigation v2.18.4 and compiles on the new xcode 16

$RNMapboxMapsVersion = '~> 10.18.2'

gremech avatar Sep 20 '24 08:09 gremech

I got the same error with this dependency after fixing the sentry issue. These errors occurred after upgrading my mac to xcode 16 too. I was able to resolve the issue by upgrading the mapbox version in my podfile to $RNMapboxMapsVersion = '=11.6.0' & then upgrading to the latest version of this dependency: "@rnmapbox/maps": "10.1.31"

I'm running expo 51 & react native 0.74.5

I owe you a beer! For expo user, just upgrade the the @rnmapbox/maps by running:

npm install @rnmapbox/[email protected]

And then set the mapbox version to 11.6.0 in you plugins app config:

[
    "@rnmapbox/maps",
    {
      "RNMapboxMapsVersion": "11.6.0",
    }
]

hot2eatorg avatar Sep 22 '24 11:09 hot2eatorg

#3625 (comment)

That worked for me, thanks @73k05

But in my case, After the app is uploaded, shows me some warnings, should I be worried about that?

@jael0x do you want to post this as a new issue? I was wondering about this too. Without the dSYMs, it's gonna be annoying/impossible to de-symbolicate stack traces once the app is released.

edit: just want to note that I've tried the following 2 things without success

  1. add the Mapbox frameworks to the Link Binary with Libraries in the xcodeproj
  2. update the Podfile post-install hooks:
    post_install do |installer|
      installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
          config.build_settings['DEBUG_INFORMATION_FORMAT'] = 'dwarf-with-dsym'
        end
      end
    end
    

enlivn avatar Sep 23 '24 19:09 enlivn

Edit: With Xode 16, I was getting the ViewAnnotationManager.swift error with RNMapboxMapsVersion 11.3.0 and @rnmapbox/[email protected], but bumping up the SDK to 11.6.0 or down to 10.18.2 builds on Xcode 16. Thanks everyone!

tyrauber avatar Sep 26 '24 10:09 tyrauber

#3625 (comment) That worked for me, thanks @73k05 But in my case, After the app is uploaded, shows me some warnings, should I be worried about that?

@jael0x do you want to post this as a new issue? I was wondering about this too. Without the dSYMs, it's gonna be annoying/impossible to de-symbolicate stack traces once the app is released.

edit: just want to note that I've tried the following 2 things without success

  1. add the Mapbox frameworks to the Link Binary with Libraries in the xcodeproj
  2. update the Podfile post-install hooks:
    post_install do |installer|
      installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
          config.build_settings['DEBUG_INFORMATION_FORMAT'] = 'dwarf-with-dsym'
        end
      end
    end
    

didn't hear back so I've created an issue myself: #3637

enlivn avatar Sep 26 '24 17:09 enlivn

I got the same error with this dependency after fixing the sentry issue. These errors occurred after upgrading my mac to xcode 16 too. I was able to resolve the issue by upgrading the mapbox version in my podfile to $RNMapboxMapsVersion = '=11.6.0' & then upgrading to the latest version of this dependency: "@rnmapbox/maps": "10.1.31" I'm running expo 51 & react native 0.74.5

I owe you a beer! For expo user, just upgrade the the @rnmapbox/maps by running:

npm install @rnmapbox/[email protected]

And then set the mapbox version to 11.6.0 in you plugins app config:

[
    "@rnmapbox/maps",
    {
      "RNMapboxMapsVersion": "11.6.0",
    }
]

Hi @hot2eatorg, thanks for sharing the fix for Expo, could you tell me how you menaged to install the "@rnmapbox/maps": "10.1.31" with this version of expo and react native? I was trying to do that but I receive error described in this comment: https://github.com/rnmapbox/maps/issues/1407#issuecomment-2411168661

MarchewkaMatthew avatar Oct 14 '24 13:10 MarchewkaMatthew

Just noting - Our project is in limbo right now.. We can't move to MapboxMapVersion 11 since that doesn't support terrain yet, and MapboxMapVersion 10.18.* has some weird glitch where the satellite view isn't fully loading in some cases. Xcode really messed that upgrade up.

Hoping v10.1.32 comes out soon so we're able to deploy on ios again. Thanks!

SethArchambault avatar Oct 23 '24 21:10 SethArchambault

Should be addressed by 10.1.32

mfazekas avatar Oct 27 '24 08:10 mfazekas