On iOS the getProductByStoreIdentifier can return null in case the product is not found. The rest of the code assumes it is not null though, which can result in an NPE. This PR fixes this by simply ignoring the transaction when the product is not known.
A simple way to reproduce it would be:
Create a new product (in itunesconnect and your config)
Buy the product on your apple device
Remove the product (in itunesconnect and your config)
Run the app again and see that it crashes because it cant find the product anymore
This is not a very likely real world production use-case, but a very common use-case when developing/testing. Therefor I think that simply ignoring the transaction (while logging a message) should be enough.
On iOS the
getProductByStoreIdentifier
can return null in case the product is not found. The rest of the code assumes it is not null though, which can result in an NPE. This PR fixes this by simply ignoring the transaction when the product is not known.A simple way to reproduce it would be:
This is not a very likely real world production use-case, but a very common use-case when developing/testing. Therefor I think that simply ignoring the transaction (while logging a message) should be enough.