This release has some changes that should help prevent "There is no singleton instance" errors issue, PR.
- Added
isConfigured
function to be able to check if the instance of Purchases has been configured before calling any function that accesses the singleton instance. - These functions that were returning
void
, now returnPromise<void>
:
Integrations | Subscriber attributes | Configuration and other |
---|---|---|
addAttributionData |
collectDeviceIdentifiers |
invalidatePurchaserInfoCache |
setAd |
setAttributes |
presentCodeRedemptionSheet |
setAdGroup |
setDisplayName |
setAllowSharingStoreAccount |
setAdjustID |
setEmail |
setAutomaticAppleSearchAdsAttributionCollection |
setAirshipChannelID |
setPhoneNumber |
setDebugLogsEnabled |
setAppsflyerID |
setPushToken |
setFinishTransactions |
setCampaign |
setSimulatesAskToBuyInSandbox |
|
setCreative |
syncPurchases |
|
setFBAnonymousID |
||
setKeyword |
||
setMediaSource |
||
setMparticleID |
||
setOnesignalID |
-
Accessing a function that accesses the singleton instance before it has been setup will now reject with a
UninitializedPurchasesError
. -
Bump
purchases-hybrid-common
to1.11.1
Changelog here -
Bump
purchases-ios
to3.13.1
(Changelog here) -
Bump
purchases-android
to4.6.0
(Changelog here)
To view new release, visit https://github.com/RevenueCat/react-native-purchases/releases/tag/4.5.0