RevenueCat

Build With RevenueCat

Build a customized mobile subscription business with RevenueCat. We do the heavy lifting of normalizing subscribers from any source and maintain a single source of truth for subscription status, so you can get back to building your app.

RevenueCat is a powerful, secure, reliable, and free to use in-app purchase server with global support. All you need to get started is an API key.

Ask A Question

Questions

3
ANSWERED

[Android] How to accurately know the current active subscriptions.

Hello. I am having a hard time figuring out what are the active subscriptions owned by the user after he/she has cancelled the subscription from Play Store. On app start, I get the active subscriptions in the callback to `Purchases.sharedInstance.getPurchseInfo(callback)` using `purchaseInfo.activeSubscriptions` Here are two scenarios where I am unsure if the received active subscriptions data is correct or not. Scenario 1: 1. I subscribe to a subscription 'X' which renews every month. (a test subscription renews every 5 minutes) 2. I immediately cancel the subscription from Play Store. 3. After 5 minutes the subscription expires. And is not visible on Play Store subscription tab anymore. But I still keep getting the cancelled subscription as an active subscription on my app start for a few minutes even after it has expired in the play store. Expected: The subscription shouldn't be active on the app once it is expired on the Play Store. Scenario 2: 1. I subscribe to a subscription 'X' which renews every month. (a test subscription renews every 5 minutes) 2. I immediately cancel the subscription from Play Store and do a fresh install of my app. 4. It's still not been 5 minutes and the subscription on Play Store has still not expired. But I do not see this active subscription on the app. Expected: The subscription should be active on the app since it has not expired yet on the Play Store. Android RevenueCat SDK version: 2.1.2

Posted by Jayesh Solanki 3 days ago

2

(React Native) Cannot connect to iTunes Store

