Solved

Objective-C: Cannot find protocol definition ...

  • 13 October 2022
  • 1 reply
  • 529 views

Badge +3

 I am trying to port a RevenueCat v3 project to v4 but these messages appear during compilation:

/Users/ham/Desktop/Development/Mac/Libraries/revenuecat/Build/iOS/RevenueCat.framework/Headers/RevenueCat-Swift.h
/Users/ham/Desktop/Development/Mac/Libraries/revenuecat/Build/iOS/RevenueCat.framework/Headers/RevenueCat-Swift.h:4308:63: error build: Cannot find protocol declaration for 'SKPaymentQueueDelegate'

/Users/ham/Desktop/Development/Mac/Libraries/revenuecat/Build/iOS/RevenueCat.framework/Headers/RevenueCat-Swift.h:4365:62: error build: Cannot find protocol declaration for 'SKProductsRequestDelegate'

/Users/ham/Desktop/Development/Mac/Libraries/revenuecat/Build/iOS/RevenueCat.framework/Headers/RevenueCat-Swift.h:5748:41: error build: No type or protocol named 'SKPaymentTransactionObserver'

/Users/ham/Desktop/Development/Mac/Libraries/revenuecat/Build/iOS/RevenueCat.framework/Headers/RevenueCat-Swift.h:5758:60: error build: Cannot find protocol declaration for 'SKPaymentQueueDelegate'

/Users/ham/Desktop/Development/Mac/Libraries/revenuecat/Build/iOS/RevenueCat.framework/Headers/RevenueCat-Swift.h:5777:66: error build: Cannot find protocol declaration for 'SKRequestDelegate'

I suspect that this has something to do with Swift?

icon

Best answer by MobApp 14 October 2022, 18:15

View original

1 reply

Badge +3

#include <StoreKitFramework> before the RevenueCat header fixes the problem.

Reply