Skip to content

p2p-org/TransakSwift

Repository files navigation

TransakSwift

CI Status Version License Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

TransakSwift is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'TransakSwift'

Usage

The are 2 ways to implement transak:

1. Implement transak as a Widget (a UIViewController), with TransakWidgetViewController

#if DEBUG
let vc = TransakWidgetViewController(env: .stagging, params: .init(
    apiKey: "<YOUR_API_KEY_HERE>",
    hostURL: "<YOUR_COMPANY_URL>",
    additionalParams: [
        "cryptoCurrencyCode": "ETH",
        "walletAddress": "0x86349020e9394b2BE1b1262531B0C3335fc32F20"
    ]
))
present(vc, animated: true, completion: nil)
#else
let vc = TransakWidgetViewController(env: .production, params: .init(
    apiKey: "<YOUR_API_KEY_HERE>",
    hostURL: "<YOUR_COMPANY_URL>",
    additionalParams: [
        "cryptoCurrencyCode": "ETH",
        "walletAddress": "0x86349020e9394b2BE1b1262531B0C3335fc32F20"
        ]
))
present(vc, animated: true, completion: nil)
#endif

2. Custom implemetations using Transak API (developing)

Author

Chung Tran, [email protected]

License

TransakSwift is available under the MIT license. See the LICENSE file for more info.