Transitive dependencies that include static binaries using google map and clustering - ios

My Pod file looks like this
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
target 'MyApp' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for MyApp
pod 'GoogleMaps'
pod 'Alamofire', '~> 4.0’
pod 'SDWebImage', '~>3.8'
pod 'Applozic', '~>3.8'
pod 'Google-Maps-iOS-Utils'
end
When i install pod with all this framework Stated it gives me This error
[!] The 'Pods-MyApp' target has transitive dependencies that include static binaries: (/Users/Mad/Downloads/MyApp/Pods/GoogleMaps/Frameworks/GoogleMaps.framework)
Please help me.

I'm not saying that the answers above are wrong, but I recently cd'ed into the project instead of the project-folder which resulted in the same output.

You have to download the Utils repository locally and then import to your xcode project. A step by step guide can be found here: Integrating with Swift projects which use 'use_frameworks!' in the Podfile

Related

Not importing podfile in our project

I'm using Xcode 7 for ios development. I'm new to Swift. I use in my project CocoaPods. But I'm unable to import the files into our project.
MY Cocoapodfile is
# Uncomment this line to define a global platform for your project
platform :ios, '8.0'
target 'SCLAlertView2' do
pod 'SCLAlertView'
end
target 'IceCreamShopTests' do
end
Podfiles are created. But I'm unable to import the files.
import SCLAlertView
I'm getting no such module error getting. How to resolve it. Any help welcome.
Not only podfile has to be created, you also have to run
pod install
Or, if you already installed and you want to update/add new libraries:
pod update
Then, build the project again (Command+B)
Follow the "Getting Started" instructions at cocoapods.org. Here are the specific steps listed:
List the dependencies in a text file named Podfile in your Xcode project directory:
platform :ios, '8.0'
use_frameworks!
target 'MyApp' do
pod 'AFNetworking', '~> 2.6'
pod 'ORStackView', '~> 3.0'
pod 'SwiftyJSON', '~> 2.3'
end
Tip: CocoaPods provides a pod init command to create a Podfile with smart defaults. You should use it.
Now you can install the dependencies in your project:
$ pod install
Make sure to always open the Xcode workspace instead of the project file when building your project:
$ open App.xcworkspace
Now you can import your dependencies e.g.:
#import <Reachability/Reachability.h>

how can I install Firebase authentication in terminal using cocoa pods?

When I enter pod 'Firebase/Auth' it isn't installing the pod. Its saying this: [!] Unable to satisfy the following requirements:
Firebase/Auth required by Podfile
None of your spec sources contain a spec satisfying the dependency: Firebase/Auth.
You have either:
out-of-date source repos which you can update with pod repo update.
mistyped the name or version.
not added the source repo that hosts the Podspec to your Podfile.
Note: as of CocoaPods 1.0, pod repo update does not happen on pod install by default.
[!] Your Podfile has had smart quotes sanitised. To avoid issues in the future, you should not use TextEdit for editing it. If you are not using TextEdit, you should turn off smart quotes in your editor of choice.
I have said in the pod file - pod 'Firebase' and that is installing fine, but I don't know why 'Firebase/Auth' isn't installing.
This is using swift and Xcode is any of you were wondering, please can someone suggest what I can do to solve this, thanks
This is the pod file:
platform: ios, '8.0'
use_frameworks!
target: 'Lifelapse' do
pod 'Canvas'
pod 'Firebase'
pod 'Firebase/Auth'
end
EDIT:
The solution was just to 'pod repo update' which worked perfectly. However now I have 27 error messages - Please help!
I did more or less than the guy told us
but my steps were a little different:
On the Terminal: go to your project folder:
1.1 sudo Desktop/YourApp
1.2 YOURMAC:YourApp Fernanda$ sudo pod init
Change your file Podfile to:
# Uncomment this line to define a global platform for your project
platform :ios, '8.0'
target 'YourApp' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for YourApp
pod 'Firebase'
end
On the Terminal: pod install
Now, change your file Podfile again to:
# Uncomment this line to define a global platform for your project
platform :ios, '8.0'
target 'YourApp' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for YourApp
pod 'Firebase'
pod 'Firebase/Auth'
end
On the Terminal: pod update
try update platform version 8.0 to 9.0
platform: ios, '9.0'
use_frameworks!
target: 'Lifelapse' do
pod 'Canvas'
pod 'Firebase'
pod 'Firebase/Auth'
end

