Reputation: 368
I know this is duplicated, since the answered solution doesn't work for me, I'm asking again in case someone has come up with any new solution...
Already tried:
Unlinked all auto-linked modules and manually specified them in pod file.
Also tried
use_modular_headers!
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec', :modular_headers => false
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec', :modular_headers => false
Any suggestion is much appreciated.
Upvotes: 17
Views: 13810
Reputation: 736
I was getting this error in a GitHub action, using:
jobs:
build:
name: build
runs-on: macos-latest
I stumbled on this discussion, and a comment by @paulschreiber
My fix was upgrading my GitHub runner form macos-12 to macos-14.
Here's the wird thing: according to the GH Docs, this was in spite of the GH docs specifying that macos-latest
and macos-14
being the same (they're not!!!). It seems like macos-latest
is using an older version of xcode (14.1) where the bug exists (see here, the bug exists only < 14.3); using macos-14
fixed my error:
jobs:
build:
name: build
runs-on: macos-14
Upvotes: 0
Reputation: 109
I actually battled with this problem all night, eventually I cd into /ios/Pods/Headers/Public/glog/glog/logging.h
Then I changed
FROM
TO
#include "glog/glog/log_severity.h"
#include "glog/glog/vlog_is_on.h"
force overwite
Save
then: npx expo run:ios again to restart
Upvotes: 6
Reputation: 368
After lots of digging, I suspected maybe the module being imported may be in a separate folder, so I double checked my folder structure to make sure everything was okay.
Here's what I found.
log_severity.h
is in a subfolder named glog
, so I changed the import statement to import from the subfolder, and this worked for me.
#include "glog/glog/log_severity.h"
I did the same for any other import statements trying to import modules found in the glog
subfolder.
I got a warning while doing so saying the file is read-only, but I chose to overwrite it anyway, and the project built succesfully.
Upvotes: 10
Reputation: 677
I also struggled with that issue and found came up with the solution. Actually, I tried the same thing as you did but I found it wrong.
use_modular_headers!
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec', :modular_headers => false
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec', :modular_headers => false
Adding this didn't solve the issue but I added only glog
one and it worked.
I mean
use_modular_headers!
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec', :modular_headers => false
Upvotes: 21