Here is my podfile, is it possible to link the FXForms pod only to the "MainTarget" target?
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
pod "AFNetworking"
pod 'CryptoCoding', "~> 1.1"
pod 'FXForms'
pod "FDKeychain", "~> 1.0.0"
pod 'SVProgressHUD'
link_with 'MainTarget', 'ExtensionTarget'
Nothing easier than that:
target :MainTarget do
pod 'FXForms'
end
For more infos see CocoaPods documentation
Related
i am relatively new in ios, especially cocoa pods. i ran into a problem,somehow the IgListKit dependency is un-importable, I already clean build, build 1st then add the import, even deleting the xcworkplace and adding a new one by doing pod install
How do I fix it? is it an issue within the Pod? should I file an error? Thank you
How I add the dependencies :
# Uncomment the next line to define a global platform for your project
platform :ios, '12.0'
target 'LearnViper' do
pod 'Alamofire', '~> 5.4'
pod 'RxSwift', '6.2.0'
pod 'RxCocoa', '6.2.0'
pod 'Kingfisher', '~> 7.0'
pod 'SkeletonView'
pod 'IGListKit', '~> 4.0.0'
end
platform :ios, '12.0'
target 'LearnViper' do
use_frameworks!
pod 'Alamofire', '~> 5.4'
pod 'RxSwift', '6.2.0'
pod 'RxCocoa', '6.2.0'
pod 'Kingfisher', '~> 7.0'
pod 'SkeletonView'
pod 'IGListKit', '~> 4.0.0'
end
you have to update your gem file with command first
sudo gem install -n /usr/local/bin cocoapods
then after that open podfile add pods and install
Looks like all you have to do is add
use_frameworks! in your pod file
I have an iOS app install aws sdk , Facebook Login Kit and google login via cocoa pods. But when I build the app , xCode shows following error:
Show Image
I don't known what's wrong, I've follow mobile hub setup steps.
I've add
"-force_load $(SRCROOT)/Pods/GoogleSignIn/Frameworks/GoogleSignIn.framework/GoogleSignIn"
"-force_load $(SRCROOT)/Pods/GoogleUtilities/Frameworks/GoogleUtilities.framework/GoogleUtilities"
to Other Linker Flags,
Here shows the pod file:
platform :ios, '9.0'
target 'AWSLogin' do
use_frameworks!
pod 'AWSS3'
pod 'AWSCognito'
pod 'AWSCognitoIdentityProvider'
pod 'AWSDynamoDB'
pod 'FBSDKCoreKit', '~> 4.9'
pod 'FBSDKLoginKit', '~> 4.9'
pod 'FBSDKShareKit', '~> 4.9'
pod 'GoogleSignIn'
end
And I've add Add the frameworks AddressBook.framework, SafariServices.framework, and SystemConfiguration.framework as dependency.
Dose any body known why it can't build.
I posted the code here.
I fixed this by adding two missing pods to the Podfile:
platform :ios, '9.0'
target 'AWSLogin' do
use_frameworks!
pod 'AWSS3'
pod 'AWSiOSSDKv2'
pod 'AWSCognito'
pod 'AWSCognitoIdentityProvider'
pod 'AWSDynamoDB'
pod 'AWSLambda'
pod 'FBSDKCoreKit', '~> 4.9'
pod 'FBSDKLoginKit', '~> 4.9'
pod 'FBSDKShareKit', '~> 4.9'
pod 'GoogleSignIn'
end
I updated the gem pod and I am now getting an error while compiline Signal-iOS. Here is the error I am getting:
[!] Invalid Podfile file: [!] The specification of link_with in
the Podfile is now unsupported, please use target blocks instead..
Here is the content of the Podfile:
platform :ios, '8.0'
source 'https://github.com/CocoaPods/Specs.git'
link_with ["Signal", "SignalTests"]
I have absolutely no familiarity with CocosPod so this is gibberish to me. I spent time reading online docs, but there is a bit of conflicting information due to the recent changes and deprecation of commands. What is the recommended way to change the file so the project can build again?
In this case, it would be like this:
platform :ios, '8.0'
target 'Signal' do
pod 'SignalServiceKit', :git => 'https://github.com/WhisperSystems/SignalServiceKit.git'
pod 'OpenSSL', '~> 1.0.208'
pod 'PastelogKit', '~> 1.3'
pod 'FFCircularProgressView', '~> 0.5'
pod 'SCWaveformView', '~> 1.0'
pod 'DJWActionSheet'
pod 'JSQMessagesViewController', :git => 'https://github.com/WhisperSystems/JSQMessagesViewController', :commit => 'e5582fef8a6b3e35f8070361ef37237222da712b'
target 'SignalTests' do
inherit! :search_paths
end
end
I've recommended it on this PR: https://github.com/WhisperSystems/Signal-iOS/pull/1180
I'm adding a watch application, and I'm attempting to import a library within my WatchKit Extension that my iOS app uses (SwiftyJSON). I have updated my podfile as such:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
target 'MyApp' do
pod 'Alamofire', '~> 3.0'
pod 'AlamofireImage', '~> 2.0'
pod 'SwiftyJSON', :git => 'https://github.com/SwiftyJSON/SwiftyJSON.git'
pod "PubNub", "~> 4.1"
pod 'Siren'
end
target 'MyAppWatch Extension' do
pod 'SwiftyJSON', :git => 'https://github.com/SwiftyJSON/SwiftyJSON.git'
end
When I run the pod install, everything seems to behave like it should. The problem is when I'm using the import SwiftyJSON inside an WKInterfaceController, I get the error No such module SwiftyJSON. Is there another setting that I haven't set properly?
The way I use to add pods to the watchOS framework with the following podfile:
source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!
platform :ios, '8.0'
link_with 'AppName'
target 'WatchName Extension' do
platform :watchos, '2.0'
pod 'NameOfYourPOd', '~> x.0.0'
end
But there is a very important point about the include of some libraries in the Watch Extension, there are libraries that do not support watchos as a platform yet. There are some good articles about how to add it manually to its podspec to support it.
I hope this help you
I've been trying to solve this issue for a couple days and haven't found a solution. Whenever I try to run a test I receive the error shown below that there are duplicate classes.
I tried these answers but I'm still receiving the duplicate error and my tests won't run
Cocoapods Warning - CocoaPods did not set the base configuration of your project because because your project already has a custom config set
My pod file looks like this:
platform :ios, "8.0"
def project_pods
pod "Braintree"
pod "AFNetworking", "~> 3.0"
pod "MBProgressHUD"
pod "ActionSheetPicker-3.0", "~> 2.0.1"
pod "SCLAlertView-Objective-C", "~> 0.7"
pod "GoogleMaps"
pod "MPSHorizontalMenu"
pod "Fabric"
pod "Crashlytics"
pod "RateView"
pod "QBImagePickerController"
pod "GLCalendarView", "~> 1.0.0"
pod "Heap"
pod "AWSS3"
end
target “iOS_project” do
project_pods
end
target “iOS_projectTests” do
project_pods
end
This is what the error looks like and it is for every cocoapod class:
Class GMSAutocompleteResultsViewController is implemented in both /Users/john/Library/Developer/CoreSimulator/Devices/27CF0470-07AC-4575-8907-A27EE9B357A7/data/Containers/Bundle/Application/7AFB0886-9ED1-464D-8B02-067CDD07511D/iOS_project.app/iOS_project and /Users/john/Library/Developer/Xcode/DerivedData/iOS_projectTests-hezbkjqviaiitthcrrnwetvcojcb/Build/Products/Debug-iphonesimulator/iOS_projectTests.xctest/iOS_projectTests. One of the two will be used. Which one is undefined.
All of the pods are Objective C and I am using a bridging header
Reformat your podfile like this:
platform :ios, "8.0"
def project_pods
pod "Braintree"
pod "AFNetworking", "~> 3.0"
pod "MBProgressHUD"
pod "ActionSheetPicker-3.0", "~> 2.0.1"
pod "SCLAlertView-Objective-C", "~> 0.7"
pod "GoogleMaps"
pod "MPSHorizontalMenu"
pod "Fabric"
pod "Crashlytics"
pod "RateView"
pod "QBImagePickerController"
pod "GLCalendarView", "~> 1.0.0"
pod "Heap"
pod "AWSS3"
target "iOS_projectTests" do
inherit! :search_paths
end
end
target "iOS_project" do
project_pods
end
Source: CocoaPods issue #4626
The error indicates that '
GMSAutocompleteResultsViewController' is integrated two time and only one is used from it
If you are not using unit testing case target for now you can remove that portion from the podfile and check again by pod install or pod update
Remove this portion from your podfile
target “iOS_projectTests” do
project_pods
end
For swift it will be good if you set use_frameworks! below the platform version
so your top portion can be like
platform :ios, "8.0"
use_frameworks!
so your new podfile can look like this
platform :ios, "8.0"
use_frameworks!
def project_pods
pod "Braintree"
pod "AFNetworking", "~> 3.0"
pod "MBProgressHUD"
pod "ActionSheetPicker-3.0", "~> 2.0.1"
pod "SCLAlertView-Objective-C", "~> 0.7"
pod "GoogleMaps"
pod "MPSHorizontalMenu"
pod "Fabric"
pod "Crashlytics"
pod "RateView"
pod "QBImagePickerController"
pod "GLCalendarView", "~> 1.0.0"
pod "Heap"
pod "AWSS3"
end
target “iOS_project” do
project_pods
end
target “iOS_projectTests” do
project_pods
end
Hope this helps, if it still shows the error you may put pods directly on the target instead of putting in def at top
Note: For the Google map you can also directly import the framework like import GoogleMaps instead of adding google maps in the bridging header
now, modify Podfile by commenting use_frameworks! ,like below:
platform :ios, '8.0'
#use_frameworks!
target 'ShiBa' do
pod 'SDWebImage'
pod 'AFNetworking'
pod 'MBProgressHUD'
pod 'MJRefresh', '3.1.0'
pod 'UMengAnalytics'
pod 'YYModel'
pod 'AMapLocation'
pod 'pop'
end