We noticed some unusual behavior. This seems to happen when there is no clear error and we are unsure if this was intended or not. Consider the following code:
[[RCPurchases sharedPurchases] offeringsWithCompletionBlock:^(RCOfferings* offerings, NSError* error)
{
if (offerings.current)
{
...
}
else if (error)
{
...
}
else
{
// this branch actually gets executed!
...
}
}];
Both offerings.current and error are nil in some cases. Usually it has something to do with running on iOS simulator or when the IAPs aren’t setup properly (which can be seen in the logs), but the implication in the call is that error will never be nil. Luckily we were able to identify this issue quickly and patch our code with a workaround, but maybe the SDK team might want to revise that behavior.
We haven’t tested if other calls have the same issue or if other platform SDKs have it.