I just created new Framework and added Firebase via CocoaPods, when combine the library it success.
But when I add that library to other project via CocoaPods as well, then combine that project, and it raise an error: No such module 'Firebase'
Anyone faced a problem like this?
You need to add the follwing to your POD file:
pod 'Firebase'
After that, you need to type in your terminal
pod install (to refresh the pod file)
I solve my problem using just the specific import that I'm using, for example.
In my SDK I'm using FirebaseCore and FirebaseAnalytics.
Into my class I just import:
import FirebaseCore
import FirebaseAnalytics
And in my .podspec I needed to set static_framework property to true, so my .podspec it's seems like code below:
s.static_framework = true
s.dependency 'Firebase'
s.dependency 'Firebase/Core'
It works for me!
Do you open the workspace file after installed with cocoa pods ?
Check if the library is added in "Linked Frameworks" or "Embedded Binaries"
If it didn't work, add this pod file
platform :ios, '8.0' use_frameworks! target ‘Your Project’ do
pod 'Firebase', '>= 2.5.1'
pod ‘Firebase/Auth’
pod ‘Google/SignIn’
pod ‘Firebase/Database’
pod 'Firebase/Storage' end
and then type pod deintegrate and after that run pod install.
tried all these..
I was stuck in this situation for more than 2weeks.
finally resolved by adding "excluded architectures = arm64"
this is the easiest solution nowadays
Everything was setup fine and was working before but..
My Problem:
What's was wrong with me?
I was using older name of pod, eg. - pod 'Firebase/Analytics', pod 'Firebase/Crashlytics'
New pod names are pod 'FirebaseAnalytics', pod 'FirebaseCrashlytics' (Problem with / )
Solution:
Use new pod name to integrate pod 'FirebaseAnalytics', pod 'FirebaseCrashlytics' (Install pod with new pod name)
Import import FirebaseCore, import FirebaseAnalytics instead just import Firebase
import FirebaseAnalytics - I'm using for log events
Hi today i fix same problem
1 : open podfile from xcode than add " pod 'Firebase' "
save and close it
2 : open vscode or any editor using, open new terminal than write " cd ios " to open ios file than " pod install " when you install it showing problem need to add search path
so now open ios file from xcode and go to : runner > target runner > build settings > all > search paths
and add this " $(inherited) " into framework search path and header search path
that's all
For me I had to change the version specified in the Podfile as it was above what my app supported. Specifically in the Podfile I changed: 'platform :ios, '11.0' to platform :ios, '10.0' which corresponds with Deployment Info in the General Tab for my app I'm working on.
For Flutter folks adding Firebase to their apps, make sure you follow the steps in Add Firebase to your iOS Project as well as those in the SDK setup steps in the Firebase Console:
In summary:
Run pod init if you don't have a pod file
Add the necessary pods to the bottom of the podfile. All possible Firebase pods can be found here.
pod 'Firebase/Analytics'
pod 'Firebase/Firestore'
pod 'Firebase/Auth'
pod 'Firebase/Storage'
Run pod install
This issue can be caused by incorrectly set-up schemes:
If you have multiple schemes (e.g. 'Dev', 'QA', 'Production' etc.) in your project, check you have the build configurations set correctly.
Further guidance in this answer here:
https://stackoverflow.com/a/65453578/12322900
Then run pod deintegrate and pod install and make sure you're using the .xcworkspace file.
My failure was that I downloaded modules to
target 'YourProjectUITests' do
# Pods for testing
pod 'FirebaseCore'
And the right one is
# Pods for YourProject
pod 'FirebaseCore'
(Without UITests)
It is because you don't have added pod dependency in Podfile.
you will find below line in Podfile
Uncomment this line to define a global platform for your project
#platform :ios, '9.0'
follow the below steps.
1)just remove the # .so it will be like.
platform :ios, '9.0'
2)add the below dependencies.(Do not add all ,you just need to add whatever used in you app ,if you have used Firebase/Core only then add that line only)
#Pods for app name
pod 'Firebase'
pod 'Firebase/Core'
pod 'Firebase/Auth'
pod 'Firebase/Database'
3)clean the build
flutter clean
4)run Command :
flutter run (It will automatically adds a required pods).
that's it.
The same thing happened to me last week. I solved it by:
1. pod deintegrate
2. Open Xcode and delete any instance of pod.
3. pod install
Related
I have adopted a Swift project from about 6 months ago and am getting the error:
It's probably not an Alamofire issue as changing the order with SwiftlyJSON causes me to get a No such module 'SwiftlyJSON' error.
I have Product -> Clean'd it and rebuilt but nothing seems to work. Here's a copy of the Podfile.
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, "9.3"
use_frameworks!
target 'TatterTwo' do
# pod 'pop', '~> 1.0'
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'
pod 'FBSDKShareKit'
pod 'KeychainAccess'
pod 'Alamofire'
pod 'MBProgressHUD'
pod 'SwiftyJSON','3.0.0'
# pod 'Timberjack', '~> 0.0'
end
I am sure I am using the .xcworkspace rather than .xcodeproj
Ok, there might be different reasons behind this error
First, try to stop the build and start again. If this doesn't work then
Open your Podfile, that is supposed to be located inside of the project folder. Podfile configuration. Make sure your target matches the project name. If you did any modification then go to terminal locate the project folder and run sudo pod update, it should give you an output "Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed". After this restart your xcode file. Oh yeah and the last make sure you are opening .xcworkspace instead of xcodeproj
Reinstall Alamofire manually, and restart Xcode.
Make sure you check "No" on the project file for ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES
It took ages for me to get it to work.
When I install 'Firebase' pod, this message comes out and I am not able to work on Xcode.
Lopez-MacBook-Pro:tres Lopezeselmejor$ vim Podfile
# Uncomment this line to define a global platform for your project
platform :ios, '9.0'
target 'tres' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for tres
'Firebase'
end
Lopez-MacBook-Pro:tres Lopezeselmejor$ pod install
Analyzing dependencies
Downloading dependencies
Generating Pods project
Integrating client project
[!] Please close any current Xcode sessions and use `tres.xcworkspace` for this project from now on.
Pod installation complete! There are 0 dependencies from the Podfile and 0 total
pods installed.
[!] The Podfile does not contain any dependencies.
Change your Podfile to :-
use_frameworks!
target 'tres' do
pod 'Firebase'
end
When your terminal is done installing Firebase to your app. Close your current .xcodeProj go to your app folder, you will see a .xcworkspace file, Open that and do your further coding in there..
PS:- In swift3 , you might run into some problems in tests file.. see this :- No such a module 'Firebase' in Tests.swift file
I've recently updated my Xcode, but I faced with strange issue.
I'm installing library via cocoapods and use it further in my project, but after updating I Xcode can't find the module, I've installed via CocoaPods
I've updating pods, but the problem stays.
Also I have Pods.framework red
What is the problem?
Podfile:
# Uncomment this line to define a global platform for your project
platform :ios, '9.0'
target 'Bloom' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for Bloom
target 'BloomTests' do
inherit! :search_paths
# Pods for testing
end
target 'BloomUITests' do
inherit! :search_paths
# Pods for testing
end
end
pod 'Firebase/Core'
pod 'Firebase/Database'
pod 'Firebase/Auth'
pod 'Gifu'
UPD: Solved it by opening the project with the .xcworkspace file not with .xcodeproj.
Do the following things and you can import any swift file from "Pods"
Clean your project
Make sure that all your "Pods" > "Build Settings" > "Build Active Architecture Only" is set to "NO".
Don't run, just build your project.
Now, import any file from "Pods" to any swift file
This will solve your import module problem.
Update:
To solve this issue delete the current pod file and create one using the terminal. Follow the below steps:
1) Open Terminal.
2) Navigate to your Project Path.
3) Type pod init in terminal to create new pod file.
4) Open the newly created pod file and write the pod line which you want to install after target "TargetName" do and before end.
5) Then type pod install in the terminal.
Hope this helps!
I had to delete my podfile and ALL the files it made including the .workspace file then I did:
pod init
open -a Xcode Podfile
add pods I want to podfile then save and close xcode.
Finally do pod install and open the new workspace file :)
change your pod file like this and clean the project quit xcode and reopen it.it may solve the problem
# Uncomment this line to define a global platform for your project
platform :ios, '9.0'
# Comment this line if you're not using Swift and don't want to use
dynamic frameworks
use_frameworks!
target 'Bloom' do
pod 'Firebase/Core'
pod 'Firebase/Database'
pod 'Firebase/Auth'
pod 'Gifu'
end
target 'BloomTests' do
inherit! :search_paths
# Pods for testing
end
target 'BloomUITests' do
inherit! :search_paths
# Pods for testing
end
Some frameworks in cocoapods declare a hard-link to XCode in the module description file (XMPP for example). So, be sure that you have:
place XCode.app in /Application (default folder), with name
"XCode.app", not Xcode-beta.app
or/and
call xcode-select to specify the right XCode.app:
sudo xcode-select --switch /Applications/Xcode.app
I had the same issue after I tried to merge a branch using Xcode (never again!).
What finally worked for me was:
Deleting derved data
Cleaning project
Exiting Xcode
Running 'pod install' again in my project
So I'm fairly new at both Swift and working with cocoapods, and after spending several days of researching I cannot figure out why my project isn't building. I get the following error:
(My project)/Pods/Target Support Files/Pods-(My project)/Pods-(My project)-frameworks.sh: No such file or directory
I am using Xcode 7.2.1 and Cocoapods 0.39.0 and I seem to have tried all the troubleshooting tips from Cocoapods' website. Can anyone tell me what I need to do to make it work?
My podfile:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.1'
use_frameworks!
pod 'GoogleMaps'
pod 'FontAwesome.swift'
pod 'Lock', '~> 1.21'
pod 'JWTDecode', '~> 1.0'
pod 'Lock-Facebook', '~> 2.1'
pod 'SimpleKeychain', '~> 0.7'
pod 'Bolts', '~> 1.6'
pod 'FBSDKCoreKit', '~> 4.1'
pod 'FBSDKLoginKit', '~> 4.1'
pod 'MBProgressHUD', '~> 0.9.2'
pod 'Alamofire', '~> 2.0'
pod 'CocoaLumberjack/Swift'
pod 'AFNetworking', '~> 2.5'
pod 'Auth0', '~> 0.2'
You're probably missing the target block for your target, in the Podfile.
I added a target to my project, and forgot to add a target block to the Podfile for that target, and I had the same error.
(My project)/Pods/Target Support Files/Pods-(My project)/Pods-(My project)-frameworks.sh: No such file or directory
The path components are actually named after the target:
(My project)/Pods/Target Support Files/Pods-[target]/Pods-[target]-frameworks.sh
Cocoapods builds configuration files for each target that you specify. Try adding a target entry to your Podfile, like so:
target "SOME TARGET" do
specify pods here
end
If you end up adding a lot of targets, it might be a good idea to define pod groups that you can easily use inside your target entries. So, you would define your groups above your target entries, like so:
def commonPods
specify pods here
end
Then you can use the group name in your pod entry, instead of copying all the pod entries for every target:
target "SOME TARGET" do
commonPods
end
Adding the target entry in your Podfile will cause CocoaPods to generate a new set of files the next time you run pod install. However, before you run that command, you will probably need to set your configurations to None, so that Cocoapods can assign its own configuration. Here's how to do that:
Go to your project-level target
For each configuration listed under Configurations, select None for your target, in the drop-down menu under Based on Configuration File.
These steps will eliminate the Cocoapods warning that reads:
CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all...
Once you've edited your Podfile and you nullified your configurations, you're ready to run pod install on the command line. After the process is completed, check back with your base configuration settings, and note that they have been set to the configuration file that was generated by CocoaPods!
I hope that helps!
This is kind of dumb, but it happened to me:
You might be in the wrong directory.
I was running pod install from directory Desktop/Project/Project Files, and I kept getting an error like this.
Then I realized I was in one step too far, so I went up to directory Desktop/Project, and it worked.
As to why pod install even ran considering the Podfile was in Desktop/Project and not Desktop/Project/Project Files... ¯\_(ツ)_/¯
My problem is that " blablabla Pods-XXXX-frameworks.sh: No such file or directory"
Firstly, I fix it by using command line "pod install" , it has nothing effection.
The finally solution :
Touch "Build Phases" -> "Embed Pods Frameworks" ,you can see the path :XXXXX.sh"
Be sure that the XXX.sh is the same as your project's. if not, change the path.
Then clean and build.
It's done.
Make sure that you are running pod install in the same directory where you have your xcode project.
I'm trying to integrate facebook into my app using CocoaPods, using the use_frameworks! tag, and according to facebook's instructions here, also included the pod bolts. When I try use import FBSDKCoreKit in my appdelegate, I get a no such module 'FBSDKCoreKit error. I've included my podfile below:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.2'
use_frameworks!
pod 'Bolts'
pod 'Alamofire', '~> 3.0'
pod 'FBSDKCoreKit'
pod 'FBSDKShareKit'
pod 'FBSDKLoginKit'
Additionally, in my Pods folder, there is a question mark next to Bolts, FBSDKCoreKit, and FBSDKSharekit, but not one next to alamofire, which I had been using previously. In the Frameworks folder in my Pods project, FBSDKCoreKit and Bolts are listed there, but are both red.
Any ideas? I've tried cleaning my project, and reinstalling and updating the pods.
For people moving from Carthage to Cocoapods make sure to remove the Carthage references of the FBSDKCoreKit from the Link Binary With Libraries under Build Phases option.
Please try below steps,
Explicitly mention the versions i.e.
pod 'FBSDKCoreKit', '~>5.8.0'
pod 'FBSDKShareKit', '~>5.8.0'
pod 'FBSDKLoginKit', '~>5.8.0'
Update pod repo using sudo pod repo update
Update pod using pod update
Seems that the facebook pods are Objective-C and they need a special way of importing in a swift project.
This is how I got it to work:
Create a bridging header in your project, if you dont have one(I created a new header file called Bridging-Header.h and set it as a bridging header in the project settings, like in the screenshot)
Then in this file import the facebook modules. Here's how my file looks like:
#ifndef Bridging_Header_h
#define Bridging_Header_h
#import FBSDKCoreKit;
#import FBSDKLoginKit;
#endif /* Bridging_Header_h */
Let me know if this workout for you or you need more help.
I fixed this by
Removing the Bridging Header. Facebook SDK doesn't need them anymore after version 4.1
Adding all of the .frameworks to the Projects Build Phases -> Link Binary With Libraries
Selecting each framework and building it. You can do this by selecting your project name next to the run arrow.
Cleaning the project and restarting my computer.
Very simple solution, if you are using Apple Swift Packages:
Go to Navigator pane and select the project
Then make sure you choose project name under "Project" not under "Targets"
Then select Package Dependencies tab
You will find the Facebook package there, double click on it
Change version to 9.0.0 and click "Done"
Rebuild, and it should be corrected.
Note that you may need this url to add Facebook SDK as Apple Swift Packages rather than Cocoapods.
You can try :
pod 'FBSDKCoreKit/Swift'
first add in pod file
pod 'FacebookCore'
pod 'FacebookLogin'
pod 'FacebookShare'
this is facebook swift library,after that before using FBSDKCoreKit,just use FacebookCore then import FBSDKCoreKit