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.
Related
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"
I am working on an app, which requires cocoapods. In the manual of this app is written
Add this to your Podfile:
pod 'SwiftSocket'
And run then pod install
But when I make a pod file using pod init into my folder and then open -a Xcode Podfile and there I add lines
target 'SwiftSocket' do
pod 'SwiftSocket'
end
and the last pod install it says me an error
Unable to find a target named SwiftSocket, did find SwiftSocket iOS, SwiftSocket macOS, SwiftSocket tvOS, and iOS Example.
Edit____________
Picture of my folder.
and how looks my Podfile now
It is working perfectly, check out my podfile
# Uncomment the next line to define a global platform for your project
platform :ios, '10.0'
target 'Demo' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
pod 'SwiftSocket'
# Pods for Demo
end
Demo is the project name. Target name will be your project name.
I am trying to use the library react-native-localization in my ReactNative app for ios, when I try to run I get the following error:
Any ideas how to fix?
I found the solution to my own question.
Add to the "Podfile" this 2 lines:
pod ‘ReactNativeLocalization’,
:path => “../node_modules/react-native-localization”
Here is my complete "PodFile" example.
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'Transit' do
project 'Transit.xcodeproj'
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
# use_frameworks!
pod ‘Firebase/Core’
pod ‘Firebase/Messaging’
pod ‘ReactNativeLocalization’,
:path => “../node_modules/react-native-localization”
end
$
Then execute the command
pod install
To install the necessary components.
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'
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