qonversion / react-native-sdk

React Native SDK for cross-platform in-app purchase and subscription infrastructure, revenue analytics, engagement automation, and integrations

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Undefined symbols for architecture x86_64

getadapt opened this issue · comments

Hi

Thanks for the library -- we're using it in production and it's great.

We're stuck at the moment: React Native Qonversion is giving us ios build errors for x86_64 architecture when using use_frameworks! in our podfile, blocking an upgrade of React Native Firebase, one of our core dependencies.

The errors are:

Link react_native_qonversion (x86_64) 0.1 seconds

...

Undefined symbols for architecture x86_64:
  "_OBJC_METACLASS_$_RCTEventEmitter", referenced from:
      _OBJC_METACLASS_$_RNAutomations in RNAutomations.o
      _OBJC_METACLASS_$_RNQonversion in RNQonversion.o
  "_OBJC_CLASS_$_RCTEventEmitter", referenced from:
      _OBJC_CLASS_$_RNAutomations in RNAutomations.o
      _OBJC_CLASS_$_RNQonversion in RNQonversion.o
  "_RCTRegisterModule", referenced from:
      +[RNAutomations load] in RNAutomations.o
      +[RNQonversion load] in RNQonversion.o
ld: symbol(s) not found for architecture x86_64

I tried fixing by adding this to our podfile, but it didn't work:

  pre_install do |installer|
    installer.pod_targets.each do |pod|
      if pod.name.eql?('RNQonversion')
        def pod.build_type
          Pod::BuildType.static_library
        end
      end
    end
  end

Could you help? Or guide us to a solution / let us know how to help fix? We're keen to get this fixed soon.

I'm on:
react-native-qonversion 3.5.0
react-native 0.69.5
M1 Macbook

Hi, @getadapt
Thank you for the feedback
We'll try to reproduce the problem and help you ASAP.

Hello! Could you please share your podfile with us? You can hide any third-party libraries you use if needed, but we need to see the rest of the file to be able to reproduce your case.

Thanks - I'll get back to you on this asap, we're releasing new features so I've rolled back my dependencies until I have time to look at upgrades again

commented

I've fixed this by changing the react-native-qonversion podspec, after finding the below about Xcode 12 support:

facebook/react-native#29633 (comment)

Sorry about the duplicate issue, I got carried away with patch-package

the diff is:

diff --git a/node_modules/react-native-qonversion/react-native-qonversion.podspec b/node_modules/react-native-qonversion/react-native-qonversion.podspec
index 8f84e00..1e32170 100644
--- a/node_modules/react-native-qonversion/react-native-qonversion.podspec
+++ b/node_modules/react-native-qonversion/react-native-qonversion.podspec
@@ -21,6 +21,6 @@ Pod::Spec.new do |s|
   s.source_files = "ios/**/*.{h,m,swift}"
   s.requires_arc = true
 
-  s.dependency "React"
+  s.dependency "React-Core"
   s.dependency "QonversionSandwich", "0.2.0"
 end

This issue is stale because it has been open 7 days with no activity. Remove stale label or comment or this will be closed in 5 days.

This issue was closed because it has been stalled for 5 days with no activity.