Skip to main content

Could not build Objective-C module 'PurchasesHybridCommon'


Forum|alt.badge.img+8

Hi,

The following issue (https://github.com/RevenueCat/react-native-purchases/issues/200) was closed but I am still experiencing the error when I do a release build of a new scheme (i.e. staging, prod etc) of my React Native app. This was fine until now as we had a workaround of removing the `build` and `pods` folders and reinstalling the pods i.e. `rm -rf ios/build && rm -rf ios/pods && yarn && cd ios && pod install` every time we switched schemes and wanted to do a new release build.However, in the last few days, we have added an Apple Watch Extension to our RN app which is built using SwiftUI. Anytime that we try to build the Watch App with preview mode enabled (https://developer.apple.com/documentation/swiftui/previews-in-xcode) it fails with the following errors.

Declaration of 'RCPurchases' must be imported from module 'Purchases' before it is required

 

Could not build Objective-C module 'PurchasesHybridCommon'

 

 

Is there any workaround to this? It is not feasible for us to rebuild the native watch app every time we make changes to the SwiftUI code.From reading through https://github.com/RevenueCat/react-native-purchases/issues/200 it seems that no fix was ever replaced. Any help would be greatly appreciated, as we want to release our Apple Watch app to our users in the next couple of weeks.

 

Thanks,
Walter

2 replies

cody
RevenueCat Staff
Forum|alt.badge.img+8
  • RevenueCat Staff
  • 497 replies
  • March 25, 2022

Hey @Walter Holohan!

Since it looks like this is being handled in GitHub here, we’ll keep the discussion there until a solution has been found.


Forum|alt.badge.img+8
  • Author
  • Dedicated Member
  • 19 replies
  • May 14, 2022

@cody we managed to solve this issue with help from your engineers. Solution can found in GitHub here


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings