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
Related
I have This code in Podfile
source 'https://github.com/CocoaPods/Specs.git'
target 'Kine' do
pod 'GoogleMaps'
pod 'GooglePlaces'
end
I want Install in Terminal
cd /Users/-----
pod Install
I received this error
[!] Automatically assigning platform ios with version 11.0 on target because no platform was specified. Please specify a platform for this target in your Podfile. See https://guides.cocoapods.org/syntax/podfile.html#platform.
and in the site I see iOS 10.6 but I don't have iOS 10.6 in Xcode when I change the target in iOS 8.0 or 9.0 or 10 it's not work again and received the same error
and the libPods.a its missing (Red)
Follow these steps:
Open terminal
type
sudo gem install cocoapods
create Podfile in your project root directory
Open Podfile
Type
platform :ios, '10.0'
use_frameworks!
target 'Kine' do
pod 'GoogleMaps'
pod 'GooglePlaces'
end
open terminal goto: cd /Users/path/to/project/root
type pod Install and press enter
goto your project root using Finder
open file Kine.xcworkspace
Run your project
I am trying to use Alamofire for my Swift project. The following is the podfile:
platform :ios, '9.0'
target 'CocoaExample' do
use_frameworks!
pod 'Alamofire', '~> 4.4'
end
I have spent around 5-6 hrs searching for solutions and tried but no luck.
Please let me know how to resolve the issue to install Alamofire ~4.4.
Follow the below steps to install Pods.
As I have just done it in sample project and it works for me :
Before we proceed make sure that you have pods installed on your computer.
With your project directory Open the terminal and hit below command
pod init
This will create Podfile in same directory.
Open Podfile and add target :
pod 'Alamofire', '~> 4.4'
fire commmand 'pod install'
This will install pod and it create pod workspace in your project.
close your xcode and go in the same directory. there will be file call yourprojectname.xcworspace . Open this file then you are all set to go.
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
Integrated (objective C) Xcode 7.2 iOS 9.2:
$ mkdir -p $HOME/Software/ruby
$ export GEM_HOME=$HOME/Software/ruby
$ gem install cocoa pods (automatic pods version (0.39))
$ export PATH=$PATH:$HOME/Software/ruby/bin
$ cd/ to project folder
$ pod init
$ open -a Xcode Podfile
# Uncomment this line to define a global platform for your project
# platform :ios, '8.0'
# Uncomment this line if you're using Swift
# use_frameworks!
target 'ProjectName' do
pod 'AFNetworking', '~> 2.0.3'
end
target 'ProjectNameTests' do
end
$ pod install
Xcode gives error "library not found for -lAFNetworking"
Searched around google: Tried with things:
Removed everything from target>build setting>otherlinkerflag, except $(inherited), compiled but unlucky
Deintegrated pods plugin from (https://github.com/CocoaPods/cocoapods-deintegrate) again installed compiled but unlucky
Tried experiment with header search path & framework search path but unlucky.
Did you open Workspace or Project file? Verify that you open first one
Make Sure Pods is completely instally !!!
and open Workspace file geneterated after pods is installed !!
What I did :
Tried to build project
What happened :
It failed with "Error:The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation."
The libPods.a is not generated
I have the latest cocoapods installed, and this is my podfile :
source 'https://github.com/CocoaPods/Specs.git'
inhibit_all_warnings!
platform :ios, '7.0'
target :MyProjectTests, :exclusive => true do
pod 'OCMock'
end
I have seen similar issues reported at CocaPods project on github, but nothing seems to work.
I don't need any pods for my main project, I'd just like to use OCMock for testing.
You should check that the Manifest.lock file is identical to Podfile.lock.
These files should be the same when a pod install command is executed.
If not, you should check if someone that is collaborating on your GIT project is changing the Podfile.lock (as it is usually under version control).
Yo have to add the Test target to the Podfile between the main target:
target :mainTarget do
link_with "MainTarget"
//Added pods...
target :tests do
link_with "Tests"
end
end