Skip to content

Latest commit

 

History

History
52 lines (34 loc) · 2.63 KB

Braintree-Static-Integration-Guide.md

File metadata and controls

52 lines (34 loc) · 2.63 KB

Static Library Integration Guide

Please follow these instructions to integrate Braintree iOS into your app using the provided static library.

Note: We assume that you are using Xcode 8+ and iOS 9.0+ as your Base SDK.

  1. Add the Braintree iOS SDK code to your repository
  1. Open up your app in Xcode

  2. Add Braintree as a subproject

  • Open your project and drag the Braintree.xcodeproj file to your Project Navigator under your project. Be sure NOT to have the Braintree.xcodeproj open while doing this step.

Screenshot of adding Braintree as a subproject

  1. Add Braintree to your build phases ([Your App Target] > Build Phases)
  • Target Dependencies

    • Click the + and add Braintree

    Screenshot of adding Braintree to Target Dependencies

  • Link Binary With Libraries

    • Click the + and add libBraintree.a

    Screenshot of adding Braintree to Link Bunary With Libraries

  1. Add localized strings to Copy Bundle Resources ([Your App Target] > Build Phases)
  • In the Project Navigator, locate the UI.strings (Braintree.xcodeproj > BraintreeUI > Localization > UI.strings)
  • Drag the UI.strings file from the Navigator to the Copy Bundle Resources panel and drop it
  • Repeat for remaining localized strings
    • Drop-In.strings (Braintree.xcodeproj > BraintreeUI > Drop-In > Localization > Drop-In.strings)
    • Three-D-Secure.strings (Braintree.xcodeproj > Braintree3DSecure > Localization > Three-D-Secure.strings)

Screenshot of adding localized strings to Copy Bundle Resources

  1. Modify your build settings ([Your App Target] > Build Settings)
  • Update Header Search Paths

    • Add $(PROJECT_DIR)/braintree_ios (or whatever the name of the braintree folder at the top level of your project is)
    • Be sure to select recursive from the drop down at the right

    Screenshot of updating Header Search Paths

  • Update Other Linker Flags

    • Add -ObjC

    Screenshot of updating Header Search Paths

  1. Build and Run your app to test out the integration

  2. Integrate the SDK in your checkout form