ios - Xcode stdint.h #error This file should only be included when compiling with MSVC -


i've got cocoapods react native project in xcode has been working 99% of time past few months. (the 1% random stuff this, linker errors, etc... comes , goes seemingly @ random).

i installed new pod , corresponding npm dependency today, , in past when added pods have issues until try things pod deintegrate, pod install, react-native link , clean xcode project, example. time seems nothing fixing it.

every time build, whether simulator or physical device, following error stdint.h

this file should included when compiling msvc.

it's pretty easy find source of error, it's explicitly user-defined in stdint.h:

screenshot of stdint.h

but can't life of me figure out why it's getting triggered. says right there in comments msvc included. knowledge, c-based xcode compiler should provide msvc version satisfy conditional. additionally, throughout course of troubleshooting/experimenting past few hours, culprit calling error has changed multiple times. right it's coming rctfbsdk earlier came rnfirebase.

checking full error tree, can find files requesting `stdint.h, given such fundamental file doubt it's relevant- here:

xcode error tree

based on investigation far, i'm inclined believe configuration error in xcode causing problem, cocoapods (but frankly i'm not sure)

all know works without pod/npm dependency (which, way, unrelated facebook sdk throwing error) , when add package.json , podfile, standard npm install pod install react-native link happens.

here i've tried:

  • every single combination of npm install npm update npm link react-native link pod deintegrate pod install
  • deleted xcworkspace , regenerated pod install
  • removed user-defined error conditional (build successful crashed shortly after launch error: [fatal][tid:com.facebook.react.shadowqueue] exception '*** -[__nsarraym insertobject:atindex:]: index 1 beyond bounds empty array' thrown while invoking managechildren on target uimanager params (...
  • completely reinstalled xcode
  • reverted previous git commit (from before added new pod) , worked fine
  • shook fist @ , yelled (last resort)

also, have 100% confidence in podfile , package.json integrity. copied installation procedure established repository.

i surprised find absolutely 0 information regarding this. closest thing found relates c++ (understandably).

anyone got theories on this? thanks. please let me know other specific info did not provide.

to quote rnfirebase author:

ye it's annoying thing @ moment having leveldb on cocoa pods

here's temporary workaround:

cd ios && rm -rf pods/leveldb-library/port/win

you may need update podfile follows:

pod 'react', :path => '../node_modules/react-native', :subspecs => [     'core',     'devsupport', # include enable in-app devmenu if rn >= 0.43     'rcttext',     'rctnetwork',     'rctwebsocket', # needed debugging     # add other subspecs want use in project ] 

this avoid further errors if you're running 0.48.x.

you may want add temporary workaround @ end of podfile don't need worry it:

# temporary workaround https://github.com/invertase/react-native-firebase/issues/395 post_install   `rm -rf pods/leveldb-library/port/win` end 

sources:


Comments

Popular posts from this blog

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -

python - Error while using APScheduler: 'NoneType' object has no attribute 'now' -