prscX / react-native-app-tour

React Native: Native App Tour Library
Apache License 2.0
640 stars 119 forks source link

Can't use with RN 0.63 on iOS #110

Open vaibhavhrt opened 4 years ago

vaibhavhrt commented 4 years ago

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 commented 4 years ago

@vaibhavhrt Hi, have you found the solution?

vaibhavhrt commented 4 years ago

@annaostapenko22 nope :(

prscX commented 4 years ago

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

annaostapenko22 commented 4 years ago

@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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

@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 commented 4 years ago

Hi, any suggestion yet? I am using firebase too

winay39 commented 4 years ago

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 commented 4 years ago

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.