README.md 555 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
# Mobile Buy SDK Sample Swift App

The Swift sample app demonstrates how to use the SDK within a Swift app. The app includes an Objective-C bridging header.

### Getting started

First, add your shop domain, API key and Channel ID to the `ViewController.swift`.

```swift
let shopDomain = ""
let apiKey = ""
let channelId = ""
let productId = ""
```

### Overview

The sample app also demonstrates how to use the `BUYClient` to obtain a product by calling `getProductById()`.

```swift
client.getProductById(productId) { (product, error) -> Void in
}
```