I’m having trouble getting SwiftHTTP to work in my iOS project. I’ve been following the setup instructions but keep running into issues.
Here’s what I did:
- Added the SwiftHTTP.xcodeproject file to my main project
- In the build phases section, I included all 4 SwiftHTTP.framework files
- Tried to use
import SwiftHTTP
in my ViewController
But I keep getting the error message “No such module SwiftHTTP” when I try to build. This happens on both Xcode 6.4 and 7.1 versions. Has anyone else run into this problem? I’m not sure what step I might be missing in the setup process. Any help would be appreciated!
I faced a similar issue with SwiftHTTP last year. The key is to build the SwiftHTTP framework target before you attempt to import it into your main project. Here’s how to do it: first, select the SwiftHTTP scheme in Xcode and build it. After that, switch back to your app’s scheme. Make sure you are adding the correct framework for your platform since iOS and macOS have different ones. Once you successfully build the SwiftHTTP framework independently, the import should function as expected. Xcode sometimes requires that initial build to recognize the module.
I encountered a similar issue with SwiftHTTP in my iOS project. It turned out I had not set the SwiftHTTP project as a dependency in my main project settings. Ensure you check the target settings of your main project, specifically in the “Dependencies” section under build phases. Add SwiftHTTP there, then perform a clean build. Additionally, check that your framework search paths are correctly set to the SwiftHTTP framework’s location. Once configured correctly, the import should function without issues.
hey ryan, sounds like a linking issue. maybe try building the SwiftHTTP target first? xcode can be tricky about dependencies. also, dbl check that both projects have the same deployment targets, it can cause issues! gl!