I recently integrated SPM into my project and I am trying to import it an Objc .h file.
But Keep getting error of 'SideMenu/SideMenu-Swift.h' file not found
This is how I am importing it #import <SideMenu/SideMenu-Swift.h>
is there any other way to do this please?
Related
I upgraded ios version to 11.4, now when I build my project I am getting this error as AWSCore file not found'AWSCore/AWSCore.h' file not found
import and
failed to emit precompiled header
Please help how to resolve it
For me the issue was in the AWSFMDB+AWSHelpers.h file.
It has this import #import <AWSCore/AWSCore.h> which is weird since it's the package importing itself.
I manually deleted this line and rebuilt the project and it worked.
AWSFMDB+AWSHelpers
I'm kicking the tires of Swift a little. I'm not using Xcode. I just have a simple .swift file and #!/usr/bin/env swift at the top of the file.
In the file, I have import Blahblah and a file called Blahblah in the same directory.
I get error: no such module 'Blahblah' however when running the .swift file.
How do I import the swift module? Is there something special I need to do?
I have a workspace with multiple targets and mixed development with SWIFT and Objective-C. After installing CocoaLumberjack with CocoaPods:
pod 'CocoaLumberjack/Swift'
I can use it my project without any problems. All my targets get compiled except Test target. When I run tests I get "build failed" error within the bridging header file
<CocoaLumberjack/CocoaLumberjack.h> file not found
at:
#import <CocoaLumberjack/CocoaLumberjack.h>
Do you have any ideas how to fix the issue? Thanks!
I'm trying to build a command-line tool which uses sqlite. I have downloaded Stephen Celis' swift wrapper, SQLite.swift, and built a working OS X app. However, I am not able to build my command-line tool. I believe that I correctly followed the instructions to do so in the SQLite.swift Documentation for frameworkless targets, but apparently I am missing something. I get an error in Helper.swift # import CSQLite -> No such module 'CSQLite'.
I am linking against libsqlite3.dylib (also tried libsqlite3.tbd)
I added the SQLite.swift source to my project
I added #import sqlite3.h & #import "SQLite-Bridging.h" to my bridging header file. Perhaps of note, when I right-click on sqlite3.h or SQLite-Bridging.h, xCode does not know where/what they are.
I'm happy to send my test project (about 80KB, compressed) to anyone who can and is willing to help. There is probably a very simple solution, I just do not see what it is.
thx for any help,
-Craig
I've faced the same problem.
There were lots of compiler errors like "Connection.swift:26:8: Could not build Objective-C module 'CSQLite'"
The error has roots to the "lctx.h:13:25: Use of undeclared identifier 'SYS_getlcid'"
It worth mentioning that I have two Xcodes installed - v 6.2 at /Applications and v 7.3 at ~/Applications. My project is iOS app on Swift with SQLite pod and I open it with the Xcode 7.3.
The SQLite pod has a file at project_folder/Pods/SQLite.swift/CocoaPods/iphonesimulator/module.modulemap.
The file had the content
module CSQLite [system] {
header "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/sqlite3.h"
export *
}
To fix compiler errors I changed the content of module.modulemap to
module CSQLite [system] {
header "/Users/my_user_name/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/sqlite3.h"
export *
}
The change is that I pointed search of sqlite3.h into my ~/Applications folder where Xcode 7.3 is located.
This made my project compiling.
I got a swift project ,and use CocoaPod to import the third part repositories. In pod file I use use_frameworks!, so the repositories will build into framework to use. And I import the ObjC framework like #import "" or #import <> in my Bridging Header.
In this situation, I run the project, it works. but When I archive, “file not found” is found in Bridging Header file.
`BridgingHeader.h:5:9: error: 'RESideMenu/RESideMenu.h>' file not found
#import <RESideMenu/RESideMenu.h>
<unknown>:0: error: failed to import bridging header 'xxx-Bridging-Header'`
and
`failed to import bridging header '/Users/xxx/Documents/xxxProjectName/xxxProjectName/xxxProjectName-Bridging-Header.h'`
How can i solve the problem?
My solution is :
Do not import the ObjC framework in bridging header file, just import the framework in the files in which the framework is needed. just like:
import xxxframework
I went to Target->Build Phases -> Link Binary With Libraries
added the framework I was trying to import inside the bridging header file.
It fixed the error for me.