Skip to content

Simplifies adding In App Purchases to iOS applications.

License

Notifications You must be signed in to change notification settings

cycqitianwushuge/ASBanker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ASBanker

Simplifies adding In App Purchases to iOS applications. Create a Banker, set its delegate and pass an array of your In App Purchase products to it, easy! The Banker handles the rest including storing the transactions and handling errors.

Preparing for In App Purchases

Important

You will need to create an In App Purchase product for your app in iTunes Connect.

For a detailed tutorial on prepaing your app for In App Purchases, click here

Installation

Installing with CocoaPods

If you're unfamiliar with CocoaPods there is a great tutorial here to get you up to speed.

  1. In Terminal navigate to the root of your project.

  2. Run 'touch Podfile' to create the Podfile.

  3. Open the Podfile using 'open -e Podfile'

  4. Add the pod ASBanker to your Podfile.

     platform :ios
     pod ASBanker'
    
  5. Run pod install.

  6. Open your app's .xcworkspace file to launch Xcode and start adding In App Purchases!

Installing manually from GitHub

  1. Download the ASBanker.h and ASBanker.m files and add them to your Xcode project.
  2. #import ASBanker.h wherever you need it. 3 Add the 'StoreKit.framework' to your project.
  3. Follow the included sample project to get started changing the products array for your product in iTunes Connect in 'ViewController.m'.

Running the sample project

Check out the sample project included in the repository. Open the '.xcodeproj' file in the sample project folder and the project should build correctly.

Configuration

To run the sample project with your own In App Purchases you'll need to change a few things:

  1. Set the Bundle Identifier and the Team for the project in Xcode.

  2. Chnage the Product Identifiers to your own. In the sample project these are in Constants.m and used in ProductTableViewController.m.

Version History

Version 2.0.0

  1. Supports iOS 7 plus.
  2. Supports Consumable, Non-Consumable, Auto-Renewable Subscriptions, Free Subscriptions, Non-Renewing Subscriptions and Apple Hosted Content.

Version 1.1.1

  1. Bug fixes.

Version 1.1.0

  1. Bug fixes.

Version 1.0.0

  1. Supports iOS 6 plus.
  2. Supports Consumable and Non-Consumable only.

Licence

Distributed under the MIT License.

Credits

This work is based on the original work of Paul Hudson, with permission.

About

Simplifies adding In App Purchases to iOS applications.

Resources

License

Stars

Watchers

Forks

Packages

No packages published