Skip to main content
Answer

Objective-C: Cannot find protocol definition ...

  • October 13, 2022
  • 1 reply
  • 795 views

Forum|alt.badge.img+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?

Best answer by MobApp

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

This post has been closed for comments

1 reply

Forum|alt.badge.img+3
  • Author
  • Helper
  • Answer
  • October 14, 2022

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