Firstly, thanks for your work on this project! 🙂
After upgrading to Xcode 12.5 and iOS 14 simulators, I am no longer able to test in-app purchases on the Xcode simulators using the real network – you now need to create a StoreKit configuration file which then allows the simulator to perform in-app purchases locally, however, in this scenario, appStoreReceiptURL (called here) is nil, which causes a complete app crash on this line because dictionaryWithDictionary cannot accept nil values.
My proposed fix is to return null in that case, which dictionaryWithDictionarydoes accept and which therefore avoids a crash on the simulator.
Hi! 👋
Firstly, thanks for your work on this project! 🙂
After upgrading to Xcode 12.5 and iOS 14 simulators, I am no longer able to test in-app purchases on the Xcode simulators using the real network – you now need to create a StoreKit configuration file which then allows the simulator to perform in-app purchases locally, however, in this scenario,
appStoreReceiptURL
(called here) isnil
, which causes a complete app crash on this line becausedictionaryWithDictionary
cannot acceptnil
values.My proposed fix is to return
null
in that case, whichdictionaryWithDictionary
does accept and which therefore avoids a crash on the simulator.Here is the diff that solved my problem:
If you are happy with this change I can make a PR.