I have installed RealmSwift's dynamic frameworks in version 0.98.2.
(CocoaPods didn't work.)
I get the following error:
module-includes>:1:9: note: in file included from <module-includes>:1:
#import "/Users/adambella/Documents/Pesti_I.munka/FrontSide/FestivalApp-iOS/./Realm.framework/Headers/Realm.h"
^
/Users/adambella/Documents/Pesti_I.munka/FrontSide/FestivalApp-iOS/./Realm.framework/Headers/Realm.h:21:9: error: 'Realm/RLMArray.h' file not found
#import <Realm/RLMArray.h>
^
<unknown>:0: error: could not build Objective-C module 'Realm'
How can I fix it?
Try to import the import the framework not with an absolute path, but just as seen below.
#import <Realm/Realm.h>
In addition please navigate to your target’s “Build Settings”, and make sure that the parent path to RealmSwift.framework is included in the “Framework Search Paths” section.
Have you tried install it statically?
Just drag and drop the "Realm.framework", "RealmSwift.framework" files to your xcode project and check "copy items if need".
Then add the frameworks to the Embedded Binaries in your target project.
http://s8.postimg.org/6cmfwglkj/Captura_de_pantalla_2016_02_25_a_las_9_42_20_a_m.png
Clean build folder
Build folder location is
Users/{home_directory} /Library/Developer/Xcode/DerivedData/{app_name} -bxffdjvuyjrewicuwaxocbbgxzrq
Related
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.
React-native git associated ticket:
https://github.com/facebook/react-native/issues/21482
To fix all these errors I had to remove React and ReactCommon from Project Header Search paths and from OneSignalNotificationServiceExtension target header search paths.
1) Removing from project header search paths:
The crashes were related to limits, CoreFoundation, Foundation and CoreGraphics.
I went to Project Header Search Paths and removed the React and ReactCommon dependencies from there.
This is how my project header search paths looks now:
2) Removing from one-signal extension: (Optional, if you don't have any extension you don't have to do this)
This is how the paths of that extension used to look when crashing:
This is how the target of that extension looks now:
Note: I haven't changed anything in the project target header search paths.
I am not sure what changed in RN 0.57, why it was crashing now in 0.57, how this header search paths should be in extensions, project and target. Why previously having React and ReactCommon there worked and why now it is not working anymore.
My project was created 3 years ago and had many RN updates. It is possible that at some point React and ReactCommon were needed in the project header search paths.
As I wrote in my question, this problem was signaled in RN github too,
more details can be found here:
https://github.com/facebook/react-native/issues/21482#issuecomment-427815231
I'm getting the following error when trying to run any of my unit or UI tests. Doesn't happen when running the application itself. The error message is shown below:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBase.h:12:10: note: while building module 'CoreFoundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBase.h:12:
#include <CoreFoundation/CFBase.h>
^
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "Headers/CoreFoundation.h"
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:43:10: note: in file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:43:
#include <CoreFoundation/CFBase.h>
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:72:10: note: in file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:72:
#include <Block.h>
^
/Users/eirik/Documents/Utvikling/iOS/ProsjekterSamarbeid/AnchorPoint Fishing as/FerskFiskiOS/Pods/leveldb-library/table/Block.h:10:10: note: in file included from /Users/eirik/Documents/Utvikling/iOS/ProsjekterSamarbeid/AnchorPoint Fishing as/FerskFiskiOS/Pods/leveldb-library/table/Block.h:10:
#include "leveldb/iterator.h"
^
/Users/eirik/Documents/Utvikling/iOS/ProsjekterSamarbeid/AnchorPoint Fishing as/FerskFiskiOS/Pods/leveldb-library/include/leveldb/iterator.h:18:10: note: in file included from /Users/eirik/Documents/Utvikling/iOS/ProsjekterSamarbeid/AnchorPoint Fishing as/FerskFiskiOS/Pods/leveldb-library/include/leveldb/iterator.h:18:
#include "leveldb/slice.h"
/Users/eirik/Documents/Utvikling/iOS/ProsjekterSamarbeid/AnchorPoint Fishing as/FerskFiskiOS/Pods/leveldb-library/include/leveldb/slice.h:21:10: error: 'string' file not found
#include <string>
^
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "Headers/CoreGraphics.h"
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:8:10: note: in file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:8:
#include <CoreGraphics/CGBase.h>
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBase.h:12:10: error: could not build module 'CoreFoundation'
#include <CoreFoundation/CFBase.h>
^
<unknown>:0: error: could not build Objective-C module 'CoreGraphics'
I'm using Xcode 9 in Swift 3.2 mode and CocoaPods. I'm using Firebase and FirebaseUI, which has leveldb as a dependency. You can see that the error is first triggered in leveldb/slice.h, which cannot find the string file.
I have tried the following up to this point:
Clean (Shift + CMD + K)
Remove DerivedData
Clean Build Folder...
Allow Non-Modular Includes In Framework Modules in Build Settings.
pod deintegrate, pod clean pod install.
For what it's worth, here's the error in the Issue Navigator:
Any suggestions?
This looks similar to a CocoaPods issue that was fixed in CocoaPods 1.4.0. Search paths were not properly set for unit test targets.
Try updating to the CocoaPods 1.4.0 beta and rerun pod update
Or use a comparable workaround to the one described here for the leveldb path:
Add "${PODS_ROOT}/leveldb-library/include" to your Tests target only under Build Settings -> Header Search Paths
I've installed an open source library with Cocoapods where I can make adjustments but I can't import a file in my own project into the open source file. Is it possible?
Below are the possibilities that I tried
// In the open source file
#import "MyClassFileInOwnProject.h" -- Error: file not found
#import <MyClassFileInOwnProject.h> -- Error: file not found
#import "ProjectFolderName/MyClassFileInOwnProject.h" -- Error: file not found
#import <ProjectFolderName/MyClassFileInOwnProject.h> -- Error: file not found
After cocoapods 0.38.0 I updated my project to use_frameworks! so that I can make use of Swift modules.
Now whenever I try and debug via lldb I get the following error:
error: Error in auto-import:
failed to get module 'my-app-name' from AST context:
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "/Path/To/Project/Pods/Target Support Files/FBSDKCoreKit/FBSDKCoreKit-umbrella.h"
^
/Path/To/Project/Pods/Target Support Files/FBSDKCoreKit/FBSDKCoreKit-umbrella.h:6:9: note: in file included from /Path/To/Project/Pods/Target Support Files/FBSDKCoreKit/FBSDKCoreKit-umbrella.h:6:
#import "FBSDKAppLinkResolver.h"
^
/Path/To/Project/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkResolver.h:26:10: error: include of non-modular header inside framework module 'FBSDKCoreKit.FBSDKAppLinkResolver'
# import <Bolts/BFAppLinkResolving.h>
^
could not build Objective-C module 'FBSDKCoreKit'<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "/Path/To/Project/Pods/Target Support Files/FBSDKLoginKit/FBSDKLoginKit-umbrella.h"
^
/Path/To/Project/Pods/Target Support Files/FBSDKLoginKit/FBSDKLoginKit-umbrella.h:3:9: note: in file included from /Path/To/Project/Pods/Target Support Files/FBSDKLoginKit/FBSDKLoginKit-umbrella.h:3:
#import "FBSDKLoginButton.h"
^
A fatal parse error has occurred. LLDB may become unstable; please restart your debug session as soon as possible.
I did a bit of digging and found that if you set Allow Non-modular Includes in Framework Modules to yes for the FBSDKCoreKit target in the Pods project, that fixes the LLDB errors.
CDVPlugin class FacebookConnectPlugin (pluginName: FacebookConnectPlugin) does not exist.
2014-12-03 16:12:11.472 crossfit[26380:613] ERROR: Plugin 'FacebookConnectPlugin' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml.
i found my solution
in XCode, goto Build Phases -> open the Compiled Sources dropdown. Click + and add the missing plugin .m file that should be in your Plugins directory (but is missing from the compiled sources)