Comments (6)
The load function populates self.list with your in app purchases defined in
iTunes connect for your app. You'll need to get this setup or have fake
data passed into your callback
On Jan 8, 2014 2:30 PM, "ahettlin" [email protected] wrote:
I assume this happens possibly because my app is still very young and I
haven't signed my application with my developer license, but it would be
nice if this didn't crash my app because of an unhandled exception. Here's
the logs with relevant stack trace:2014-01-08 20:58:25.066 XXX[52022:70b] InAppPurchase[objc]: About to do IAP
2014-01-08 20:58:25.075 XXX[52022:70b] *** Terminating app due to uncaught
exception 'NSInvalidArgumentException', reason: 'Invalid product
identifier: (null)'
*** First throw call stack:
(
0 CoreFoundation 0x000f05e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x01e088b6 objc_exception_throw + 44
2 CoreFoundation 0x000f03bb +[NSException raise:format:] + 139
3 StoreKit 0x019ae74f -[SKPaymentQueue addPayment:] + 659
4 XXX 0x00033098 -[InAppPurchase purchase:] + 440—
Reply to this email directly or view it on GitHubhttps://github.com//issues/22
.
from cordova-plugin-purchase.
The load
needs to complete and asynchronously return a valid set of products or this error occurs. This means that even if you call load
you can't just go calling purchase
immediately after or the same error occurs.
You can test this on a device by setting it to Airplane Mode then trying to purchase a product. Currently trying to work out the best way around this but probably going to go for setting a ready
flag in my code when the products are returned and blocking access to buying until then.
from cordova-plugin-purchase.
@jameshoward the ready flag is the way to go.
In my apps, I hide the "purchase buttons" by default unless the ready flag is set. Additionally, I use an event / notification system to unhide those buttons (dynamically) when the "ready" callback is called.
You can also do the opposite, alert the user "AppStore cannot be contacted, try again later" when he tries to purchase before IAP got ready.
from cordova-plugin-purchase.
@jameshoward For what its worth, I currently use a hybrid of what @j3k0 is talking about. I hide the purchase & restore buttons until everything is loaded and ready and I show a loading spinner indicating activity. I also have that set to timeout after a while and show an error message so the user doesn't think the app has hung.
from cordova-plugin-purchase.
I'm having a similar problem but only with live app. It works fine in test builds.
http://stackoverflow.com/q/23290142/235273
Not exactly same. But the exception is kind of similar.
2 CoreFoundation 0x2f0f6f10 +[NSException raise:format:] + 100
3 StoreKit 0x318a3f9e -[SKPaymentQueue addPayment:] + 598
from cordova-plugin-purchase.
Issue solved: product hasn't been submitted to Apple.. see stackoverflow.
from cordova-plugin-purchase.
Related Issues (20)
- Detecting invalid products does not work in v13 HOT 5
- iOS Unable to complete a consumable product purchase HOT 3
- Not found error for PAID_SUBSCRIPTION, CONSUMABLE works fine (Google Play) HOT 4
- Micro Example uses CdvPurchase.CONSUMABLE instead of CdvPurchase.ProductType.CONSUMABLE
- How to detect active subscription when visiting subscription page HOT 3
- iOS error 6777001, Setup failed, during store initialization HOT 1
- Incomplete Content-Security-Policy example
- Repurchase an expired subscription IOS HOT 1
- getOffer returns nothing on iOS HOT 3
- Android register product is failed, store.product gives blank array[], But Work fine in Ios HOT 4
- Initialize function never resolves on Android in case of errors HOT 2
- Create CdvPurchase... printing twice HOT 2
- Validate receipt on app startup on V13 HOT 4
- Documentation issue/question HOT 2
- [Android] Issue BILLING_UNAVAILABLE code 6777003 when try to make purchase HOT 1
- Check if user has an active subscription HOT 5
- iOS purchase popup trigger multiple times and unable to get transaction details HOT 18
- iOS won't let me subscribe again, but works on Android HOT 8
- store.restorePurchases() not work on V13 [restoreFailed: 6777010] HOT 6
- In-app purchase not working after publishing iOS app to App Store HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-plugin-purchase.