I'm attempting to load the following github repository through Pods:
https://github.com/applidium/ADOverlayContainer
$ pod install
Analyzing dependencies
[!] Unable to find a specification for `OverlayContainer`
Also tried 'ADOverlayContainer'.
The podfile, note the other two pods work:
# Uncomment the next line to define a global platform for your project
platform :ios, '12.1'
target 'MyCoreData' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
pod 'SwiftCharts', '~> 0.6.3'
pod 'SwiftGraph'
pod 'OverlayContainer'
# Pods for MyCoreData
target 'MyCoreDataTests' do
inherit! :search_paths
# Pods for testing
end
target 'MyCoreDataUITests' do
inherit! :search_paths
# Pods for testing
end
end
Doesn't seem to find the specified spec and the author doesn't have contact information or issues tab. Am I able to determine the correct reference somehow? The Podfile on the github repo appears to be the same reference.
I've tried using your podfile in a sample project. Seems good. I successfully installed OverlayContainer. You could try your podfile too in a new sample project, if it doesn't work too, then the problem should be in your local pod settings.
There are multiple ways to solve that.
Run pod setup (this may take time).
Update your Cocoapod stuff (gem? ruby? and whatnot).
You could also try adding source 'https://github.com/CocoaPods/Specs.git' in your podfile.
I hope this helps.
Related
my project was running fine but when i added alamofire and it is not working.
it is giving following error
ld: warning: directory not found for option
'-F/Users/banglafire/Desktop/mysios/Build/Products/Debug-iphonesimulator/Alamofire'
ld: framework not found Alamofire clang: error: linker command failed
with exit code 1 (use -v to see invocation)
additional information
Cocopad version 1.3.1
my pod file
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
target 'My' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for My
pod 'Alamofire'
end
How do i solve it? Please help!
I was facing same problem. So i think you are opening .xcodeproj. you need to open .xcworkspace
I think there are some issues with your Pod file should be as below:
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
target 'My' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
pod 'Alamofire', '~> 4.4'
target 'MyTests' do
inherit! :search_paths
# Pods for testing
end
target 'MyUITests' do
inherit! :search_paths
# Pods for testing
end
end
try to remove Pod file and again install the pod file and add pod-like this. Hope this could help you.
Try to add the version of the alamofire
pod 'Alamofire', '~> 4.5'
Then run pod install
Did you update your pod on project folder already ?
Also check if your pod is correct or not.
https://github.com/Alamofire/Alamofire
When you add something pod on your project, you still need to update your folder.
Try use terminal -> then go to your folder project -> type pod install
I recently encountered this problem aswell.
I tried a lot of the suggested fixes on here, but none of them actually fixed the problem.
The actual problem was an incorrect value that was set in the Build Settings of the app.
After setting Per-configuration Build Products Path to:
CONFIGURATION_BUILD_DIR = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
the problem was resolved and my build succeeded.
I am trying to install two pods to my Xcode project from terminal. I initially had installed a pod called PRAugmentedReality, and it worked fine. Then I tried adding the pod BFTransmitter, and started getting the following error message:
[!] Unable to find a specification for 'PRAugmentedReality'
If I remove the PRAugmentedReality pod and install with just BFTransmitter, it also works fine. So basically I am able to install either on their own, but not together.
My podfile looks like this:
#source for BFTransmitter
source 'https://bitbucket.org/bridgefy/bridgefypods.git'
target 'FWF' do
pod 'BFTransmitter'
pod 'PRAugmentedReality'
target 'FWFTests' do
inherit! :search_paths
end
end
I have tried repo remove master pod setup and then pod install, still no luck.
just add source to install both pods together check my podFile and add sourced before your target as I did
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
source 'https://github.com/CocoaPods/Specs.git'
source 'https://bitbucket.org/bridgefy/bridgefypods.git'
target 'pod' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
pod 'BFTransmitter'
pod 'PRAugmentedReality'
# Pods for pod
end
Result
I encounter the same problem in my project.
When I was editing pod file, I changed pod 'SCSoftKycSolutionSdkSource' to pod 'MyprojectName'.
I fixed the below, issue fixed.
pod 'SCSoftKycSolutionSdkSource'
I recently upgraded to Xcode 8 and an existing project to Swift 3. After having a variety of issues with Cocoapods, I decided to start over from scratch. After running pod deintegrate and deleting Podfile, Podfile.lock, and [Project].xcworkspace, I had a blank slate as far as Cocoapods was concerned.
I then took the following actions:
Opened a terminal at the project location and ran pod init, then pod install (using the stub Podfile that pod init creates).
This appeared to be successful, but came with the following two warnings:
[!] The `Xena [Debug]` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target Support Files/Pods-Xena/Pods-Xena.debug.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
[!] The `Xena [Release]` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target Support Files/Pods-Xena/Pods-Xena.release.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
At this point, opening Xcode and building the project gives the "No such module" error, which is entirely expected.
Following the instructions at this question solves this problem and rerunning pod install is a success.
Closed Xcode, added the modules I'm using to the Podfile (see below), the ran pod install again. According to the terminal output, this is successful.
Opened Xcode and built the project. I again receive the "No such module" error, specifically No such module 'ReactiveCocoa'
I have confirmed that the same problem occurs with SnapKit, Hue, KMPlaceholderTextView, KeychainSwift, and Siren, depending on the order of the import statements. For some reason, none of the Google modules are affected by this problem.
My Podfile:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'Xena' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for Xena
pod 'ReactiveCocoa', :git => 'https://github.com/ReactiveCocoa/ReactiveCocoa.git'
pod 'SnapKit', '~> 3.0.2'
pod 'Hue', '~> 2.0.1'
pod 'KMPlaceholderTextView', '~> 1.3.0'
pod 'GooglePlacePicker'
pod 'GooglePlaces'
pod 'GoogleMaps'
pod 'KeychainSwift', '~> 7.0'
pod 'Siren'
target 'XenaTests' do
inherit! :search_paths
# Pods for testing
end
target 'XenaUITests' do
inherit! :search_paths
# Pods for testing
end
end
Make sure you are opening .xcworkspace and not .xcodeproj file.
You may further look into this post.
Also under : Target > General > Linked Frameworks and Libraries
Make sure your frameworks are there. Even Pods_Xena.framework is there
Try:
Xcode ->Preferences ->Location ->DerivedData
open the folder DerivedData and move it to Trash
Uncomment the next line to define a global platform for your project
platform :iOS, '9.0'
Uncommenting the second line in your pod file will help you.
I've been learning swift for three days. I'm planning to build my skill in swift especially in iOS development. I just advised by my colleague who is an iOS developer to learn swift while writing test in our app -- this is for the benefit to the company and myself which it makes sense for me. Now, I'm trying to follow this tutorial
https://medium.com/#ynzc/getting-started-with-tdd-in-swift-2fab3e07204b
After following the tutorial to rewrite the test in a framework called Quick which is very similar with Rspec. I did the installation of the CocoaPod then follow the install of the Quick framework. Use the .xcworkspaces instead of the .xcodeproj. But still I'm getting the error of No such module 'Quick'.
I did research already and removing the pods but still getting the error.
platform :ios, '9.2'
target 'FizzBuzz' do
use_frameworks!
def test_pods
pod 'Quick', '~> 0.9.0'
pod 'Nimble', '~> 3.2.0'
end
target 'FizzBuzzTests' do
inherit! :search_paths
test_pods
end
target 'FizzBuzzUITests' do
inherit! :search_paths
test_pods
end
end
screenshot of the project folder:
I recently had this issue and none of the current answers solved this for me.
The reason I was getting this error was that the Test/Spec file (NetworkSpec.swift) that I had created had a target membership of the main application target, not the tests target.
To update this, I opened the project in xcode, selected the file in the project explorer and then in the properties window on the right hand side. Then in the target membership area. I had two options.
ProjectName
ProjectNameTests
I unchecked the checkbox next to ProjectName (not the app's real name) and then checked the one next to ProjectNameTests and re-ran the tests. Everything worked as expected.
I ran into the same issue. I did not need to nest the test targets in my podfile. e.g.
source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!
target 'MyAppName' do
pod 'RealmSwift'
pod 'GoogleMaps'
end
target 'MyAppNameTests' do
inherit! :search_paths
pod 'Quick'
pod 'Nimble'
end
target 'MyAppNameUITests' do
inherit! :search_paths
pod 'Quick'
pod 'Nimble'
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '3.0' # or '3.0'
end
end
end
I am using Xcode 8.1. Click on the currently selected scheme.
Select 'manage schemes'.
Selected scheme.
Put check mark next to test schemes and Quick.
Click on your app scheme again. Select each scheme and go to Product > Build. Finally select your main app scheme again. Now try adding 'import Quick' in one of your test classes.
Schemes
ISSUE RESOLVED
I was getting same issue. Files within Test folder did not see Nimble and Quick pods despite my Podfile was configured correctly and Target Membership for my test file set up correctly as well. I was unable to import both Pods.
Running below commands on Project folder via CLI resolved issue for me.
$ pod update Quick
$ pod update Nimble
My Podfile implementation of both pods for reference:
def include_test_pods
pod 'Quick'
pod 'Nimble'
end
Try this. Cocoapods may need to be rebuilt.
Quit XCode. Go to terminal and cd into your project.
Run pod deintegrate.
Run pod install.
Open Xcode and clean and build your .xcworkspaces project.
I had this issue that persisted through build cleans. I noticed that it was only happening in one file and files that did not have this issue had import foundation. After importing foundation on the line before it, it then worked. I thought maybe it was simply modifying the file that had done it so I removed the foundation import and the error came back. So try adding that import if you do not have it.
First thing first you just need to use pod inside your target project, so it gona share for your test target like that
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'TestNetWorkLayer' do
use_frameworks!
pod 'SwiftyJSON'
pod 'Quick'
pod 'Mockingjay'
pod 'Nimble'
pod 'Alamofire', '~> 5.0.0-rc.3'
target 'TestNetWorkLayerTests' do
inherit! :search_paths
end
end
After that you can import it inside your project
import Quick
import Nimble
class NativeApiClientSpec{
}
In my Podfile i use smth like this:
target 'Specs' do
pod 'Quick'
pod 'Nimble'
shared_pods
end
Additionally, re-open the project or use the following command: Product -> Clean and build folder
I had same issue. After a lot of trial and error, I found fix here: https://github.com/Quick/Quick/issues/402#issuecomment-149459840. I had to delete derived data and regenerate project to get Quick as build scheme
Try this;
Close xcode project
Run $ pod deintegrate
Delete Podfile.lock
Run $ pod install
and Build again!
I've been banging my head against a wall with this for the last few days but despite multiple Google/SO/Github searches I can't find a resolution to the issues I'm having!
All I'm trying to do is create some unit tests for my app which makes use of Firebase pods.
I'm using Xcode 7.3.1 & Cocoapods 1.0.1. Update: Issue remains with Xcode 8.0
With this podfile:
platform :ios, '9.0'
use_frameworks!
inhibit_all_warnings!
target 'MyApp' do
pod 'Firebase'
pod 'Firebase/Auth'
pod 'Firebase/Database'
pod 'Firebase/Storage'
target 'MyAppTests' do
inherit! :search_paths
end
end
In my XCTest class I get
Missing required module 'Firebase'
error at #testable import MyApp
Alternatively with this podfile:
platform :ios, '9.0'
use_frameworks!
inhibit_all_warnings!
def common_pods
pod 'SwiftyTimer'
pod 'Firebase'
pod 'Firebase/Auth'
pod 'Firebase/Database'
pod 'Firebase/Storage'
end
target 'MyApp' do
common_pods
end
target 'MyAppTests' do
common_pods
end
The tests build but my console is littered with warnings e.g.:
Class <-FirebaseClassName-> is implemented in both ...MyApp... and
...MyAppTests... One of the two will be used. Which one is undefined
I had the same issue. I solved it by moving pod 'Firebase' to my test target. Change your Podfile to this:
platform :ios, '9.0'
use_frameworks!
inhibit_all_warnings!
target 'MyApp' do
pod 'Firebase/Auth'
pod 'Firebase/Database'
pod 'Firebase/Storage'
target 'MyAppTests' do
inherit! :search_paths
pod 'Firebase'
end
end
Try changing the inheritance to :complete, as in:
target 'MyAppTests' do
inherit! :complete
end
Importantly it allows anyone else checking out your repo to just do a pod update as usual without having to copy .xcconfig files or other hackery just to build.
Select your Unit Test Target setting.
Go to Build Settings.
Look for Header Search Paths.
Add this value $(SRCROOT)/Pods with recursive, then Xcode will resolve the path for you.
Here is Example
The issue is that Firebase does something special with the Header Search Paths after CocoaPods generates its own value for the setting so CocoaPods doesn't pick up on this change in order to carry it over to the test target. You can solve this one of two ways:
Locate MyAppTests.<configuration>.xcconfig in the file navigator and add the following to HEADER_SEARCH_PATHS:
${PODS_ROOT}/Firebase/Analytics/Sources [*]
Find the setting for Header Search Paths in Build Settings and add that same value as in option 1 to the list. You shouldn't need to set it as recursive.
* As per AKM's comment, this changed to ${PODS_ROOT}/Firebase/Core/Sources in version 3.14.0
Adding ${SRCROOT}/Pods/Firebase/CoreOnly/Sources into the unit test target's "Header search paths" fixed the problem.
Steps:
Select your unit tests target
Go to Build Settings
Search for header search path
Add ${SRCROOT}/Pods/Firebase/CoreOnly/Sources
After this the tests can run and the error will disappear.
Three Steps before I could get this to work:
CocoaPods : 1.5.0
Swift 4
Firebase : 4.13.0
Step 1:
Make sure to add the following target block into your podfile.
# Uncomment the next line to define a global platform for your project
platform :ios, '11.3'
target 'TIMII' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for TIMII
pod 'Firebase/Core'
pod 'Firebase/Database'
pod 'Firebase/Auth'
pod 'Firebase/Storage'
target 'TIMIITests' do
inherit! :search_paths
pod 'Firebase/Core'
end
end
Step 2:
Within the YourAppTests Project Navigator Build Settings tab. Find the Header Search Path row and add to Debug the following line
$(inherited) ${PODS_ROOT}/Firebase/Core/Sources
Step 3:
In terminal run:
pod update
A simpler method that also works:
target 'MyApp' do
pod 'Firebase/Auth'
pod 'Firebase/Database'
pod 'Firebase/Storage'
target :MyAppTests
end
The problem is recorded in the firebase project here:
https://github.com/firebase/firebase-ios-sdk/issues/58
There is a workaround:
Add "${PODS_ROOT}/Firebase/Core/Sources" to your Tests target only
under Build Settings -> Header Search Paths
but this is also fixed by upgrading to CocoaPods 1.4.0 or later, which is a better solution.
At the time I'm writing this (November 2017) cocoapods 1.4.0 is still in beta, so to install it you need to explicitly request the beta:
gem install cocoapods --pre
This and then doing a pod install solved the problem running my tests.
I tried all the above and ran into various different errors, originally starting with Missing required module 'Firebase', then getting "Class ... is implemented in both ... " or linker issues if I tried to add Firebase Pods to my test target.
The solution that worked for me was to:
Remove test target entirely from Podfile and run 'pod update' to ensure the XCode project is in sync.
Open my test target's Build Settings and update header search paths to only include the following 3 items:
$(inherited) non-recursive
$(SRCROOT)/Pods/Headers/Public recursive
$(SRCROOT)/Pods/Firebase recursive
At this point cleaning the build folder, re-building then re-running the tests worked for me. Hope this helps someone!
The solution for me was to update cocoapods to version 1.1.0.rc.2.
sudo gem install cocoapods --pre
I had a similar problem. Phrased in terms of your question, I copied the contents of my MyApp.<configuration>.xcconfig file to my MyAppTests.<configuration>.xcconfig file. I cleaned and built the tests, and it worked.
Add "${PODS_ROOT}/Firebase/Core/Sources" to your Tests target only under
Build Settings -> Header Search Paths
As #Will mentioned an issue around Header Search Paths after CocoaPods installation.
I have a project with multiple targets where pod 'Firebase' embedded into separate module, lets say MyProject-Shared. Firebase pod at 'Podfile' installed only for 'MyProject-Shared' target. Other modules, which wants to use 'MyProject-Shared' can't be compiled due an error:
'missing required module "Firebase" '
The trick in my case was to add following missing header search path at each target's Build Settings referencing to Analytics-Framework:
"${PODS_ROOT}/Firebase/CoreOnly/Sources"
Please see pic below:
Hope it will save your time.
Missing required module Firebase NO CocoaPods solution
For those who encounter the same problem but NOT using CocoaPods:
If you're using Firebase, than you have some folder containing Firebase.h and module.modulemap file. For example - YOUR_PROJECT_DIR/Linking
If your Main project target is working correct way, than you should go to ProjectSettings -> Targets. Select test target. Search for User headers and add the path to YOUR_PROJECT_DIR/Linking. Select recursive option and you should be good to go.
See the screenshot for more details: