I am having this problem with a brand new project. This problem happens with both RestKit and Facebook SDK. Strangely SwiftyJSON works just fine. I create a brand new swift
Things I tried:
The only solution I had to this problem was to expose the Pods-(yourapp) target in the scheme picker (next to the run/stop buttons) and manually build that Pods- target before building and running my main app target again. I hope this can save someone 10 minutes!
I had a similar problem. Not with RestKit specifically, but initially with the HockeySDK. I tried everything, including removing and reinstalling pods, updating cocoapods itself and updating pods, deleting derived data, cleaning the project, etc.
I then noticed that every pod was an issue for me. After continuing to search on related topics, I finally discovered that under:
• Target > Build Phases > Link Binary With Libraries
I had a misplaced Pods framework (likely from a prior Pods setup or install attempt).
After removing it, the problem went away. I have noticed that people seemed to experience similar problems under:
• Project > Info > Configurations
as well, where the Pods framework was being mapped incorrectly. So if the first doesn't work for you, you may want to check on the second as well.
For me, 'Find implicit Dependencies' was unchecked. and it was the issue.
Worked fine once I checked
it.
The path: Edit Scheme > Build > Find implicit Dependencies
I had a similar issue when adding Fabric to my project. I had multiple targets (Release and Dev). It would throw No Such Module
for import Fabric
. What worked for me was to go to Project> Build Phases > Link Binary with Libraries and simply marking the status of both the pod framework as Optional.
I also had this issue after renaming my project and modifying the build schemes. After hours of trying to get it to work, I found out what caused the issues for me.
CocoaPods auto-generates build schemes for each library you import. When you rename your project build configurations, these schemes are not updated with the same configurations, because they are in a separate .xcodeproject.
The steps to resolve this were easy:
pod deintegrate
and pod install
After this, you can open Xcode and the build should now work.
This happened to me when an app extension had a different target iOS version than the app. Making them match fixed this for me.