Git Product home page Git Product logo

braintree_ios's Introduction

Braintree iOS SDK

Carthage compatible Travis CI build status

Welcome to Braintree's iOS SDK. This library will help you accept card and alternative payments in your iOS app.

The Braintree iOS SDK requires Xcode 7+ and a Base SDK of iOS 9+. It permits a Deployment Target of iOS 7.0 or higher.

Getting Started

The current major version is 4.x. If you are upgrading from version 3.x, take a look at our Braintree iOS 3.x to 4.x Migration Guide.

We recommend using either CocoaPods or Carthage to integrate the Braintree SDK with your project.

CocoaPods

Add to your Podfile:

pod 'Braintree'

Then run pod install. This includes everything you need to accept card and PayPal payments. It also includes our Drop-in UI and payment button.

Customize your integration by specifying additional components. For example, add Apple Pay support:

pod 'Braintree'
pod 'Braintree/Apple-Pay'

You can also strip down your integration to only support credit and debit cards:

pod 'Braintree/Card'

See our Podspec for more information.

Although we recommend upgrading to the latest version of our SDK, you can choose to remain on the 3.x version, e.g.

pod 'Braintree', '~> 3.9'

Carthage

Add github "braintree/braintree_ios" to your Cartfile, and add the frameworks to your project.

Static Library

Please follow the static library integration instructions.

Manual Integration

For v3 integrations, please follow the v3 manual integration instructions.

Note that for apps targeting iOS 8+, you may add Braintree.xcodeproj to your Xcode workspace and add the frameworks to the app target Embedded Binaries section.

Supporting iOS 9

Support for iOS 9 requires a few configuration changes with your Xcode project, detailed below.

App Transport Security

iOS 9 introduces new security requirements and restrictions. If your app is compiled with iOS 9 SDK, it must comply with Apple's App Transport Security policy.

The Braintree Gateway domain complies with this policy.

3D Secure uses third party domains, which may need to be whitelisted for ATS, as part of the authentication process.

URL Query Scheme Whitelist

If your app is compiled with iOS 9 SDK and integrates payment options with an app-switch workflow, you must add URL schemes to the whitelist in your application's plist.

If your app supports payments from PayPal:

  • com.paypal.ppclient.touch.v1
  • com.paypal.ppclient.touch.v2

If your app supports payments from Venmo:

  • com.venmo.touch.v2

For example, if your app supports PayPal, you could add the following:

  <key>LSApplicationQueriesSchemes</key>
  <array>
    <string>com.paypal.ppclient.touch.v1</string>
    <string>com.paypal.ppclient.touch.v2</string>
  </array>

There is a new UIApplicationDelegate method that you may implement on iOS 9:

- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString*, id> *)options

Implementing this method is optional. If you do not implement it, the deprecated equivalent will still be called; otherwise, it will not.

In either case, you still need to implement the deprecated equivalent in order to support iOS 8 or earlier:

- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation

Bitcode

The Braintree SDK works with apps that have bitcode enabled.

Documentation

Start with 'Hello, Client!' for instructions on basic setup and usage.

Next, read the full documentation for information about integration options, such as Drop-In UI, PayPal, and credit card tokenization.

Finally, cocoadocs.org/docsets/Braintree hosts the complete, up-to-date API documentation generated straight from the header files.

Demo

A demo app is included in project. To run it, run pod install and then open Braintree.xcworkspace in Xcode.

Help

Feedback

The Braintree iOS SDK is in active development, we welcome your feedback!

Here are a few ways to get in touch:

Releases

Subscribe to our Google Group to be notified when SDK releases go out.

License

The Braintree iOS SDK is open source and available under the MIT license. See the LICENSE file for more info.

braintree_ios's People

Contributors

alexdenisov avatar ayanonagon avatar benmaer avatar benmills avatar braintreeps avatar burnto avatar demerino avatar diogeneshamilton avatar intelliot avatar jayhp avatar lkorth avatar m-kirsanov avatar mickeyreiss avatar nirinchev avatar prayagverma avatar reflejo avatar sberrevoets avatar sergey-sportsetter avatar simonyangme avatar skunkworks avatar theill avatar tomwhipple avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.