I’m facing an issue with importing SwiftHTTP into my iOS project. I’ve incorporated the SwiftHTTP.xcodeproject into my workspace and have added all 4 SwiftHTTP.framework files under the build phases section. However, whenever I try to use import SwiftHTTP in my view controller, I am met with a “No such module SwiftHTTP” error.
I’ve tried this on both Xcode 6.4 and 7.1, but the error persists in both versions. The frameworks seem appropriately linked in the settings, yet the import command continues to fail. Has anyone else dealt with this problem when using RapidAPI’s SwiftHTTP library? What might I be overlooking in the setup?
had this exact prob a few months back. check if ur importing it in the right target - xcode gets confused with multiple targets in a workspace. also, make sure swifthttp actually shows up in ur project navigator under the frameworks folder, not just build phases. if still not working, delete derived data folder and restart xcode.
I encountered a similar issue with SwiftHTTP in my project. It’s important to verify your framework search paths in the Build Settings; they must correctly reference the location of your SwiftHTTP frameworks. Additionally, ensure that the architecture of the framework matches your target, particularly when using simulators. If you have multiple versions that could be creating conflicts, I recommend cleaning your build folder thoroughly and then rebuilding it after rechecking the paths. This approach resolved the issue for me.
This usually happens because of module config issues, not linking problems. You added the xcodeproject to your workspace, but check if SwiftHTTP is actually building as a framework target instead of a static library. Go to your project’s Build Settings and find “Defines Module” - make sure it’s set to YES for the SwiftHTTP target. Also check that “Product Module Name” matches exactly what you’re importing. I ran into this same issue last year. The frameworks looked linked correctly, but the module wasn’t generating properly because these settings got messed up during integration.