Monday, 8 October 2018

React-native 0.57 ios limits file not found could not build module CoreFoundation

RN 0.57.1

RN-cli 2.0.1

xCode: 9.4.1 (9F2000) or xCode 10

After an update of RN from 0.56 to 0.57.0 (or 0.57.1) I get a lot of could not build module 'CoreFoundation' or could not build module Foundation or limits file not found

I followed exactly the steps from RN doc for this update.

I tried removing ios/build folder, cleaning cache, re-installing everything but nothing worked.

▸ Building BunteMobile/OneSignalNotificationServiceExtension [Debug] ▸ Check Dependencies ▸ Compiling NotificationService.m

/Users/myuser/Desktop/projects/mobileapp/ios/../node_modules/react-native/ReactCommon/fabric/graphics/platform/ios/float.h:8:10: 'limits' file not found

#include <limits>

/Users/myuser/Desktop/projects/mobileapp/ios/../node_modules/react-native/ReactCommon/fabric/graphics/platform/ios/float.h:8:10: 'limits' file not found

#include <limits>

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:10: could not build module 'CoreFoundation'

#include <CoreFoundation/CoreFoundation.h>

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecBase.h:28:10: could not build module 'CoreFoundation'

#include <CoreFoundation/CFBase.h>

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetwork.h:18:10: could not build module 'CoreFoundation'

#include <CoreFoundation/CoreFoundation.h>

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/NSString+UserNotifications.h:8:9: could not build module 'Foundation'

#import <Foundation/Foundation.h>

If I remove the OneSignalNotificationServiceExtension instead of 7 errors I get another 15 errors in other parts of the project:

/Users/myuser/Desktop/projects/mobileapp/ios/../node_modules/react-native/ReactCommon/fabric/graphics/platform/ios/float.h:8:10: 'limits' file not found

#include <limits>

/Users/myuser/Desktop/projects/mobileapp/ios/../node_modules/react-native/ReactCommon/fabric/graphics/platform/ios/float.h:8:10: 'limits' file not found

#include <limits>

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:10: could not build module 'CoreFoundation'

#include <CoreFoundation/CoreFoundation.h>

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecBase.h:28:10: could not build module 'CoreFoundation'

#include <CoreFoundation/CFBase.h>

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetwork.h:18:10: could not build module 'CoreFoundation'

#include <CoreFoundation/CoreFoundation.h>

/Users/myuser/Desktop/projects/mobileapp/ios/build/Build/Products/Debug-iphonesimulator/include/React/RCTBridgeModule.h:8:9: could not build module 'Foundation'

#import <Foundation/Foundation.h>

The only workaround that I found is to downgrade RN back to 0.56...

According to the RN team answer from here https://github.com/facebook/react-native/issues/21482

changing all babel deps to 7 should fix the issue but even after an npx babel-ugrade -w and a reinstall of node modules + cache clean I get the same errors.

but still same problems.

Should any with header search paths be updated in extensions/ios build settings after update to 0.57?

I've spent 3 days with this IOS building issue....

Note: I was able to build android after the upgrade of RN and babel.



from React-native 0.57 ios limits file not found could not build module CoreFoundation

No comments:

Post a Comment