issue while installing pod by command line - ios

I am using pods first time in the project . I created a new project and followed following process :
Downloaded master from the github ,as terminal asked me to do it manually
fired : pod init method . This command generated Podfile in my Xcode project folder
Then I added a line in the pod file : pod 'Alamofire', '2.0.2'
4 . Then I fired pod install command and I am getting following error in the terminal window :
Setting up CocoaPods master repo
[!] Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named `master-1`.
You can try adding it manually in `~/.cocoapods/repos` or via `pod repo add`.
I am following this tutorial :
https://www.raywenderlich.com/97014/use-cocoapods-with-swift
Please suggest workaround for this issue.
following is my pod file :
platform :ios, "8.0"
use_frameworks!
target 'PodsTest' do
# Uncomment this line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for PodsTest
pod 'Alamofire', '2.0.2'
target 'PodsTestTests' do
inherit! :search_paths
# Pods for testing
end
target 'PodsTestUITests' do
inherit! :search_paths
# Pods for testing
end
end

In you pod file mention the code like this.
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
pod 'Alamofire', '2.0.2'
and then try pod install

You just need to update repo
Run pod repo update on terminal.
Try to use latest Alamofire => pod 'Alamofire', '~> 4.0'
Hope it will help you.

Are your Command Line Tools set up correctly according to the Xcode version you are using?
In Terminal:
sudo xcode-select -r
And then in XCode:
Xcode -> Preferences -> Locations -> Command Line Tools
worthwhile checking, this might cause the problem

Related

Pods not installing properly

I had been installing pods and the pods get installed properly . However , in the Project navigator , the .xcconfig files are red in color and I cannot set the same in the project-> info -> configurations either as they don't get listed and only none is listed. When debugged , I could find that the .xcconfig files were getting accessed by the xcode in the following path
/Volumes/Macintosh HD/Users/xxxxxxxxxx/Documents/xxxxxxxx/app/Pods/Pods/Target Support Files/Pods-broadcastuploadSetupUI/Pods-broadcastuploadSetupUI.release.xcconfig
/Pods is there twice , Because of which I am getting the following errors :
diff: /Podfile.lock: No such file or directory
diff: /Manifest.lock: No such file or directory
error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.
I am working with Xcode 9 beta . Can anyone kindly help ?
P.S , I have tried sudo gem install , pod update , disintegrate , install and everything that is available on the internet as a solution. I'd be glad if anyone could help
This is my podfile :
#platform :ios, ‘11.0’
source 'https://URL_TO_ACCESS_PODSPEC_FOR_POD'
source 'https://github.com/CocoaPods/Specs.git'
target 'app' do
pod 'objective-zip', '~> 1.0'
pod 'AssistScreenShareKit'
use_frameworks!
end
target ‘broadcastupload’ do
pod 'AssistScreenShareKit'
use_frameworks!
end
target ‘broadcastuploadSetupUI' do
pod 'AssistScreenShareKit'
use_frameworks!
end
Error :
The file “Pods-app.release.xcconfig” couldn’t be opened because there is no such file. (/Volumes/Macintosh HD/Users/xxxxxxxx/Documents/xxxxx/app/Pods/Pods/Target Support Files/Pods-app/Pods-app.release.xcconfig)
Steps to install pod
Open a terminal window, and $ cd into your project directory.
To create a Podfile you need to to run $ pod init.
Open your Podfile. The first line should specify the platform and
version supported.
platform :ios, '9.0'
use_frameworks! target 'yourProjectName' do
pod 'Alamofire' end
Then install the pod
pod install
First delete all pods and Podfile.lock
open terminal and go to folder path
Edit your podfile by this
platform :ios, '8.0'
use_frameworks!
target 'MyApp' do
//add your all pods
end
pod install
close xcode and open MyApp.xcworkspace file
check for more: Command-line Reference
This will help you.
update your Cocoapods version, I had this problem with Cocoapods 1.5.3 and it was fixed in 1.6.1
to do that open terminal and just type
gem install cocoapods

Cocoapods install error- Unable to find a specification for pod

I am trying to install two pods to my Xcode project from terminal. I initially had installed a pod called PRAugmentedReality, and it worked fine. Then I tried adding the pod BFTransmitter, and started getting the following error message:
[!] Unable to find a specification for 'PRAugmentedReality'
If I remove the PRAugmentedReality pod and install with just BFTransmitter, it also works fine. So basically I am able to install either on their own, but not together.
My podfile looks like this:
#source for BFTransmitter
source 'https://bitbucket.org/bridgefy/bridgefypods.git'
target 'FWF' do
pod 'BFTransmitter'
pod 'PRAugmentedReality'
target 'FWFTests' do
inherit! :search_paths
end
end
I have tried repo remove master pod setup and then pod install, still no luck.
just add source to install both pods together check my podFile and add sourced before your target as I did
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
source 'https://github.com/CocoaPods/Specs.git'
source 'https://bitbucket.org/bridgefy/bridgefypods.git'
target 'pod' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
pod 'BFTransmitter'
pod 'PRAugmentedReality'
# Pods for pod
end
Result
I encounter the same problem in my project.
When I was editing pod file, I changed pod 'SCSoftKycSolutionSdkSource' to pod 'MyprojectName'.
I fixed the below, issue fixed.
pod 'SCSoftKycSolutionSdkSource'

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>

AFNetworking.framework: No such file or directory in Xcode 8

I just opened my project in Xcode 8.0 and tried to build it, but the following "PBXCp Error Group" appeared:
error: /Users/username/Documents/XYZ/build/Debug-iphoneos/AFNetworking.framework: No such file or directory
My Podfile is below:
platform :ios, '10.0'
use_frameworks!
target 'XYZ' do
pod "MSSTabbedPageViewController"
pod "SKStatefulTableViewController", "~> 0.1"
pod "QBFlatButton"
pod "LTNavigationBar"
pod "KBRoundedButton"
pod "CTCheckbox"
pod "SKStatefulTableViewController", "~> 0.1"
pod "SDWebImage"
pod "TOCropViewController"
pod "UIImageViewAligned"
pod "AFNetworking"
pod "MBProgressHUD"
pod "JSONModel"
pod "CWStatusBarNotification"
pod "Firebase/Messaging"
pod "MaterialControls"
pod "Fabric"
pod "Crashlytics"
end
Pod is installed and OK.
I don't know what I did, since Cocoapods seems to be in the build folder.
I've had the same issue. Adding and removing AFNetworking from podfile didn't help at all. The only thing that worked for me was to remove AFNetworking.framework and add it again from correct path. The original path was pointing to wrong direction...
change the platform :ios, '10.0' to older platform and update pod file it will work fine for me.
try to add it properly because i had recently install all pod file in my side it working fine for me.remove your pod file and then install it.
Checking the item "Copy only when installing" in build setting just worked for me.

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

Resources