Cocoapods issue in Mojave OS - ios

I'm Unable to install pods in my iOS project after updating Mac OS to Mojave. I am getting the following error. (Note: I have already updated my Cocoapods to the latest version).
### Podfile
```ruby
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'MojavePodTest' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
pod 'Alamofire', '~> 4.5'
end
```
### Error
```
Errno::ENOTEMPTY - Directory not empty # dir_s_rmdir - /Users/Name/Library/Caches/CocoaPods/Pods

After "end" keyword, you have some quote remains. Please check or copy paste the below ones.
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'Workmate' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
pod 'Alamofire', '~> 4.5'
# Pods for Workmate
end
If still you have issues, then create a new podfile and add your "Alamofire"

Related

pod install error>>> Unable to determine the platform for the `SocketSwift` target

I downloaded github Socket.swift, created Podfile per installation instruction,
but Cocoapods "pod install" gets the error.
Podfile is:
[![# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
source 'https://github.com/CocoaPods/Specs.git'
target 'SocketSwift' do
# Pods for SocketSwift
pod 'Socket.swift', '~> 2.4.0'
end][1]][1]
Code is unmodified Socket.swift

In react-native App when creating pod file the target is empty

In my react-native app I want to integrate cocoapod,after
sudo gem install cocoapods. When I create the pod file is using pod init command ,then the pod file is missing the target .
Below is the pod file code.
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target ' ' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for
end
Due to this when installing pod framework ,its not working.

Transitive dependencies that include static binaries using google map and clustering

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

No such module 'Alamofire' in XCode 7.3 & Swift 2.2

I am integrating Almofire via cocoapods in my new swift project. After successful installation of Alamofire pod, i am unable to import it in my swift file. Xcode shows following error.
No such module 'Alamofire'
Following is my Podfile for reference
source 'https://github.com/CocoaPods/Specs.git'
# Uncomment this line to define a global platform for your project
platform :ios, '9.0'
# Uncomment this line if you're using Swift
use_frameworks!
target 'CoreDataSample' do
pod 'Alamofire', '~> '3.4'
end
target 'CoreDataSampleUITests' do
end
I have already referred following issues in Almofire on github
Issue #551
Issue #1130
Also tried following things
Project clean
Project Build
Removed Derived Data
Any advise would be appreciate.
Try this inside your pod file
# Uncomment this line to define a global platform for your project
platform :ios, '9.0'
target 'demoAlamofire' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for demoAlamofire
pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire'
target 'demoAlamofireTests' do
inherit! :search_paths
# Pods for testing
end
target 'demoAlamofireUITests' do
inherit! :search_paths
# Pods for testing
end
end
I hope this will help you.

How to create a CocoaPod with swift?

I create a swift cocoa touch framework according to create cocoapod with siwft
and it works fine, But there is another problem, my framework will dependency on other framework, such as SwiftyJSON.
And I try add
s.dependency "SwiftyJSON", "~> 2.3"
into the .podspec file.
But when I try to build my 'Example', still error happens :
'No such module SwiftyJSON'
Open your terminal and goto to your folder project. Then follow this step. Type this command in your terminal.
open -a TextEdit Podfile
Then copy this pod 'SwiftyJSON', :git =>'https://github.com/SwiftyJSON/SwiftyJSON.git'
put into Podfile. Then save it. And type this command in your terminal.
pod install
Hope it will help you.
First you should install cocoapods package in your mac
check this tutorial to do this How to install cocoapods?
Then you can install any cocoapods for any project by the following steps
open terminal
navigate to the root path for the project, example
cd /Users/mac/Desktop/cocoatest
then type
pod init
(the will generate file "Podfile" ) open it
the content for this file will be something like this:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'cocotest' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for cocotest
end
uncomment this line # platform :ios, '9.0'
and then add you cocoapods under this line
# Pods for cocotest
like
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'cocotest' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for cocotest
pod "SwiftyJSON", "~> 2.3"
end
then save the file
after that type pod install in terminal and it will create file with
xcworkspace extension open it and that is your project

Resources