Wow, that's a weird problem. I added storekit stuff and suddenly the app tries to connect to iTunes store, which mean the user is being asked for credentials. But why? I put in some debug output et voilà the onTransaction event really gets fired - namely about twenty times in a row. Right now I can't track down where this behaviour is coming from. I'm still searching for the reason...
Has anybody already noticed such behaviour and maybe knows how to fix it?
Thanks a lot in advance
Sebastian
Comments
...During the development process the app requested several purchases from the store which in the end failed - because of bugs, wrong setup etc. - so my fault. So over time I got a lot of transaction with this state. Problem: I didn't know that the app had to finish all transactions, so failed transactions too (StoreKit). Then when the app freshly started as soon as StoreKit was included via require all! not yet finished transactions were fired against the store again immediately. Before this could happen, the dialog ^^ asking for iTunes credentials popped up.
So in the end I just had to make sure, that all transactions got finished. Afterwards everything was fine.
I don't know whether this behaviour is trigged by iOS in some way or because of the StoreKit plugin implementation. But it's a pretty nasty behaviour and hard to find out. Hopefully this short description helps others when having similar problems.
Likes: talis
But need to accept that it is really a weird behavior of IOS or storekit anyway relieved that it is being solved.