Code Monkey home page Code Monkey logo

mkstorekit's Introduction

#MKStoreKit

This is version 4.3 of MKStoreKit. Few minor bugs reported in auto renewable subscriptions

I'm working on supporting Lion. Not sure if the current version already works. (I guess it should). Once this is done, I guess, MKStoreKit will not have any more major updates (till Apple introduces new IAP mechanisms).

Read the blog post for more.

The source code, MKStoreKit, contains several new objective c files notably MKStoreKitConfigs.h among others like, MKStoreManager.h/m and MKStoreObserver.h/m and five server side files. The MKStoreManager is a singleton class that takes care of everything. Just include StoreKit.Framework and Security.Framework into your product and drag these four files into the project. You then have to initialize it by calling [MKStoreManager sharedManager] in your applicationDidFinishLaunching. From then on, it does the magic. The MKStoreKit automatically activates/deactivates features using your userDefaults. When a feature is purchased, it automagically records it into NSUserDefaults. For checking whether the user has purchased the feature, you can call a function like,

if([MKStoreManager isFeaturePurchased:kFeatureID])
{
//unlock it
}
if([MKStoreManager isSubscriptionActive:kFeatureID])
{
//unlock it
}

To purchase a feature, just call

[[MKStoreManager sharedManager] buyFeature:kFeatureAId 
                                onComplete:^(NSString* purchasedFeature)
 {
     NSLog(@"Purchased: %@", purchasedFeature);
 }
                               onCancelled:^
 {
     NSLog(@"User Cancelled Transaction");
 }];

It’s that simple with my MKStoreKit.

License

MKStoreKit uses zLib licensing And so all of my source code can be used royalty-free into your app. Just make sure that you don’t remove the copyright notice from the source code if you make your app open source. You don’t have to attribute me in your app, although I would be glad if you do so.

Server Side

The database required can be created from the sql file attached.

The code that you need for setting up your server is present in the ServerCode folder.

Copy all the files to some location like http://api.mycompany.com/inapp/

The URL which you should copy to "ownServer" variable in MKStoreManager.m is http://api.mycompany.com/inapp/featureCheck.php Copy this URL to ownServer parameter in MKStoreManager.m

mkstorekit's People

Contributors

bmateus avatar bobbypage avatar darktable avatar dfabulich avatar iosdeveloper avatar l4u avatar macarse avatar mugunthkumar avatar pluton8 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.