Using physical device with a almost fresh Sandbox account with "react-native-purchases" = 2.2.1 Stacktrace and error: https://gist.github.com/ruckus/bd46b2e70ac0a318ab7015f17fda75af Full Failed : error 0:61 [61] 2019-06-07 14:58:51.856446-0700 Stellashare[13684:2648399] [Purchases] - DEBUG: PaymentQueue updatedTransaction: monthly3 A55A566A-83D3-48FC-93D9-B26C9E7B00E2 (Error Domain=SKErrorDomain Code=0 "Cannot connect to iTunes Store" UserInfo={NSLocalizedDescription=Cannot connect to iTunes Store}) (null) - 2 2019-06-07 14:58:51.856904-0700 Stellashare[13684:2648399] [Purchases] - ERROR: There was a problem with the App Store. 2019-06-07 14:58:51.875685-0700 Stellashare[13684:2648399] [Purchases] - DEBUG: Finishing monthly3 A55A566A-83D3-48FC-93D9-B26C9E7B00E2 ((null)) 2019-06-07 14:58:51.907323-0700 Stellashare[13684:2648399] [Purchases] - DEBUG: PaymentQueue removedTransaction: monthly3 A55A566A-83D3-48FC-93D9-B26C9E7B00E2 ((null) Error Domain=SKErrorDomain Code=0 "Cannot connect to iTunes Store" UserInfo={NSLocalizedDescription=Cannot connect to iTunes Store}) { NSLocalizedDescription = "Cannot connect to iTunes Store"; } - 2 2019-06-07 14:58:51.922 [info][tid:com.facebook.react.JavaScript] { [Error: There was a problem with the App Store.] framesToPop: 1, code: '2', nativeStackIOS: [ '0 Stellashare 0x0000000104fcef74 RCTJSErrorFromCodeMessageAndNSError + 156', '1 Stellashare 0x0000000104f66a50 __41-[RCTModuleMethod processMethodSignature]_block_invoke_2.129 + 176', '2 Stellashare 0x00000001051fa994 -[RNPurchases rejectPromiseWithBlock:error:] + 272', '3 Stellashare 0x00000001051f8b44 __55-[RNPurchases makePurchase:oldSku:type:resolve:reject:]_block_invoke + 200', '4 Purchases 0x0000000105e6f698 __50-[RCPurchases storeKitWrapper:updatedTransaction:]_block_invoke + 168', '5 Purchases 0x0000000105e6fb30 -[RCPurchases dispatch:] + 60', '6 Purchases 0x0000000105e6f4b0 -[RCPurchases storeKitWrapper:updatedTransaction:] + 396', '7 Purchases 0x0000000105e71644 -[RCStoreKitWrapper paymentQueue:updatedTransactions:] + 516', '8 libdispatch.dylib 0x0000000105adf6f0 _dispatch_call_block_and_release + 24', '9 libdispatch.dylib 0x0000000105ae0c74 _dispatch_client_callout + 16', '10 libdispatch.dylib 0x0000000105aee6fc _dispatch_main_queue_callback_4CF + 1360', '11 CoreFoundation 0x0000000229f8ac1c <redacted> + 12', '12 CoreFoundation 0x0000000229f85b54 <redacted> + 1924', '13 CoreFoundation 0x0000000229f850b0 CFRunLoopRunSpecific + 436', '14 GraphicsServices 0x000000022c18579c GSEventRunModal + 104', '15 UIKitCore 0x00000002568ff978 UIApplicationMain + 212', '16 Stellashare 0x0000000104eab594 main + 124', '17 libdyld.dylib 0x0000000229a4a8e0 <redacted> + 4' ], userInfo: { NSUnderlyingError: { code: '0', nativeStackIOS: [ '0 Stellashare 0x0000000104fcef74 RCTJSErrorFromCodeMessageAndNSError + 156', '1 Stellashare 0x0000000104fcf298 RCTJSErrorFromCodeMessageAndNSError + 960', '2 Stellashare 0x0000000104f66a50 __41-[RCTModuleMethod processMethodSignature]_block_invoke_2.129 + 176', '3 Stellashare 0x00000001051fa994 -[RNPurchases rejectPromiseWithBlock:error:] + 272', '4 Stellashare 0x00000001051f8b44 __55-[RNPurchases makePurchase:oldSku:type:resolve:reject:]_block_invoke + 200', '5 Purchases 0x0000000105e6f698 __50-[RCPurchases storeKitWrapper:updatedTransaction:]_block_invoke + 168', '6 Purchases 0x0000000105e6fb30 -[RCPurchases dispatch:] + 60', '7 Purchases 0x0000000105e6f4b0 -[RCPurchases storeKitWrapper:updatedTransaction:] + 396', '8 Purchases 0x0000000105e71644 -[RCStoreKitWrapper paymentQueue:updatedTransactions:] + 516', '9 libdispatch.dylib 0x0000000105adf6f0 _dispatch_call_block_and_release + 24', '10 libdispatch.dylib 0x0000000105ae0c74 _dispatch_client_callout + 16', '11 libdispatch.dylib 0x0000000105aee6fc _dispatch_main_queue_callback_4CF + 1360', '12 CoreFoundation 0x0000000229f8ac1c <redacted> + 12', '13 CoreFoundation 0x0000000229f85b54 <redacted> + 1924', '14 CoreFoundation 0x0000000229f850b0 CFRunLoopRunSpecific + 436', '15 GraphicsServices 0x000000022c18579c GSEventRunModal + 104', '16 UIKitCore 0x00000002568ff978 UIApplicationMain + 212', '17 Stellashare 0x0000000104eab594 main + 124', '18 libdyld.dylib 0x0000000229a4a8e0 <redacted> + 4' ], userInfo: { NSLocalizedDescription: 'Cannot connect to iTunes Store' }, message: 'underlying error', domain: 'SKErrorDomain' }, NSLocalizedDescription: 'There was a problem with the App Store.', readable_error_code: 'STORE_PROBLEM' }, domain: 'RCPurchasesErrorDomain', userCancelled: false, line: 2270, column: 26, sourceURL: 'http://192.168.7.235:8081/index.bundle?platform=ios&dev=true&minify=false' } 2019-06-07 14:58:51.922180-0700 Stellashare[13684:2648508] { [Error: There was a problem with the App Store.] framesToPop: 1, code: '2', nativeStackIOS: [ '0 Stellashare 0x0000000104fcef74 RCTJSErrorFromCodeMessageAndNSError + 156', '1 Stellashare 0x0000000104f66a50 __41-[RCTModuleMethod processMethodSignature]_block_invoke_2.129 + 176', '2 Stellashare 0x00000001051fa994 -[RNPurchases rejectPromiseWithBlock:error:] + 272', '3 Stellashare 0x00000001051f8b44 __55-[RNPurchases makePurchase:oldSku:type:resolve:reject:]_block_invoke + 200', '4 Purchases 0x0000000105e6f698 __50-[RCPurchases storeKitWrapper:updatedTransaction:]_block_invoke + 168', '5 Purchases 0x0000000105e6fb30 -[RCPurchases dispatch:] + 60', '6 Purchases 0x0000000105e6f4b0 -[RCPurchases storeKitWrapper:updatedTransaction:] + 396', '7 Purchases 0x0000000105e71644 -[RCStoreKitWrapper paymentQueue:updatedTransactions:] + 516', '8 libdispatch.dylib 0x0000000105adf6f0 _dispatch_call_block_and_release + 24', '9 libdispatch.dylib 0x0000000105ae0c74 _dispatch_client_callout + 16', '10 libdispatch.dylib 0x0000000105aee6fc _dispatch_main_queue_callback_4CF + 1360', '11 CoreFoundation 0x0000000229f8ac1c <redacted> + 12', '12 CoreFoundation 0x0000000229f85b54 <redacted> + 1924', '13 CoreFoundation 0x0000000229f850b0 CFRunLoopRunSpecific + 436', '14 GraphicsServices 0x000000022c18579c GSEventRunModal + 104', '15 UIKitCore 0x00000002568ff978 UIApplicationMain + 212', '16 Stellashare 0x0000000104eab594 main + 124', '17 libdyld.dylib 0x0000000229a4a8e0 <redacted> + 4' ], userInfo: { NSUnderlyingError: { code: '0', nativeStackIOS: [ '0 Stellashare 0x0000000104fcef74 RCTJSErrorFromCodeMessageAndNSError + 156', '1 Stellashare 0x0000000104fcf298 RCTJSErrorFromCodeMessageAndNSError + 960', '2 Stellashare 0x0000000104f66a50 __41-[RCTModuleMethod processMethodSignature]_block_invoke_2.129 + 176', '3 Stellashare 0x00000001051fa994 -[RNPurchases rejectPromiseWithBlock:error:] + 272', '4 Stellashare 0x00000001051f8b44 __55-[RNPurchases makePurchase:oldSku:type:resolve:reject:]_block_invoke + 200', '5 Purchases 0x0000000105e6f698 __50-[RCPurchases storeKitWrapper:updatedTransaction:]_block_invoke + 168', '6 Purchases 0x0000000105e6fb30 -[RCPurchases dispatch:] + 60', '7 Purchases 0x0000000105e6f4b0 -[RCPurchases storeKitWrapper:updatedTransaction:] + 396', '8 Purchases 0x0000000105e71644 -[RCStoreKitWrapper paymentQueue:updatedTransactions:] + 516', '9 libdispatch.dylib 0x0000000105adf6f0 _dispatch_call_block_and_release + 24', '10 libdispatch.dylib 0x0000000105ae0c74 _dispatch_client_callout + 16', '11 libdispatch.dylib 0x0000000105aee6fc _dispatch_main_queue_callback_4CF + 1360', '12 CoreFoundation 0x0000000229f8ac1c <redacted> + 12', '13 CoreFoundation 0x0000000229f85b54 <redacted> + 1924', '14 CoreFoundation 0x0000000229f850b0 CFRunLoopRunSpecific + 436', '15 GraphicsServices 0x000000022c18579c GSEventRunModal + 104', '16 UIKitCore 0x00000002568ff978 UIApplicationMain + 212', '17 Stellashare 0x0000000104eab594 main + 124', '18 libdyld.dylib 0x0000000229a4a8e0 <redacted> + 4' ], userInfo: { NSLocalizedDescription: 'Cannot connect to iTunes Store' }, message: 'underlying error', domain: 'SKErrorDomain' }, NSLocalizedDescription: 'There was a problem with the App Store.', readable_error_code: 'STORE_PROBLEM' }, domain: 'RCPurchasesErrorDomain', userCancelled: false, line: 2270, column: 26, sourceURL: 'http://192.168.7.235:8081/index.bundle?platform=ios&dev=true&minify=false' } 2019-06-07 14:58:51.923 [warn][tid:com.facebook.react.JavaScript] 'alerting, !error.userCancelled: ', 'There was a problem with the App Store.' 2019-06-07 14:58:51.922788-0700 Stellashare[13684:2648508] 'alerting, !error.userCancelled: ', 'There was a problem with the App Store.'

Posted by cody caughlan 17 days ago