Specs:
Xcode 8.2,
CocoaPods 1.1.1,
OSX 10.12.2
I split my project in 2 projects. One contains my providers (does api calls, database access, etc), the other the UI.
The UI project depends on the providers project. My configuration is working with the simulator but not with the device.
On device, I get:
dyld: Library not loaded: #rpath/Alamofire.framework/Alamofire
Referenced from:
/private/var/containers/Bundle/Application/EAD65532-DD02-4DA6-9877-7937F9D69F26/xxxxx.app/Frameworks/Providers.framework/Providers
Reason: image not found
This is my podfile:
use_frameworks!
workspace 'xxxxx.xcworkspace'
project 'xxxxx.xcodeproj'
project 'Providers/Providers.xcodeproj'
def shared
pod 'QorumLogs'
pod 'Reachability', '~> 3.2'
pod 'RealmSwift'
end
target 'Providers' do
project 'Providers/Providers.xcodeproj'
pod 'Alamofire', '~> 4.0'
pod 'Valet'
pod 'Starscream'
pod 'ChameleonFramework/Swift', :git => 'https://github.com/ViccAlexander/Chameleon.git'
shared
end
target 'xxxxx' do
project 'xxxxx.xcodeproj'
platform :ios, '8.0'
pod 'SwiftValidator', :git => 'https://github.com/i-schuetz/SwiftValidator.git', :branch => 'remove_delegate_callback'
pod 'SwiftCharts', :git => 'https://github.com/i-schuetz/SwiftCharts.git'
pod 'Google/SignIn'
pod 'SwipeView', '~> 1.3.2'
pod 'CMPopTipView', '~> 2.0'
pod 'KLCPopup', '~> 1.0'
pod 'ChameleonFramework/Swift', :git => 'https://github.com/ViccAlexander/Chameleon.git'
pod 'HockeySDK'
shared
end
I also added the binary of Providers to my UI target under "Embedded binaries"
It seems the UI project can't load the dependencies of Providers project. Don't know if this makes sense, but I also tried nesting the configuration of my UI project in Providers, in the podfile, and add inherit! :search_paths to it but it also didn't help.
It works only when I use the same dependencies in both projects.
Ideas?
Edit
I also get this warning when executing pod install, don't know if it's related:
[!] The Podfile contains framework targets, for which the Podfile does
not contain host targets (targets which embed the framework). If this
project is for doing framework development, you can ignore this
message. Otherwise, add a target to the Podfile that embeds these
frameworks to make this message go away (e.g. a test target).
While updating a Swift 2.2 project using the AlamoFire third party framework I ran into several issues just like yours including the dreaded dyld: Library not loaded ...... image not found.
After spending several hours reading about different explanations for the problem,trying to figure it out myself, and implementing many of the suggested fixes, I reached an impasse. Some of the solutions worked on simulator and not iPhone which gave me (false) encouragement to keep trying to fix the problem.
I eventually reached the conclusion that starting with a clean slate may be a better strategy. I had already shown that a new Swift 3 project could use AlamoFire 4.0 and other third party frameworks such as ReactiveSwift (via cocoapds) without a problem. I think this may be a general strategy that avoids the difficulty of tracking down build, build phase, or file location problems.
So here it is. It's very simple. Create a NEW project. Install the AlamoFire and all the other frameworks using cocoapods and test it to make sure it works. At this point delete files you will be replacing such as ViewController.swift and the Main.Storyboard, then drag over all the files from your old project. I converted to swift 3 before I did this to make things even easier. I rebuilt the project and it worked first time! Even the storyboard links were preserved like magic. 1h of work (if that) instead of several! I hope this works for you too!
My perfectly working app used to have an Xcode Project Navigator as shown below.
iOS 10 requirements meant I had to upgrade Xcode to 8.1, which meant upgrading the entire Mac OS to Sierra and also translating the whole app to Swift 2.3.
Needless to say, this caused errors, one of which was an issue with PubNub. However, apart from this new build error the app structure was the same and everything seemed ok after dealing with all the layout issues.
I was requested to run the following steps to try to solve the PubNub pod error despite me warning that previous attempts to deal with the pod file caused fatal errors that were ultimately unrecoverable.
Install all iOS simulators after Xcode update
Open Xcode preferences (Cmd+,) and navigate to ”Locations” tab where will be shown path to ”DerivedData” folder
Click on small circle with arrow on the right side of shown ”DerivedData” path to open it in Finder
Quit Xcode
Remove ”DerivedData” folder
Clean up CocoaPods (if integrated with it) caches by entering this in Terminal:
rm -rf ~/Library/Caches/CocoaPods
From project root (where Podfile is located) run this in Terminal:
pod deintegrate MyApp.xcodeproj
Remove from project root (where Podfile is located) Podfile.lock file
From project root (where Podfile is located) run this in Terminal: pod update
Launch Xcode (hit Shift + Cmd + K just in case)
Try build project
After doing all this my Project Navigator now looks like this.
As you can see, I've lost a load of stuff including the pod file etc. As suspected, my app is now fatally wounded.
My bridging header is red, Restkit.h is red and all pod references gone.
My project root in Finder has the Pods folder and pod file etc, however if I try to drag folders into the project from Finder they do not show as they used to - e.g., folders are blue color not yellow.
I'm on Xcode 8.1 and Cocoapods 1.1.1.
How can I recover my app?
EDIT: If it helps, here is the link to my unsolved question in January which was the last time I dared touch the pod file at all until now. The consequences of this situation are the same as before - the difference is that in January I was ditching 2 weeks work, now I'm looking at ditching 10 months' work.
RestKit.h never found in Xcode project
Podfile:
pod 'RestKit', '~> 0.24.0'
pod 'SimpleKeychain'
pod 'AWSS3'
pod 'VideoCore'
pod 'SDWebImage', '~>3.7'
pod 'SVPullToRefresh'
pod 'PubNub', '~> 3.7.11'
pod 'MZFormSheetController'
Result of pod update in Terminal:
Update all pods
Updating local specs repositories
Performing a deep fetch of the master specs repo to improve future performance
warning: inexact rename detection was skipped due to too many files.
CocoaPods 1.2.0.beta.1 is available.
To update use: sudo gem install cocoapods --pre
[!] This is a test version we'd love you to try.
For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.2.0.beta.1
Analyzing dependencies
[!] The dependency RestKit (~> 0.24.0) is not used in any concrete target.
The dependency SimpleKeychain is not used in any concrete target.
The dependency AWSS3 is not used in any concrete target.
The dependency VideoCore is not used in any concrete target.
The dependency SDWebImage (~> 3.7) is not used in any concrete target.
The dependency SVPullToRefresh is not used in any concrete target.
The dependency PubNub (~> 3.7.11) is not used in any concrete target.
The dependency MZFormSheetController is not used in any concrete target.
From the pod update logs seems like CocoaPods can't find any target where the libraries have to be applied.
Can you try something like this in your Podfile?
target 'YOUR_TARGET_NAME' do
pod 'RestKit', '~> 0.24.0'
pod 'SimpleKeychain'
pod 'AWSS3'
pod 'VideoCore'
pod 'SDWebImage', '~>3.7'
pod 'SVPullToRefresh'
pod 'PubNub', '~> 3.7.11'
pod 'MZFormSheetController'
end
Not sure if it will fix the error you have.
I've run into a problem with Xcode (using Swift) that has me completely stumped. I realize that this question has been asked and answered, but none of the answers have worked for me, and my situation seems to be a bit different than the others, as all of my pods are failing (not just a specific one). They all worked fine a week ago.
I use Cocoapods for some of the more common Swift frameworks (e.g. Alamofire, Eureka, Kingfisher, SwiftyJSON, etc.). They were all working fine in Xcode 7. However, one of the (automatic) updates bumped up my Xcode version, after which it became mandatory to specify your target in the podfile. I did this and ran pod install. The pods are all still there, but now every import statement that relates to these frameworks fails.
At first I thought it was an Alamofire issue, as that's the first one that failed with the "No such module 'Alamofire'" error. I tried everything I could with Alamofire, including the following:
Clean and rebuild
Clean build folder
Restart Xcode
Re-boot computer
Delete all derived data
Added framework to "Linked Frameworks and Libraries"
Added framework to "Link Binary with Libraries"
Verified that I am opening the workspace rather than the project
Re-installed CocoaPods
Re-installed Xcode ver 7.3.1
Nothing would remove the "No such module ..." error. Finally, I removed Alamofire from the pods and just dragged the Alamofire project into my project. This allowed me to remove the import statements for Alamofire. However, to my dismay, now the next framework caused "No such module". I moved the next three frameworks into my project, and it looks like it is just going to keep going. Apparently, none of my Pods frameworks are being recognized anymore. I installed Xcode 8 and tried that with Swift 2.3, but I get the same "No such module" errors.
I really would prefer to use Cocoapods, as it makes upgrades a lot easier, along with other bonuses. I'm guessing I have some setting wrong that is screwing up all my pods, but have not had any luck finding it. This is a bit of a disaster as it has shut down development for several days, with no sign of a fix. If there is anything I can do or provide to assist in finding a solution, just let me know. If anyone could provide any possible solutions or even things to try, it would be greatly appreciated. I'm currently working with Xcode version 7.3.1.
My pod file looks something like this:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
target 'Y2GOsp' do
use_frameworks!
# Pods for Y2GOsp
pod 'Alamofire', '~> 3.0'
pod 'AlecrimCoreData', '~> 4.0'
pod 'Kingfisher', '~> 2.4'
pod 'Eureka', '~> 1.6'
pod 'SwiftyJSON', :git => 'https://github.com/SwiftyJSON/SwiftyJSON.git', :branch => 'xcode7'
pod 'PhoneNumberKit', '~> 0.1'
pod 'PKHUD'
pod 'Dollar'
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '2.2'
end
end
end
Comments from #l'L'l led me to the solution. I went to
build settings > frameworks search path
and set it to the following:
$(inherited) (non-recursive)
$(PROJECT_DIR)/build/Debug-iphoneos (non-recursive)
$(SRCROOT) (recursive)
It is now correctly finding the pod frameworks.
Make sure you opened the .xcworkspace file in Xcode and not just the .xcodeproj file.
In Pod file
Uncomment below lines to define a global platform for your project
platform :ios, '10.0'
use_frameworks!
Now in xcode
a) Clean your project
b) Make sure that all your "Pods" > "Build Settings" > "Build Active Architecture Only" is set to "NO"
c) Now, build project
Sometimes pod deintegrate and then pod install helps me as well
try to make the version of your SDK into earlier versions
pod 'Alamofire', '~> 3.0'
pod 'AlecrimCoreData', '~> 4.0'
pod 'Kingfisher', '~> 2.4'
pod 'Eureka', '~> 1.6'
pod 'SwiftyJSON', :git => 'https://github.com/SwiftyJSON/SwiftyJSON.git', :branch => 'xcode7'
pod 'PhoneNumberKit', '~> 0.1'
pod 'PKHUD'
pod 'Dollar'
for example change 3.0 to available previous version, it worked once for me when i was facing the same issue.
pod 'Alamofire', '~> 2.4' #I am assuming prev available version is 2.4
But it doesn't have to be the "Alamofire" version result in "No such Module", you may try every one in your list in the pod file.
I had the same problem and I just solved it by making sure that my "Find Implicit Dependencies" is checked. Go to Edit Scheme -> Build. Previously I uncheck this so my xCode will run a little bit faster. Never realized that it will later throw me this error.
Although the question is long time ago, "no such module" error made me in Xcode 13 struggle for 3 days. I found many different solutions here, but still cannot fix it. Until I tried applying different solutions together and found my own solution.
My issue is that I can build the app on device, but shows "no such module" when building it on simulator. It seems there is something wrong while building pods.
Therefore, I added use_frameworks! & use_modular_headers! in Podfile.
target 'Application' do
use_frameworks!
use_modular_headers!
pod 'ChameleonFramework/Swift', :git => 'https://github.com/wowansm/Chameleon', :branch => 'swift5'
pod "BSImagePicker", "~> 3.1"
pod 'FirebaseCoreInternal'
I also changed the Build Setting of the Pods to exclude building pods in architecture of arm64. I did the same in my Project and Target's Build Settings.
Image of Pods' Build Settings
Please note that if you install new pod to the project, the Build Settings of Pods will be reset. You need to mannaully change back to exclude arm64.
For me the problem was that I updated the name of a build configuration within my project, but I didn't select the new build configuration in the scheme that used that build configuration. Updating the build configuration within the scheme to the new name fixed the issue!
You should excluded Architecture to nothing, also I did run the pod install command to install the pods.
So here's my procedure. I create a new Podfile in the project directory, then I added the following
platform :ios, '9.0'
use_frameworks!
target 'CPod' do
pod 'AFNetworking', '~> 2.5'
pod 'ORStackView', '~> 2.0'
pod 'SwiftyJSON', '~> 2.1'
end
I fire off pod install, and everything goes well, open up the xcworkspace. I then go over to ViewController.swift and if I try to import a pod I get No such module 'SwiftyJSON', if I were to do import SwiftyJSON. Any ideas?
EDIT: SwiftyJSON is a Swift based module, not Obj-C
Try adding the Pods framework to your build scheme and building the framework. After you've built it, build/run your project.
Steps:
Scheme menu > Manage Schemes > check Pods > Close
Select Pods from the scheme menu.
Build Pods.
Select your project from the same menu, then build/run it.
You must reopen project .xcworkspace file(not .xcodeproj) after install your podfile.
Clone the repo with CocoaPods
Open YourWorkspace/YourApplication.xcworkspace
Select the app u want to run Add SwiftyJSON.framework in embedded
binaries for that project Hit Run
Happy Coding :)
You may also try re-installing pods using:
pod deintegrate
and then
pod install
This fixed this issue for me
Press Command+Option+Shift+K and then Run your app, you will see a magic.
Or from the menu -> Product, press Option on your keyboard and you'll see Clean Build Folder.
It's looking funny that how could Xcode do those things with us but same thing happened to me when I used a Swift library using Pod and after too much struggle I ended up with Clean Build Folder.
Not sure if this would still be helpful for others. But, in my case, it ended up being a silly mistake of not referencing dependencies from the .podspec file.
We have an application with multiple internal libraries, and those libraries also have dependencies on each other - which we accounted for the in the Podfiles... but NOT in the podspecs.
So, even though our Podfiles had:
Application / Podfile
# Development Pods
pod 'ConsumingLibrary ', :path => '../ios-consuming-lib'
pod 'DependentLibrary1', :path => '../ios-library-one'
pod 'CommonCoreLibrary', :path => '../ios-common-core-lib'
ConsumingLibrary / Podfile
# Development Pods
pod 'DependentLibrary1', :path => '../ios-library-one'
pod 'CommonCoreLibrary', :path => '../ios-common-core-lib'
Needed to also call it out in the .podspec's:
ConsumingLibrary / ConsumingLibrary.podspec
# TODO
# Add here any resources to be exported.
s.dependency 'DependentLibrary1', '~> 0.1.0-RC'
DependentLibrary1 / DependentLibrary1.podspec
# TODO
# Add here any resources to be exported.
s.dependency 'CommonCoreLibrary', '~> 0.1.0-RC'
I think I wasted about 2 hours trying to figure out why I could build ConsumingLibrary & run tests, but as soon as I built the app, that consumed all three libraries - I kept getting:
No such module 'DependentLibrary1'
In my case it was because I opened xcodeproj instead of the correct xcworkspace.
Had this issue, too. I noticed the folder in Pods/broken_framework_name for framework which produced an error was empty even after pod install or pod update. So, for me those steps helped:
close XCode completely
remove DerivedData
remove Podfile.lock. Before doing it, make sure your pods are set to specific versions and it will not cause unwanted code updates
run pod deintegrate
remove .xcworkspace file
probably optional step: I had general line use_frameworks! written before all targets, but included it also in target in which I had an error
run pod install
After all steps I noticed missing framework files finally appeared back and build was working again.
Try using pod update after pod install command which will solve problem of No such module.
I just tried and it working fine.
Thanks,
Ratneshwar
Those who working with multiple targets , please don't forget to add this line in pods
def shared_pods
pod 'SSKeychain', '~> 0.1.4'
pod 'INAppStoreWindow', :head
pod 'AFNetworking', '1.1.0'
pod 'Reachability', '~> 3.1.0'
pod 'KSADNTwitterFormatter', '~> 0.1.0'
pod 'MASShortcut', '~> 1.1'
pod 'MagicalRecord', '2.1'
pod 'MASPreferences', '~> 1.0'
end
target 'Target_Name' do
shared_pods
end
target 'Target_Name_Two' do
shared_pods
end
Sometimes happens when you have an obj-c pod within a swift project (even when you use the use_frameworks! in the .podfile).
If you're sure the pod is installed and you are still getting No such module, try this:
Go to Pods project in Xcode
Pods
Right click on the affected pod
Show in finder
There should be a package file with .framework suffix. Create a folder Modules in it. In this folder create a file called module.modulemap with code:
framework module MODULE_NAME_HERE {
umbrella header "MODULE_NAME_HERE.h"
export *
module * { export * }
link framework LINKED_FRAMEWORKS_AND_LIBRARIES_THE_POD_NEEDS_HERE
link framework "AdSupport"
link "c++"
link "z"
}
Rebuild and you should be ok.
As #jakub-truhlář wrote, the root issue is the missing module.modulemap file due to some concurrency issue mixing Swift and Objective-C libraries, but instead of creating those files manually, would be better to try multiple times cleaning the Derived Data and build your project. When the project is successfully built then commit module.modulemap files to your repository to avoid to lose those files for example changing the current branch.
I faced the same problem in a swift framework I developed. The framework had a dependency of git project and the framework itself added as a pod to my main project. So, ideally the dependency has been specified in podspec file and Podfile as well.
I didn't faced the problem when accessing through the my main project but when I open the framework standalone it was throwing "No such module" error.
The root cause is, the base configurations is set with the path which points towards my main project instead of the framework itself because I ran podinstall first in my main project and then in the framework project.
Eg: in the project file it was like
0091AB0C861D71C94ADD7240 /* Pods-myframework.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-myframework.release.xcconfig"; path = "../../Apps/MyMainProject/Pods/Target Support Files/Pods-myframework/Pods-myframework.release.xcconfig"; sourceTree = ""; };
After doing the below mentioned fix,
4444F5B1B35F066E57F96782 /* Pods-myframework.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-myframework.release.xcconfig"; path = "Pods/Target Support Files/Pods-myframework/Pods-myframework.release.xcconfig"; sourceTree = ""; };
To fix the error,
Project file -> Configurations -> Set all the configurations set to
none.
Remove Pods folder and Podfile.lock.
Run 'pod install' first in the framework project direcory and then do pod install in main project directory.
I get some warning when pod install: '... target overrides the FRAMEWORK_SEARCH_PATHS build setting defined in ...'.
Fix it and enjoy.
Reference: target overrides the FRAMEWORK_SEARCH_PATHS build settings.
Another way this issue can manifest: if you have multiple targets with different platforms (e.g. iOS and watchOS) you need to make sure your podfile specifies the correct platform for each target. Otherwise Cocoapods might be building the right pod but for wrong platform, leading to the "no such module" error.
You can fix it just by specifying the correct platforms e.g.
# global platform
platform :ios, '11.0'
target 'My Framework' do
use_frameworks!
pod 'RxSwift', '~> 5.1'
end
target 'My Framework (watchOS)' do
# override global platform for this target
platform :watchos, '4.0'
use_frameworks!
pod 'RxSwift', '~> 5.1'
end
i fixed it by check "Find Implicit Dependencies" to true.
Go to Edit Scheme -> Build Tab -> set Find Implicit Dependencies = true.
and rebuild.
Adding link "c++" in the framework module.modulemap file worked for me
I had this problem when I opened XCode and then selected the workspace of my project via file->open recent.
I found that I had two .xcworkspace files on my filesystem for the same workspace/project.
Opening XCode by double clicking on the correct .xcworkspace file did the trick.
The correct one is the one that works.
I later deleted the wrong one.
I just updated particular dependencies in terminal
Go to project folder then run below command
pod update your pod name
For me I need to do
pod update ReachabilitySwift
Had this issue while adding CocoaPods into an old project, which already had manually included libs from before. It happened because Xcode was not resolving to the Framework Search Path generated by CocoaPods because of values previously set in target's settings.
Solution that helped me:
copy the old path
hit delete to completely clear the Framework Search Path settings in the target's column - the path, generated by CocoaPods would appear there
add the old search path back under the generated one (only needed if you still have some manually added frameworks to work with)
Clean project, wipe Derived Data, build.
The result would look like this (1st line added by Xcode, 2nd added by CocoaPods, and 3rd is manual):
In case of multiple targets.
For eg. Target1, Target2
use_frameworks!
target 'Target1' do
pod 'Fabric'
pod 'Crashlytics'
target 'Target2' do
end
end
Then run pod install.
I tried all of these suggestions but nothing worked for me. Instead what'd worked for me was deintegrating pods. Afterwards deleting the pods folder from xcode hierarchy and doing pod install. Suddenly it worked. Don't ask me why because anyways most of these suggestions are hit or miss anyways but I'll be happy if it works for someone else too :)
Make sure to import correct framework name that is defined in .podspec of the pod.
I usually remove Pods folder and .xcworkspace file, then I run pod installagain and it helps in almost 100% cases.
My setup
macOS 10.14 Mojave
Xcode 10.3
cocoapods 1.7.5
None of the answers work for me, although some gave partial clues. In my case, the root cause was that I customized my build product paths after running pod install.
If you run cocoapods right after creating an Xcode project, then it usually works if you open the generated Xcode .xcworkspace instead of the .xcodeproj.
Funny things happen if you start tweaking your build product paths after generating the workspace. Because the generated Pods project and its target all refer to your old Xcode project settings.
In my case, my trouble came from:
I prefer all my build products sitting under the project folder $(SRCROOT)/build/$(CONFIGURATION)/$(EFFECTIVE_PLATORM_NAME). So I went ahead and changed my Pre-configuration Build Products Path to it .... AFTER doing pod install.
Now, the generated Pods project, including all its Framework target, still points to the old location, so both the header import and linking of your own project will fail (you'd see Command PhaseScriptExecution failed with a nonzero exit code when No such module is fixed).
The fix:
Delete all Pods stuff including the workspace.
Regenerate Pods project and workspace with pod install. However, cocoapods hardcodes the build product path to ${SRCROOT}/../build and Pre-configuration Build Products to $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) in my case, which usually points to a temporary ~/Library/Developer subfolder . Still not quite right. Then ....
Make sure the Framework Search Path and Header Search Path of my own project cover the above paths.
Tweak Pods project setting and all dependency Framework's Pre-configuration Build Products Path to use my preferred paths.
The moral lesson: Always regenerate Pods and verify the key result paths whenever you touch paths in Xcode project settings.
UPDATE
With Xcode 11, Apple finally removed the confusing "Pre-configuration Build Products Path". To customize the build product paths, use Locations in Xcode preferences with global relative paths pre-baked.
If you see this warning:
[!] The `Joint [Debug]` target overrides the `FRAMEWORK_SEARCH_PATHS` build setting defined in `Pods/Target Support Files/Pods-Joint/Pods-Joint.debug.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
[!] The `Joint [Release]` target overrides the `FRAMEWORK_SEARCH_PATHS` build setting defined in `Pods/Target Support Files/Pods-Joint/Pods-Joint.release.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
follow the instructions to avoid Module not found issue.
For me, removing the following from my podFile fixed it:
installer.pods_project.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
clean project
close xcode
open xcode
enjoy
For using Swift in Objective-C, you should import a header file that Xcode generates automatically in compile time (NameOfModule+Swift.h). In this case, you should try import SwifityJSON in you header file like this:
#import "SwiftyJSON-Swift.h"
I have an iOS project I've been working on for some time, successfully, in which I used several pods for my main target, and then a couple more for my test target. Everything went swimmingly.
I was using a pod for tests, Expecta, because I needed to test asynchronous code. Now that Apple has added support for asynchronous testing in the latest Xcode, I rewrote my tests to use that, and want to remove Expecta from my project.
After doing that, my tests no longer compile, with errors about the header files from the pods no longer being found. For instance, `'FacebookSDK/FacebookSDK.h' file not found' error compiling one of my tests.
I've tried deleting all the Cocoapod-generated stuff and redoing it from pod install with no luck.
Versions: Cocoapods 0.35.0, Xcode 6.1.1, OS X 10.10.1.
My new, no-test-pods Podfile is:
# Uncomment this line to define a global platform for your project
platform :ios, '7.0'
target 'Meow' do
pod 'AFNetworking', '2.4.1'
pod 'TestFlightSDK', '3.0.2'
pod 'AWSiOSSDKv2/S3', '2.0.11'
pod 'Facebook-iOS-SDK', '3.20.0'
pod 'TTTAttributedLabel', '1.10.1'
pod 'DTCoreText', '1.6.14'
pod 'ReactiveCocoa', '2.3.1'
end
target 'MeowTests' do
end
Removing the MeowTests target hasn't helped either.
While I was typing the above :) I found this question; which says to add a link_with line to my podfile, and change the configuration file setup in the Info pane of my Project.
However, because I was removing the last pod from my test target, I also needed to delete the CocoaPods-specific phases from my test target. In the Build Phases tab, I removed Check Pods Manifest.lock and Copy Pods Resources.
Now my tests run fine. (And I can start rewriting them in Swift :) )