I have a Flutter app running that uses the RevenueCat SDK. I install the app on my iPhone and make a purchase which utilizes the devices assigned Apple ID to track purchases.Thus works.
Then, I assign a fresh unused AppStore sandbox userID in Settings/AppStore/SandboxAccount. When I run the app thru VSCode development tools, the Purchases.configure call accesses the RevenueCat cache for the device Apple ID. It does not recognize that the assignment of a Sandbox ID and running through the development tool invokes a different Apple ID and the cache is invalid.
I am trying to use the fact that there is no RevenueCat customer entitlements for my app to recognize a new user, but the return of old invalid cached customer info for a different customer is making tis impossible.
I tried using invalidateCache with this code, but it does not ignore the cache…….
static Future<void> configure( ) async {
if (Platform.isAndroid) {
configuration = PurchasesConfiguration("public_google_sdk_key");
}
else if (Platform.isIOS) {
configuration = PurchasesConfiguration("appl_JPPnWMZhmzvhIDymZYkXYvWENom");
}
await Purchases.configure(configuration);
Purchases.invalidateCustomerInfoCache();
offerings = await Purchases.getOfferings();
await PurchasesAPI.getCustomerInfo(); //get cached customer
}
Any ideas on how to avoid using the cache would be appreciated.