I use several pods in my Xcode project, all work perfectly well except SimpleAuth
Here is my code in my podfile:
source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!
platform :ios, ‘8.0’
pod 'SWRevealViewController', '~> 2.3'
pod 'SAMCache'
source 'https://github.com/calebd/SimpleAuth'
use_frameworks!
pod 'SimpleAuth/Instagram'
Then, I install my pod using my terminal targeting my project folder. And as you can see, the "SimpleAuth" folder created in my project is empty when it should include all the objective-c classes that it needs to operate:
Any help by more experience objective-c coders much appreciated.
why are you using two ways. instead use simple
podflie
use_frameworks!
platform :ios, ‘8.0’
pod 'SWRevealViewController', '~> 2.3'
pod 'SAMCache'
pod 'SimpleAuth/Instagram'
there is no need of mentioning source path. Cocoapods will do it automatically.
It is not used because if sometime in future if it change then you will have a problem.
Related
our project is an Objective-c project.
Since we're using react-native-firebase we can't use use_frameworks! in cocoapods any more.
The problem is we have a swift pod dependency (PromiseKit) and to use swift dependencies we must use use_frameworks! as far as I understand.
What I'm trying to do is have the best of both worlds, aka:
remove use_frameworks! so that react-native-firebase works AND
keep the PromiseKit swift dependency.
current Podfile:
platform :ios, '10.0'
target 'TestApp' do
use_frameworks!
# swift pod
pod 'PromiseKit'
# react-native-firebase
pod 'Firebase/Core', '~> 5.3.0'
pod 'Firebase/DynamicLinks', '~> 5.3.0'
pod 'Firebase/Messaging', '~> 5.3.0'
end
I noticed there's this command :modular_headers => true or use_modular_headers which I sense may or may not be relevant to the solution I'm looking for since Cocoapods 1.5 but I can't seem to connect the dots.
Edit:
If I remove use_frameworks! (even if I replace it with use_modular_headers!) I get this error:
Any help please?
Replace use_frameworks! with use_modular_headers! in the Podfile.
From the CocoaPods 1.5 release note referenced:
With CocoaPods 1.5.0, developers are no longer restricted into
specifying use_frameworks! in their Podfile in order to install pods
that use Swift. Interop with Objective-C should just work. However, if
your Swift pod depends on an Objective-C, pod you will need to enable
"modular headers" (see below) for that Objective-C pod.
With CocoaPods 1.9.0, it is now possible to build frameworks both statically and dynamically. Use use_frameworks! :linkage => :static
I have also faced this issue. and find a perfect solution for this.
https://github.com/joncardasis/cocoapods-user-defined-build-types
this is a plugin for cocoapods by which we can specify to use "dynamic framework" (i.e. what "use_framework" does) on a particular pod. this feature is not currently supported in cocoapods, that is why use this plugin to resolve your issue.
I ran into a similar issue last week, so I created a basic project where I'm using Swift, Firebase but not use_frameworks!, instead using bridging headers.
Don't know if people are still having issues with this, let me know if it helps. https://github.com/jenshandersson/React-Native-Swift
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
In my app i have integrated Googlemap using CocoaPod.
Now I want to integrate CitrusPay using CocoaPod but when i have execute pod install command on terminal then i am getting error -
[!] Invalid Podfile file:
The target Pods-MyApp already has a platform set..
from /Users/NewFolder/Desktop/xyz.app.MyApp.ios/Podfile:10
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.1'
pod 'GoogleMaps'
Does anyone knows how to solve this error?
i have the same question with you,and than search answer in the internet,but nothing ,so i solve question myself,
step:
first : sure you 'Podfile' file only have "platform:ios,'version'" one time;
second : add "target 'yourtarget'do" in the file top;
third : add "end" in the file bottom.
you must maintain your "Podfile" file have formatter:
enter image description here
you will solve this question, wish can help you.thanks.
Add target to your podfile
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.1'
target 'YourTarget' do
pod 'GoogleMaps'
end
I had the same issue and eventually I solved it, now my Podfile looks like this
#Alamofire - lib for HTTP requests
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!
target 'Fitzz' do
pod 'Alamofire', '~> 4.0'
#XCGLogger - lib for loggin output
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
pod 'XCGLogger', '~> 4.0.0'
end
I am a rookie in iOS, but this works for me
I have followed this tutorial to get my Amazon SDK up and running.
It creates another project file with .xcworkspace extension that I have to use to be able to access all my Amazon SDK.
later I have edited the Podfile to include Almofire:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
target :'MyTarget’ do
pod 'AWSCognito'
pod 'AWSS3'
pod 'Alamofire', '~> 3.4'
end
and ran pod install.
Everything executes correctly but when I import Alamofire in my .xcworkspace project it doesnt work but it works in my old project. The reverse is true about my AWSS3 import.
I am new to IOS development and have no idea how to fix this.
I dont know how but I seem to fix the problem.
I have restarted the Mac OSX and have Changed my Podfile to reverse the order of Alamofire and AWS pods like so:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
target :'MyTarget’ do
pod 'Alamofire', '~> 3.4'
pod 'AWSCognito'
pod 'AWSS3'
end
I have opened Xcode and the error has vanished.
Very bizarre
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.