Skip to content

Commit

Permalink
Create README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
sandorgyulai committed Oct 13, 2015
1 parent f24a885 commit 3d51863
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# InAppFramework
In App Purchase Manager framework for iOS

### Installation

#### Cocoapods

```
pod 'InAppFw'
```

### Usage

* Register for Notifications with the name below where you want to do something

```
ProductPurchasedNotification
```

* Add your product identifiers

```
InAppFw.sharedInstance.addProductId(id: String)
```

or add multiple of them

```
InAppFw.sharedInstance.addProductIds(ids: Set<String>)
```

* Request products from Apple

```
InAppFw.sharedInstance.requestProducts(completionHandler: (success:Bool, products:[SKProduct]?)
```

* Load the previously purchased products

```
InAppFw.sharedInstance.loadPurchasedProducts(checkWithApple: Bool, completion: ((valid: Bool) -> Void)?)
```

"checkWithApple" if true will validate the Purchase receipt with Apple Servers too. The completion will be only true if the receipt was valid

* Purchase product

```
InAppFw.sharedInstance.purchaseProduct(product: SKProduct)
```

* Or Restore products purchased on an other device

```
InAppFw.sharedInstance.restoreCompletedTransactions()
```

0 comments on commit 3d51863

Please sign in to comment.