Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

If offline during startup products are never retrieved #250

Open
doniekelly opened this issue Nov 7, 2015 · 1 comment
Open

If offline during startup products are never retrieved #250

doniekelly opened this issue Nov 7, 2015 · 1 comment

Comments

@doniekelly
Copy link

To simulate a network offline situtation I have device in Airplane mode during startup. This causes the productsRequest to fail. It never attempts to request the products again even after network is restored.

@marcusgbrown
Copy link

See MkStoreKit.h file for answer. You are responsible to check if there is internet available when starting the app and call startProductRequest when internet is available

/*!

  • @abstract Initializes MKStoreKit singleton by making the product request using StoreKit's SKProductRequest
  • @discussion
  • This method should be called in your application:didFinishLaunchingWithOptions: method
  • If this method fails, MKStoreKit will not work
  • Most common reason for this method to fail is Internet connection being offline
  • It's your responsibility to call startProductRequest if the Internet connection comes online
  • and the previous call to startProductRequest failed (availableProducts.count == 0).
  • @Seealso
  • -availableProducts
    */
  • (void)startProductRequest;

/*!

  • @abstract Initializes MKStoreKit singleton by making the product request using StoreKit's SKProductRequest
  • @discussion
  • This method is normally called after fetching a list of products from your server.
  • If all your products are known before hand,
  • fill them in MKStoreKitConfigs.plist and use -startProductRequest
  • If this method fails, MKStoreKit will not work
  • Most common reason for this method to fail is Internet connection being offline
  • It's your responsibility to call startProductRequest if the Internet connection comes online
  • and the previous call to startProductRequest failed (availableProducts.count == 0).
  • @Seealso
  • -availableProducts
  • -startProductRequest
    */
  • (void)startProductRequestWithProductIdentifiers:(NSArray*) items;

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants