Having trouble with our SDKs? This guide covers common issues and solutions. Go through each topic and see if it matches your issue. If you went through this guide and you're still having problems, reach out to us in any of the following channels:
- RevenueCat Developer Community for general inquiries about the SDK and best practices
- StackOverflow for help on specific questions about your code
All SDKs
Make sure that you're using the latest version of the SDK for your platform, and have installed the SDK according to our Installation guides.
We update our SDKs very often. If you run into an issue with our SDK, it might already have been fixed in an update.
You can find the latest version of our SDKs here:
Issues when compiling or archiving
iOS
- Clean derived data: in Xcode, go to Product -> Clean Build Data.
- Make sure Swift support is enabled in the project: check that Swift Language Version is defined as at least "Swift 5" in Build Settings for your target.
- Make sure that the deployment target is set correctly: it should be set to
9.0
or newer for iOS or tvOS,10.12
or newer for macOS and6.2
or newer for watchOS. - Check the Swift version: Check that the value for
SWIFT_VERSION
isn't overridden by thePodfile
, if you have one.. - Enable Swift support: If you're getting errors when compiling Swift files after this, try adding a single, empty Swift file to the project.
If you're using SPM:
- If you're using the
RevenueCat
Package from a framework and get(fatal) module 'RevenueCat' not found
, disable Clang's Module Verifier (ENABLE_MODULE_VERIFIER
) from build settings. That does not work correctly with SPM as of Xcode 14.3 and 15.0 (this has been reported to Apple as FeedbackFB13048691
):
If you're using CocoaPods:
- Make sure you're using the latest version of CocoaPods. You can see your version by running
pod --version
, and find the latest version here. - Re-install pods: run
pod deintegrate
and thenpod install
, then try running / archiving the project again. - Make sure that the deployment target is set correctly: it should be set to
11.0
or newer for iOS or tvOS,10.13
or newer for macOS and6.2
or newer for watchOS. The requirements might be higher if you're using other frameworks, such as React-Native. You should check this value both in thePodfile
, and by going into the Project settings, then select the target, and look for the value in the general tab: - Check the Swift version: Check that the value for
SWIFT_VERSION
isn't overridden by thePodfile
. - Enable Swift support: If you're getting errors when compiling Swift files after this, try adding a single, empty Swift file to the project.
- If that still doesn't work, then make sure that Swift is added to your Library Search Paths. Go to Build Settings, then look for Library Search Paths, and add
$(SDKROOT)/usr/lib/swift
as the first item on the list if it's not present.
If you're using Carthage:
- Make sure you're using the latest version of Carthage.
- If you're using XCFrameworks with Carthage, make sure you follow our installation guide.
Flutter
- Upgrade to the latest version of purchases-flutter
- Upgrade to the latest version of Flutter
- Run
pub cache clean
- Follow the troubleshooting steps for iOS.
- Check that Flutter doesn't override the minimum deployment version on iOS
React-Native
- Upgrade to the latest version of react-native-purchases
- Upgrade to the latest version of React-Native.
- If you're setting
BUILD_LIBRARY_FOR_DISTRIBUTION
in your Podfile, ensure RevenueCat's targets are excluded.
- Code
post_install do |installer|
react_native_post_install(installer)
installer.pods_project.targets.each do |target|
unless ['RevenueCat', 'PurchasesHybridCommon', 'RNPurchases'].include?(target.name)
target.build_configurations.each do |config|
config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
end
end
- Follow the troubleshooting steps for iOS.
Common Issues
- Products are empty
- Active entitlements are empty with an active subscription
- I get a "there is a problem with the App store" and nothing else.
- My app crashes with...
- "Purchases / PurchasesHybridCommon required a higher minimum deployment target": see troubleshooting steps for iOS.
- "ld: symbol(s) not found for architecture x86_64": see troubleshooting steps for iOS.
- "declaration of 'RCPurchases' must be imported from module 'Purchases' before it is required": see troubleshooting steps for iOS.
- "Module 'Purchases' not found": see troubleshooting steps for iOS.
- "Couldn't IRGen expression": see How to fix "couldn't IRGen expression"