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

MacOS 15 Xcode build Error #3625

Closed
Bayramito opened this issue Sep 17, 2024 · 20 comments
Closed

MacOS 15 Xcode build Error #3625

Bayramito opened this issue Sep 17, 2024 · 20 comments

Comments

@Bayramito
Copy link

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

@73k05
Copy link

73k05 commented Sep 17, 2024

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

@Bayramito
Copy link
Author

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

@predescu
Copy link

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

@73k05
Copy link

73k05 commented Sep 17, 2024

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

@chris-gaona
Copy link

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

@enlivn
Copy link

enlivn commented Sep 17, 2024

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.

@Bayramito
Copy link
Author

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
Copy link
Author

Bayramito commented Sep 17, 2024

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

@73k05
Copy link

73k05 commented Sep 18, 2024

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

@waraness99
Copy link

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!

@jael0x
Copy link

jael0x commented Sep 18, 2024

#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?

@gremech
Copy link

gremech commented Sep 19, 2024

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
Copy link

gremech commented Sep 20, 2024

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'

@hot2eatorg
Copy link

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",
    }
]

@enlivn
Copy link

enlivn commented Sep 23, 2024

#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
    

@tyrauber
Copy link

tyrauber commented Sep 26, 2024

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!

@enlivn
Copy link

enlivn commented Sep 26, 2024

#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

@MarchewkaMatthew
Copy link

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:
#1407 (comment)

@SethArchambault
Copy link

SethArchambault commented Oct 23, 2024

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!

@mfazekas
Copy link
Contributor

Should be addressed by 10.1.32

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