I need to use Afnetworking and google-maps-ios-utils both in my project but using pods it is not possible. because Afnetworking don't work if I comment # use framework! in my pod file and google-maps-ios-utils don't work if I uncomment it.
I tried manually installing google-maps-ios-utils but it still give me error related to bridging header.
Is there any way to use both library together.
Or how to install AFnetworking or google-maps-ios-utils manually to avoid this clash.
I need some alternative for google-maps-ios-utils because it is only works if I comment #use_frameworks! in pod file , and if I comment it most of other library such as FBSDKLoginKit and SDWebimage get error.
Xcode 10, swift 4.
Have you try this on your pod file like below,
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!
def share_pods
# Pods for your target name
pod 'AFNetworking', '~> 3.0'
pod 'GoogleMaps'
end
target 'your target name' do
share_pods
end
Hope it's help you:)
I am currently adding monogodb to my ios project. Just after following the instruction stitch mongodb offered, I am stuck at when pod installing StitchCoreSDK. It supposed to create a xcworkspace file, but it didn't. Instead, I got the following message.
enter image description here
The podfile I create is like following
# Uncomment the next line to define a global platform for your project
platform :ios, '11.4'
source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!
target 'paotuaniOS' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
# Pods for paotuaniOS
pod 'Nexmo-Stitch'
pod 'StitchSDK', '~> 4.0.5'
target 'paotuaniOSTests' do
inherit! :search_paths
# Pods for testing
end
target 'paotuaniOSUITests' do
inherit! :search_paths
# Pods for testing
end
end
Can any one help me with this issue?
Thanks!!!
I had this issue before. The repo had problems. The repo has been updated. Please use
pod 'StitchSDK', '~> 4.1.1'
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
I'm trying add Alamofire to my project using Cocoapods, doing the same thing in the quick start, changing pods file, but still can't import Alamofire.
Is there something that I must more to do?
In order to use CocoaPods written in Swift, you must explicitly include use_frameworks! in your Podfile to opt into using frameworks. Like this:
platform :ios, "8.0"
use_frameworks!
pod 'Alamofire', '2.0'
Without including this you’ll get an error when you try to install the pods like Alamofire.
There is a command podspec in Podfile (documentation)
Example from the link:
podspec
podspec :name => 'QuickDialog'
podspec :path => '/Documents/PrettyKit/PrettyKit.podspec'
What is really mean? a example of project structure that use podfile will be really appreciated
I know this is old , but I stumble on this question , while learning Cocoapods distribution.
So here is the answer:
As the documentation says. If you define this in your Podfile. All dependencies that you define in your podspec will be installed.
Example:
in your .podspec file you have:
spec.dependency "RealmSwift", "~> 0.99.0"
spec.dependency "Starscream", "~> 1.1.3"
Basically, this means your library/framework uses this dependencies.
When you are working on your library, you still need to install this dependencies. So you define them in the Podfile of your library:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'YourLibrary' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for YourLibrary
pod "RealmSwift", "~> 0.99.0"
pod "Starscream", "~> 1.1.3"
target 'YourLibraryTest' do
inherit! :search_paths
# Pods for testing
end
end
now instead of re-writing all of those dependency that your library needed. You could just use
# Pods for YourLibrary
podspec
this will look through your library/frameworks podspec file. And download the dependencies that were defined.
From the documentation of Cocoapods:
It is intended to be used by the project of a library.