Skip to content

Conversation

@whiteHatCip
Copy link
Contributor

@whiteHatCip whiteHatCip commented Aug 22, 2025

Description

After upgrading to React Native 0.81.0, an error stating that RCTFollyConvert.h could not be found, I had to handle the error and realized that the file that could not be found had been deprecated, hence, rather than trying to find a way to import that same file, it was the case that the deprecated file had to be ditched in favor of the one that replaces it

Checklist

  • I've read CONTRIBUTING.md
  • I updated the doc/other generated code with running yarn generate in the root folder
  • I have tested the new feature on /example app.
    • In V11 mode/ios
    • In New Architecture mode/ios
    • In V11 mode/android
    • In New Architecture mode/android
  • I updated the example app (but no new feature has been implemented)

iOS only Changes

Added RNMBXFollyConvert.h for compatibility

Introduced a new header RNMBXFollyConvert.h that conditionally imports RNMBXFollyConvert.h from the correct location depending on the build configuration (meaning if the user uses use_frameworks! :linkage => :static in their pod file, which is a very common scenario for developers using firebase in their react native apps).

This change was necessary because the import path for react/utils/FollyConvert.h differs when building with or without use_frameworks! (static libs vs modular headers). Some environments also expose legacy or platform-specific paths. By centralizing the conditional imports in a single file, we avoid scattered #if __has_include blocks and ensure consistent, portable compilation across setups. A backward-compatible import is offered for older react-native users that still need to import RCTFollyConvert.h file

@mfazekas
Copy link
Contributor

@whiteHatCip thanks much for looking into this.

So for upgrade I've checked and the diff looks good you made all changes shown by:
https://react-native-community.github.io/upgrade-helper/?from=0.80.2&to=0.81.0

For the RCTFollyConvert.h => FollyConvert.h, which RN versions is that compatible with? And shouldn't we use #import <react/utils/FollyConvert.h>?

@whiteHatCip
Copy link
Contributor Author

whiteHatCip commented Aug 22, 2025

@mfazekas speaking of using

#import <react/utils/FollyConvert.h>

you are totally right, but when I was trying to update my app using a patch-package patch, that import was not working properly, therefore I did fallback to that import using quotes. Now I just updated those imports and the example app is building successfully ✌🏻

And lastly, my own application is having issues when trying to run on android too. Are you experiencing the same issue too?

@whiteHatCip whiteHatCip force-pushed the defects/fixing-RCTFollyConvert_h-not-found branch from 0253332 to 4b9ab15 Compare August 22, 2025 12:53
@whiteHatCip whiteHatCip reopened this Aug 22, 2025
@whiteHatCip whiteHatCip force-pushed the defects/fixing-RCTFollyConvert_h-not-found branch from 4f95936 to 2b49028 Compare August 22, 2025 22:08
@whiteHatCip whiteHatCip changed the title iOS: Fixing import for deprecated RCTFollyConvert.h file in favor of FollyConvert.h Supporting React Native 0.81.0, Updating Example App, Updating Project Dependencies, Fixing ESLint and Typescript Warnings and Errors, Updating UserLocation setLocationManager Aug 22, 2025
@whiteHatCip whiteHatCip force-pushed the defects/fixing-RCTFollyConvert_h-not-found branch from 9b1bb85 to a95c23d Compare August 22, 2025 22:58
@whiteHatCip whiteHatCip marked this pull request as ready for review August 23, 2025 03:16
@whiteHatCip whiteHatCip temporarily deployed to CI with Mapbox Tokens August 24, 2025 19:32 — with GitHub Actions Inactive
whiteHatCip added a commit to whiteHatCip/maps that referenced this pull request Aug 25, 2025
rnmapbox#3937

In order to be able to run the example app that uses react-native 0.81.0
whiteHatCip added a commit to whiteHatCip/maps that referenced this pull request Aug 25, 2025
rnmapbox#3937

In order to be able to run the example app that uses react-native 0.81.0
@whiteHatCip whiteHatCip requested a review from mfazekas August 25, 2025 08:55
whiteHatCip added a commit to whiteHatCip/maps that referenced this pull request Aug 25, 2025
In order to be able to run the example app that uses react-native 0.81.0
@whiteHatCip whiteHatCip force-pushed the defects/fixing-RCTFollyConvert_h-not-found branch from b3bbaff to 02d4107 Compare August 25, 2025 09:17
@whiteHatCip whiteHatCip temporarily deployed to CI with Mapbox Tokens August 25, 2025 09:22 — with GitHub Actions Inactive
@whiteHatCip whiteHatCip temporarily deployed to CI with Mapbox Tokens August 25, 2025 09:22 — with GitHub Actions Inactive
@whiteHatCip whiteHatCip temporarily deployed to CI with Mapbox Tokens August 25, 2025 09:22 — with GitHub Actions Inactive
@whiteHatCip whiteHatCip temporarily deployed to CI with Mapbox Tokens August 25, 2025 09:22 — with GitHub Actions Inactive
@whiteHatCip whiteHatCip temporarily deployed to CI with Mapbox Tokens August 25, 2025 09:22 — with GitHub Actions Inactive
@whiteHatCip whiteHatCip temporarily deployed to CI with Mapbox Tokens August 25, 2025 09:22 — with GitHub Actions Inactive
@whiteHatCip whiteHatCip temporarily deployed to CI with Mapbox Tokens August 25, 2025 09:22 — with GitHub Actions Inactive
@mfazekas mfazekas merged commit 6f5f72c into rnmapbox:main Aug 25, 2025
11 checks passed
@whiteHatCip whiteHatCip deleted the defects/fixing-RCTFollyConvert_h-not-found branch August 25, 2025 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants