Code Monkey home page Code Monkey logo

anystonestorekit's People

Contributors

anystone avatar johnmullaney avatar meachware avatar sckor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

anystonestorekit's Issues

How to find out that a restore was successful?

When restoring purchases the delegate method astStoreControllerRestoreComplete is called when the app is finished restoring the transactions but before it's had a chance to verify that there's a valid subscription in there. If there is a valid subscription in there I can wait for the astStoreControllerProductIdentifierPurchased to be called but if there isn't I have no way of knowing when to move on and assume there's no subscriptions to restore.

In short is there a way to know both that all transactions have been restored and that their status has been determined?

What happens when the subscription date is here?

So, first, let me say that this library is SO much easier to implement than "the other one". Love how easy it is to understand what's going on! Thank you SO MUCH for putting this out there.

I'm implementing the ASTStoreController without the related ViewController since I already have the view written.

My question is regarding what happens when the subscription date approaches and then is here. Say the user opens my app and their 1-month term subscription has JUST passed and it has renewed with Apple. If I understand the documentation correctly for subscriptions, each subscription term generates a new receipt, thus invalidating the original receipt (and obviously, the expiration date for the original receipt will be in the past so expiryDateForProduct: will return a date in the past.)

How do I go about validating the new receipt data to make sure the new monthly term is valid? Any help would be appreciated.

Thanks again for the great library, and I hope to hear from you soon (trying to get this thing submitted and approved before Christmas, but that might not happen ಠ_ಠ ).

Clearing Keychain and Other Caches

While testing on the device a lot receipts and obsolete test accounts start to accumulate. Is there a way to clear those caches so that you can restart testing from a pristine state?

setType error in ASTStoreFamilyData and ASTStoreProductData

the copyWithZone:(NSZone *)zone function is returning a compiler error, "Incompatible type for argument 1 of 'setType:' on both ASTStoreFamilyData.m and ASTStoreProductData.m from a 0.5.1 download from this morning. I'm new to Objective-C, so I'm still trying to debug myself, and will update this issue if I can solve it.

Issue with ASIAuthenticationDialog.m orientationChanged: method

Xcode 4.1 generates a warning on line 132. This line in the orientationChanged: method is currently:

UIDeviceOrientation o = [[UIApplication sharedApplication] statusBarOrientation];

I believe it actually be:

UIDeviceOrientation o = [[UIDevice currentDevice] orientation];

This is because [[UIApplication sharedApplication] statusBarOrientation] returns an UIInterfaceOrientation enum, which has very different values than a UIDeviceOrientation enum.

Warnings

ASTStoreController/Classes/ASTStoreProductData.m:347:5: Multiple methods named 'setType:' found
ASTStoreController/Classes/ASTStoreFamilyData.m:522:5: Multiple methods named 'setType:' found

Failed transaction wit null product id

I'm receiving SIGABRT at start of application. It's happend after I have purchased an autorenewable subscription and something goes wrong...

2012-03-26 12:32:51.273 DPS[1768:707] +[ASTStoreProductData storeProductDataFromProductIdentifier:]:122 Could not find productData:/var/mobile/Applications/06B09791-C761-42C5-AE4F-43A96A9A8D42/Library/ASTStoreController/productData/ASTStoreProductData.archive
2012-03-26 12:32:51.277 DPS[1768:707] *** Assertion failure in -[ASTStoreController completeTransaction:](), /Users/maximkeegan/Dropbox/Sources_Burda/DPS/DPS/Classes/ASTStoreController/Classes/ASTStoreController.m:972
2012-03-26 12:32:51.281 DPS[1768:707] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Failed to obtain product data for:(null)'

Deleting app from device, logging out from appstore is not help to fix this error... What i'm doing wrong?

Successful restore notification happening before verification completes

The delegate method for a successful restore is invoked prior to verification completing. As quick and dirty hack I changed the paymentQueueRestoreCompletedTransactionsFinished: method so that it it polls verifyingCount and waits until verifying count reaches zero before telling the delegate that the restore was completed (the modified code is listed below).

If someone has a better idea let me know

  • (void)paymentQueueRestoreCompletedTransactionsFinished:(SKPaymentQueue *)queue
    {
    DLog(@"restore complete");
    self.restoringPurchases = NO;
    if( self.purchaseState == ASTStoreControllerPurchaseStateProcessingPayment )
    {
    // Could be verifying in the background - only update to none state if
    // last known state was processing. Since restoringPurchase flag has been
    // disabled, the finalize transation will deal with resetting state to none.
    self.purchaseState = ASTStoreControllerPurchaseStateNone;
    }

    static void (^restorePollBlock)() = nil;

    if (restorePollBlock == nil) {
    __block id b_self = self;
    __block void (^b_pollBlock)();
    restorePollBlock = [^];
    b_pollBlock = restorePollBlock;
    }

    restorePollBlock();
    }

Add to new project

Hi - AWESOME project. I revised the sample and its working great with my IAP's. Do you have instructions as to how to "easily" integrate it into an existing project?

Thanks again!

Update: so I tried to duplicate the sample and dropped the ASTStoreController folder w/project into my project; added the required frameworks & dependencies. I can build for the device but for the simulator it bails out after 28 errors. Let me know how I can help, I very much want to use this in my current project and have already revised your sample app to suit my needs (support all orientations for universal app) and I've made test purchases on several of my products.

Update 2: perhaps I didn't notice the big WIKI link above, sorry. I will triple check my installation and update this issue

Oh and thanks again!
Greg

Seems broken

There's a curly bracket too much (that makes the app not compile) on line 153 in ASTSStoreDetailViewController. Easy to fix, but very suspicious that no one has done it yet.

After I change it and go into subscriptions, to "buy" a subscription, I press a button and the app crashes.

Is it just the demo app that is out of order or is it the library as well?

Has anyone tried it with a subscription-based app, like a newsstand app?

Restore Completed Called Before Verification Completes

The restore completion callbacks are called prior to verification being completed. This is an issue because the quantities for items are only updated after verification completes.

For example, I have an app where the store has a tableview that contains the items a user has purchased. The store view controller is set as the delegate and listens for the restore complete callback. When it receives it checks to see which items are marked as purchased and updates the list. The problem is that when the restore callback is invoked the items haven't been updated yet and they show up as not purchased since they're still waiting for verification to complete.

How to compile?

I've been following these instructions:

http://www.anystonetech.com/blog/2011/07/07/in-app-store-with-aststorekit-tutorial-part-1

The Xcode4 build fails with this red error:

ld: duplicate symbol _main in /Users/myname/Library/Developer/Xcode/DerivedData/SharedBuilds/Intermediates/FruitEater.build/Debug-iphonesimulator/FruitEater.build/Objects-normal/i386/main-75D0DAFD9FD33F3D.o and /Users/myname/Library/Developer/Xcode/DerivedData/SharedBuilds/Intermediates/FruitEater.build/Debug-iphonesimulator/FruitEater.build/Objects-normal/i386/main-9B85B978E6CC0A62.o for architecture i386

Xcode also reports these warnings:

no previous prototype for ‘ILSimSKCurrentStorefront’
no previous prototype for ‘ILSimSKAllTierPricesByStorefront’
no previous prototype for ‘ILSimSKLocaleForCurrentStorefront’
no previous prototype for ‘CreateGradientImage’
no previous prototype for ‘MyCreateBitmapContext’

How shall we proceed?

Thanks in advance, and sorry to be a pest.

Successful purchase notification happening before verification completes

The delegate methods for successful restores and purchases are invoked prior to verification completing. If verifications fail this leads to scenarios where ASTStoreController informs its delegate that an item has been successfully purchased but then the item results as not having been purchased when you query it.

As quick and dirty hack I changed the paymentQueueRestoreCompletedTransactionsFinished: method so that it it polls verifyingCount and waits until verifying count reaches zero before telling the delegate that the restore was completed (the modified code is listed below).

I haven't taken a look at the purchasing yet but if anyone has suggestions for a better solution to the issue please let me know.

  • (void)paymentQueueRestoreCompletedTransactionsFinished:(SKPaymentQueue *)queue
    {
    DLog(@"restore complete");
    self.restoringPurchases = NO;
    if( self.purchaseState == ASTStoreControllerPurchaseStateProcessingPayment )
    {
    // Could be verifying in the background - only update to none state if
    // last known state was processing. Since restoringPurchase flag has been
    // disabled, the finalize transation will deal with resetting state to none.
    self.purchaseState = ASTStoreControllerPurchaseStateNone;
    }

    static void (^restorePollBlock)() = nil;

    if (restorePollBlock == nil) {
    __block id b_self = self;
    __block void (^b_pollBlock)();
    restorePollBlock = [^];
    b_pollBlock = restorePollBlock;
    }

    restorePollBlock();
    }

HUD stays on screen

When you purchase a "free" item, the HUD stays on-screen

StoreKit example item 99 berries - SK

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.