Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use with RN 0.63 on iOS #110

Open
vaibhavhrt opened this issue Oct 27, 2020 · 10 comments
Open

Can't use with RN 0.63 on iOS #110

vaibhavhrt opened this issue Oct 27, 2020 · 10 comments

Comments

@vaibhavhrt
Copy link

If I add use_frameworks! to Podfile everything breaks.
If we can't get rid of use_frameworks, is there some way to manually link the library, without using cocoa pods

@annaostapenko22
Copy link

@vaibhavhrt Hi, have you found the solution?

@vaibhavhrt
Copy link
Author

@annaostapenko22 nope :(

@prscX
Copy link
Owner

prscX commented Nov 2, 2020

Could you please share the issue details. use_framework is needed since internally it is dependent on a swift library.

@annaostapenko22
Copy link

annaostapenko22 commented Nov 2, 2020

@prscX For me, problem was with compatibility with flipper. I am using react-native 0.63.3 @vaibhavhrt I commented these lines in my Podfile # use_flipper! # post_install do |installer| # flipper_post_install(installer) # end
And then I could add these lines to the Podfile
use_native_modules!
pod 'RNAppTour', :path => '../node_modules/react-native-app-tour/ios'
use_frameworks!
pod 'MaterialShowcase', :git => 'https://github.com/aromajoin/material-showcase-ios', :tag => '0.7.1'
After these steps I run pod install and built the project, everything started working.

@prscX
Copy link
Owner

prscX commented Nov 2, 2020

Please make sure Flipper iOS Setup Guidelines steps are added to Podfile, since aromajoin/material-showcase-ios is implemented using Swift and we have to use use_frameworks! in Podfile.

$static_framework = ['FlipperKit', 'Flipper', 'Flipper-Folly',
'CocoaAsyncSocket', 'ComponentKit', 'Flipper-DoubleConversion',
'Flipper-Glog', 'Flipper-PeerTalk', 'Flipper-RSocket', 'Yoga', 'YogaKit',
'CocoaLibEvent', 'OpenSSL-Universal', 'boost-for-react-native']

   pre_install do |installer|
     Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
     installer.pod_targets.each do |pod|
         if $static_framework.include?(pod.name)
           def pod.build_type;
             Pod::BuildType.static_library
           end
         end
       end
   end

I have updated installation steps in README as well. Please refer the same. Let me know if you still face the same issue.

</ Thanks >
Pranav

@vaibhavhrt
Copy link
Author

I removed flipper but our project uses firebase & I think I was having errors related to that. Anyway I will try the updated installation steps and let you know if I still face any errors.

@annaostapenko22
Copy link

@prscX Unfortunately this doesn't work for me.
@vaibhavhrt I am also using firebase, that is why in addition to my steps I also set s.static_framework to true (instead of false) in .podspec firebase files in /node_modules

@michtnt
Copy link

michtnt commented Nov 4, 2020

Hi, any suggestion yet? I am using firebase too

@winay39
Copy link

winay39 commented Nov 5, 2020

Same problem here. Using firebase as well. The flipper issue goes away however I get this
Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_GULAppEnvironmentUtil", referenced from: objc-class-ref in FirebaseCore(FIRBundleUtil.o) "_GULResetLogger", referenced from: _FIRResetLogger in FirebaseCore(FIRLogger.o) "_GULLoggerRegisterVersion", referenced from: ___FIRLoggerInitializeASL_block_invoke in FirebaseCore(FIRLogger.o) "_GULLoggerInitializeASL", referenced from: ___FIRLoggerInitializeASL_block_invoke in FirebaseCore(FIRLogger.o) "_GULLogBasic", referenced from: _FIRLogBasic in FirebaseCore(FIRLogger.o) "_GULLoggerEnableSTDERR", referenced from: ___FIRLoggerInitializeASL_block_invoke in FirebaseCore(FIRLogger.o) "_GULIsLoggableLevel", referenced from: _FIRIsLoggableLevel in FirebaseCore(FIRLogger.o) "_GULSetLoggerLevel", referenced from: _FIRSetLoggerLevel in FirebaseCore(FIRLogger.o) "_GULLoggerForceDebug", referenced from: ___FIRLoggerInitializeASL_block_invoke in FirebaseCore(FIRLogger.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

@winay39
Copy link

winay39 commented Nov 7, 2020

Fixed it. So these two things are needed.

  1. Remove flipper. It's only used in Debug mode not particularly very useful.
  2. Put $RNFirebaseAsStaticFramework = true at the top of your Podfile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants