简体   繁体   English

什么是条纹cocoapods。 如何安装?

[英]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是一个依赖项管理器。

  1. Install CocoaPods. 安装CocoaPods。 sudo gem install cocoapods . sudo gem install cocoapods You may need to pod setup afterwards. 之后,您可能需要pod setup

  2. Go into your project directory and pod init . 进入项目目录pod init This will generate a Podfile. 这将生成一个Podfile。

  3. 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. 这将安装这两个框架及其依赖项。

  4. Run pod install for CocoaPods to magically install the required dependencies. 运行CocoaPods的pod install神奇地安装所需的依赖项。

  5. 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.

相关问题 如何安装 CocoaPods? - How do I install CocoaPods? 无法通过Cocoapods安装Parse软件包。 缺少图书馆 - Unable to install Parse package via Cocoapods. Missing library 这是关于可可豆的。 安装 podfile 时发生错误。 就像关于 ruby​​ 的语法错误 - It's about the cocoapods. An error occurred when I install my podfile. It's like the syntax error about ruby 我的项目使用Cocoapods时如何安装Frank? - How do I install Frank when my project is using Cocoapods? 无法设置 cocoapods。Cocoapods 设置问题 - unable to setup cocoapods. Cocoapods setup problem 无法使用cocoapods安装Firebase。 它说“无法获得本地发行者证书” - Cannot install Firebase using cocoapods. It says “Unable to get local issuer certificate” 如果不使用sudo安装cocoapods,我会失去哪些特权? - What privileges do I lose when I install cocoapods without sudo? #if canImport() 不能与 CocoaPods 一起正常工作。 严重问题 - #if canImport() not working properly with CocoaPods. Serious issue 我想将GoogleMaps添加到我的iOS项目中,但我不想使用CocoaPods。 有什么办法可以实现? - I would like to add GoogleMaps to my iOS project but I don't want to use CocoaPods. Is there any way to achieve that? 什么是钥匙,我该如何使用它们? - What are keys and how do I use them?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM