react-native-radar: Build failing on new version 2.0.0

After updating react-native-radar to version 2.0, I’ve been getting some strange build errors:

While building module 'Foundation' imported from ../../../ios/Pods/Headers/Public/RadarSDK/RadarSDK/RadarSDK.h:8:
While building module 'CoreFoundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In file included from <module-includes>:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:43:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:72:
In file included from ../../../ios/Pods/leveldb-library/table/Block.h:10:
In file included from ../../../ios/Pods/leveldb-library/include/leveldb/iterator.h:18:
../../../ios/Pods/leveldb-library/include/leveldb/slice.h:21:10: fatal error: 'string' file not found
#include <string>
         ^~~~~~~~
1 error generated.
While building module 'Foundation' imported from ../../../ios/Pods/Headers/Public/RadarSDK/RadarSDK/RadarSDK.h:8:
In file included from <module-includes>:1:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:10: fatal error: could not build module 'CoreFoundation'
#include <CoreFoundation/CoreFoundation.h>
 ~~~~~~~~^
While building module 'Foundation' imported from ../../../ios/Pods/Headers/Public/RadarSDK/RadarSDK/RadarSDK.h:8:
While building module 'Security' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLCredential.h:9:
In file included from <module-includes>:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Security.framework/Headers/Security.h:27:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecBase.h:28:10: fatal error: could not build module 'CoreFoundation'
#include <CoreFoundation/CFBase.h>
 ~~~~~~~~^
1 error generated.
While building module 'Foundation' imported from ../../../ios/Pods/Headers/Public/RadarSDK/RadarSDK/RadarSDK.h:8:
While building module 'CFNetwork' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLError.h:9:
In file included from <module-includes>:1:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetwork.h:18:10: fatal error: could not build module 'CoreFoundation'
#include <CoreFoundation/CoreFoundation.h>
 ~~~~~~~~^
1 error generated.
4 errors generated.
In file included from /Users/ntomallen/source/zonder-mobile-app/node_modules/react-native-radar/ios/RNRadar.m:1:
In file included from /Users/ntomallen/source/zonder-mobile-app/node_modules/react-native-radar/ios/RNRadar.h:1:
../../../ios/Pods/Headers/Public/RadarSDK/RadarSDK/RadarSDK.h:8:9: fatal error: could not build module 'Foundation'
#import "Foundation/Foundation.h"
 ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
While building module 'CoreLocation' imported from ../../../ios/Pods/Headers/Public/RadarSDK/RadarSDK/Radar.h:8:
In file included from <module-includes>:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreLocation.framework/Headers/CoreLocation.h:18:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreLocation.framework/Headers/CLErrorDomain.h:9:9: fatal error: could not build module 'Foundation'
#import <Foundation/Foundation.h>
 ~~~~~~~^
1 error generated.



** BUILD FAILED **

I also followed the migration instructions for updating the iOS and Android modules as well. Everything seems to be working correctly on Android.

I’ve also been researching this error, and I none of the suggested solutions for this error worked.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 18 (15 by maintainers)

Most upvoted comments

@ntomallen Good news! I was able to reproduce with that sample project (thanks again) and isolated the problem to the added search paths in this commit - https://github.com/radarlabs/react-native-radar/commit/f776c38389a8970cb1f587b9fad0d3938a52c885

Going to push a fix for this ASAP and release a new version.

@coolbrow I’m going to try to reproduce the issue in a repo that I can send to you. Basically gonna strip out all of the actual app and keep the dependencies and build configuration the same

Hey @coolbrow I’m working with Noah. Want to add a little more information. When we are working with 2.0. ,trying to make the app build results in the following error. Argument list too long: recursive header expansion failed at /Users/feargalwalsh/Downloads/zonder/zonder-mobile-app/node_modules/react-native-radar/ios/../../../ios/build/Index/DataStore/v5/records/76.

I tried all sorts of variations of the framework and header search paths in our app target and ended up deleting any references to radar and it was still giving me that error. Cleaning it and running npm cache verify restarting the packager closing opening Xcode and a bunch of other standard cache cleaning type stuff in the pods and node_modules had no effect. So then I tried downgrading on my own branch and I have all the errors Noah listed above now. It seems as if it would be easier to debug if I could get the first error fixed. Have you seen it before?