react-native-purchases icon indicating copy to clipboard operation
react-native-purchases copied to clipboard

No visible @interface for 'UIView' declares the selector 'reactSetFrame:'

Open zgordon02 opened this issue 5 months ago • 10 comments

Describe the bug A clear and concise description of what the bug is. The more detail you can provide the faster our team will be able to triage and resolve the issue. Do not remove any of the steps from the template below. If a step is not applicable to your issue, please leave that step empty.

  1. Environment
    1. Platform: iOS
    2. SDK version: 8.11.8
    3. OS version: iOS 18.1 MacOS 15.5 (Apple Silicon)
    4. Xcode/Android Studio version: Xcode 16.1
    5. React Native version: 0.74.3
    6. SDK installation (CocoaPods + version or manual): npm i, autolink
    7. How widespread is the issue. Percentage of devices affected. Compile error
  2. Debug logs that reproduce the issue
  3. Steps to reproduce, with a description of expected vs. actual behavior Attempt to build, get this compilation error in PaywallViewWrapper.m
  4. Other information (e.g. stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc.)Image

Additional context Add any other context about the problem here.

Changing the import from #import "UIView+React.h" to #import <React/UIView+React.h> seems to solve the compilation issue (thanks ChatGPT)

zgordon02 avatar Jun 27 '25 20:06 zgordon02

👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!

RCGitBot avatar Jun 27 '25 20:06 RCGitBot

Additional note, I am trying to build both react-native-purchases AND react-native-purchases-ui

zgordon02 avatar Jun 27 '25 20:06 zgordon02

Hi @zgordon02 , thank you for reporting this! We will look into what you are seeing here. In the meantime, can you please share your paywall implementation so that we can troubleshoot more accurately? Thank you!

mawr92 avatar Jun 30 '25 21:06 mawr92

Hi @zgordon02 , thank you for reporting this! We will look into what you are seeing here. In the meantime, can you please share your paywall implementation so that we can troubleshoot more accurately? Thank you!

I don't understand why this is relevant, the error is at compilation time in Xcode. How could my configuration contribute to the error?

zgordon02 avatar Jul 01 '25 15:07 zgordon02

Hi @mawr92, I'm wondering if the team has had an opportunity to look at this bug. It seems to me that this SDK will not compile at all, at least for react-native version 0.74.3 and Xcode 16.1. It seems likely it is a widespread issue, and a very small change fixes it, by changing the import from #import "UIView+React.h" to #import <React/UIView+React.h>

zgordon02 avatar Jul 03 '25 18:07 zgordon02

Hi @mawr92, I'm wondering if the team has had an opportunity to look at this bug. It seems to me that this SDK will not compile at all, at least for react-native version 0.74.3 and Xcode 16.1. It seems likely it is a widespread issue, and a very small change fixes it, by changing the import from #import "UIView+React.h" to #import <React/UIView+React.h>

Hi @zgordon02,

Thank you for following up! The team is looking into this. Will let you know once it's fixed!

mawr92 avatar Jul 03 '25 18:07 mawr92

Hi @mawr92, I'm wondering if the team has had an opportunity to look at this bug. It seems to me that this SDK will not compile at all, at least for react-native version 0.74.3 and Xcode 16.1. It seems likely it is a widespread issue, and a very small change fixes it, by changing the import from #import "UIView+React.h" to #import <React/UIView+React.h>

Hi @zgordon02,

Thank you for following up! The team is looking into this. Will let you know once it's fixed!

Thank you for the update!

zgordon02 avatar Jul 03 '25 19:07 zgordon02

@mawr92 do you have an update? I need to either patch your package or if an update is on the way I will wait for that.

zgordon02 avatar Jul 17 '25 16:07 zgordon02

For anyone else stuck on this issue, here is the patch that I unfortunately need to use:

diff --git a/node_modules/react-native-purchases-ui/ios/PaywallViewWrapper.m b/node_modules/react-native-purchases-ui/ios/PaywallViewWrapper.m
index 1234567..abcdefg 100644
--- a/node_modules/react-native-purchases-ui/ios/PaywallViewWrapper.m
+++ b/node_modules/react-native-purchases-ui/ios/PaywallViewWrapper.m
@@ -7,7 +7,7 @@
 //

 #import "PaywallViewWrapper.h"
 #import "UIView+Extensions.h"
-#import "UIView+React.h"
+#import <React/UIView+React.h>

 @import PurchasesHybridCommonUI;
 @import RevenueCatUI;

zgordon02 avatar Jul 24 '25 16:07 zgordon02

@zgordon02 Thanks for the patch! I will get a PR created for this today 💪

joshdholtz avatar Jul 31 '25 16:07 joshdholtz