[英]What are stripe cocoapods. How do i install them?
I am trying set up Stripe in my IOS app, but i have no clue what these instructions mean? 我正在尝试在IOS应用程序中设置Stripe,但是我不知道这些说明是什么意思? Is cocoapods an application i install?
我安装了cocoapods应用程序吗?
Step 1: Install Stripe Cocapod(s)
步骤1:安装Stripe Cocapod
CocoaPods is a common library dependency management tool for iOS development.
CocoaPods是用于iOS开发的通用库依赖管理工具。 To use the Stripe CocoaPods, simply add the following to your Podfile and run pod install:
要使用Stripe CocoaPods,只需将以下内容添加到Podfile并运行pod install:
pod 'Stripe' pod 'PaymentKit'
pod'Stripe'pod'PaymentKit'
Note: be sure to use the .xcworkspace to open your project in Xcode instead of the .xcproject.
注意:确保使用.xcworkspace而不是.xcproject在Xcode中打开项目。
Here is the guide i am using to set up Stripe... Guide 这是我用来设置Stripe的指南。
CocoaPods is a dependency manager. CocoaPods是一个依赖项管理器。
Install CocoaPods. 安装CocoaPods。
sudo gem install cocoapods
. sudo gem install cocoapods
。 You may need to pod setup
afterwards. 之后,您可能需要
pod setup
。
Go into your project directory and pod init
. 进入项目目录并
pod init
。 This will generate a Podfile. 这将生成一个Podfile。
Go ahead and edit the Podfile with your favourite editor (vim, emacs, flame wars...). 继续使用您喜欢的编辑器 (vim,emacs,flame wars ...) 编辑Podfile 。 Enter
pod 'Stripe'
in one line under your target, and also enter pod 'PaymentKit'
in a second line. 进入
pod 'Stripe'
在你的目标下一条线,并且还进入pod 'PaymentKit'
在第二条线。 This will install these two frameworks and their dependencies. 这将安装这两个框架及其依赖项。
Run pod install
for CocoaPods to magically install the required dependencies. 运行CocoaPods的
pod install
来神奇地安装所需的依赖项。
Open your $project.xcworkspace
. 打开
$project.xcworkspace
。 The workspace includes your project as well as your pods target which generates the necessary frameworks. 工作区包括您的项目以及生成必要框架的pod目标。
You're done! 你完成了! Enjoy Stripe and PaymentKit!
享受Stripe和PaymentKit!
cocoa pod installation step : 可可豆荚的安装步骤:
Open Your Terminal : 打开您的终端:
sudo gem update --system
sudo gem install cocoapods
pod setup
Then Go To Your Project Directory 然后转到您的项目目录
pod init
open -a Xcode Podfile
[Edit POD file with pod 'libname' ] [使用pod'libname'编辑POD文件]
pod install
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.