Been using RevenueCat for many years in a mixed Objective C/Swift project and suddenly having problems:
Purchases.shared.getCustomerInfo { (customerInfo, error) in
DispatchQueue.main.async {
if let error = error {
let alert = UIAlertController(title: nil, message: error.localizedDescription, preferredStyle: UIAlertController.Style.alert)
alert.addAction(UIAlertAction(title: "OK", style: .default, handler: nil))
self.present(alert, animated: true, completion: nil)
} else if let customerInfo = customerInfo {
myObjectiveCClass.purchaserInfo = customerInfo
Last line gives the compilation error: Cannot assign value of type 'RevenueCat.CustomerInfo' to type '__ObjC.CustomerInfo'
They are the same type. Here’s the declaration in myObjectiveCClass:
@property (retain, nonatomic) RCCustomerInfo *purchaserInfo;
and show definition on that RCCustomerInfo goes to the definition in the RC API:
@objc(RCCustomerInfo) public final class CustomerInfo: NSObject {
Clearly the same type just with a different Objective C name. What is going on, where is “__ObjC.CustomerInfo” coming from?