GoogleMaps SDK ios install with Cocoapod error

I'm recently learn iOS and I want to install the GoogleMap SDK for iOS in my project.
But when I installed with pod install it got an error say that the 'GoogleMaps' doesn't have concrete dependency ... or some thing like that.
I did as the instruction on the GoogleMapsAPI web source and this is my Podfile
'https://github.com/CocoaPods/Specs.git'
pod 'GoogleMaps'
Please tell me where do I did wrong. Thanks
You have to specify a target for each pod.
e.g. if before you had your Podfile written like this:
pod 'GoogleMaps'
just change it to
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.1'
target "TargetName" do
pod 'GoogleMaps'
end
When you are working with latest pod you need to write Target in Pod file
Like below.
Currently your pod file looking like
pod "YOUR_POD"
Change To
target "Your_Target_Name" do
pod "YOUR_POD"
end

Install 'JSONWebToken' library without cocoapods

Is there a way to install this library without cocoapods ? because when i install it with pod i get this error :
[!] Pods written in Swift can only be integrated as frameworks; add `use_frameworks!`
to your Podfile or target to opt into using it. The Swift Pods being used are:
CryptoSwift and JSONWebToken
And when i add 'use_framewords!' i got error on the other libraries written with objective-c that use pod also
Here is my podfile :
source “https://github.com/CocoaPods/Specs.git”
platform :ios, '8.1'
pod 'GoogleMaps'
pod 'RSKImageCropper'
pod 'AFNetworking', '~> 3.0'
pod 'DZNEmptyDataSet'
pod 'Instabug'
Thank's in advance
You can drag and drop the
link
sources into your project. If you add the library in this way, you
will update the library manually as you know.
The second option is using cocoapods and solving the problem. When you use use_frameworks! cocoapods tries to convert the whole pods as framework, so the error should be in your bridging header. Try to import your frameworks in your files.

Transitive dependencies error while installing cocoa pods

I want to integrate "Login with google" in my application. I tried to use pods, but i am getting error which is as follows:
The 'Pods-ProjectName' target has transitive dependencies that include static binaries: ProjectPath/GoogleAppUtilities/Libraries/libOpenInChrome.a
My Pod file code is as follows:
target 'ProjectName' do
use_frameworks!
pod "OAuthSwift", "~> 0.3.4"
pod "Haneke", "~> 1.0"
pod "Alamofire", "~> 1.2"
pod "IJReachability", :git => "https://github.com/Isuru-Nanayakkara/IJReachability.git"
pod "iCarousel"
pod 'SDWebImage', '~>3.7'
pod 'Google/SignIn'
end
I am using Crashlytics also. Without Google/signIn i am able to create pods workspace successfully.
Any solution on this.
Regarding cocoapods documentation for version 0.36, you can not add static libraries to your project. Google pod seems to have dependencies to some static libraries making pod install crash.
If you use ObjectiveC, and you remove the use_frameworks! part, you will have no problem.
Another option, of course, is to add the Google lib directly to the project so you won't be using cocoapods.
Add the following lines of code to your pod file to ignore transitive dependencies:
pre_install do |installer|
def installer.verify_no_static_framework_transitive_dependencies
end
end
If you're using podfile like MIHCrypto uses static libraries added all dependency libraries to project and change mach-O-Type to static as per below:
Go to your podfile and insert the following
pre_install do |installer|
def installer.verify_no_static_framework_transitive_dependencies; end
end
This worked for me.

Resources