codemotionapps / react-native-help-scout

Help Scout's Beacon for React Native
MIT License
6 stars 14 forks source link

Doesn't work with use_frameworks! #5

Closed danipralea closed 4 years ago

danipralea commented 5 years ago

Hello. I'm having a few issues integrating the library. I first got

[!] The 'Pods-TargetName' target has transitive dependencies that include statically linked binaries: (/Projects/Project/ReactNative/ios/Pods/Beacon/Beacon.framework)

Then I added in my Podfile:

pre_install do |installer|
    Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
  end

and it actually silenced that error. but now I get

The following build commands failed:
    Ld /Projects/Project/ReactNative/ios/build/Project/Build/Products/Debug-iphonesimulator/ReactNativeHelpScout/ReactNativeHelpScout.framework/ReactNativeHelpScout normal x86_64
(1 failure)

and I'm pretty much in the dark.

My system info:

System:
    OS: macOS Mojave 10.14.6
    CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
    Memory: 124.83 MB / 16.00 GB
    Shell: 5.3 - /bin/zsh
  Binaries:
    Node: 12.11.1 - /usr/local/bin/node
    Yarn: 1.19.1 - /usr/local/bin/yarn
    npm: 6.9.0 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 12.4, macOS 10.14, tvOS 12.4, watchOS 5.3
  IDEs:
    Android Studio: 3.5 AI-191.8026.42.35.5900203
    Xcode: 10.3/10G8 - /usr/bin/xcodebuild
  npmPackages:
    react: 16.9.0 => 16.9.0
    react-native: 0.61.2 => 0.61.2
  npmGlobalPackages:
    react-native-cli: 2.0.1

Do you have any suggestions on how to proceed? Thanks in advance.

DimitarNestorov commented 5 years ago

You shouldn't have to add anything in your Podfile. Run the following:

react-native init testhelpscout
cd testhelpscout
yarn add react-native-help-scout # or npm install react-native-help-scout
cd ios
pod install

If you see the same error it has to be something with your CocoaPods version. Which version are you running? Otherwise it has to be something with your project setup. Do you mind sharing your Podfile?

danipralea commented 5 years ago

Hello @dimitarnestorov and thank you for your quick reply. My cocoapods version is 1.8.4

My podfile:

platform :ios, '9.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

use_frameworks!

target 'Project' do
  # Pods for Project
  pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
  pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
  pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
  pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
  pod 'React', :path => '../node_modules/react-native/'
  pod 'React-Core', :path => '../node_modules/react-native/'
  pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
  pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
  pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
  pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
  pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
  pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
  pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
  pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
  pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
  pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
  pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
  pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'

  pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
  pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
  pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
  pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
  pod 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon"
  pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
  pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

  pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
  pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
  pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'

  pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'

  target 'ProjectTests' do
    inherit! :search_paths
    # Pods for testing
  end

  use_native_modules!
end

target 'Project-tvOS' do
  # Pods for Project-tvOS

  target 'Project-tvOSTests' do
    inherit! :search_paths
    # Pods for testing
  end

end
DimitarNestorov commented 5 years ago

Try removing use_frameworks!.

Edit: I added this to my CocoaPods config and got your error. Not sure why you have it in your config.

danipralea commented 5 years ago

that seems to have done it. thank you so much @dimitarnestorov

danipralea commented 5 years ago

Try removing use_frameworks!.

Edit: I added this to my CocoaPods config and got your error. Not sure why you have it in your config.

hey @dimitarnestorov I'm coming back to this, cause it generates a lot of other issues with my other frameworks. Are you going to support Beacon as being a framework, instead of statically linked binary in the future?

DimitarNestorov commented 5 years ago

I don't have the time to do this right now. Also I'm not an iOS developer so I have no idea how to do that. PRs welcome.

On Thu, Oct 31, 2019 at 10:46 AM Danut Pralea notifications@github.com wrote:

Try removing use_frameworks!.

Edit: I added this to my CocoaPods config and got your error. Not sure why you have it in your config.

hey @dimitarnestorov https://github.com/dimitarnestorov I'm coming back to this, cause it generates a lot of other issues with my other frameworks. Are you going to support Beacon as being a framework, instead of statically linked binary in the future?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/codemotionapps/react-native-help-scout/issues/5?email_source=notifications&email_token=ACDCC4XURHP7VVBUDX3UCDDQRKLPJA5CNFSM4JFXZXUKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECW6Y3Y#issuecomment-548269167, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACDCC4R7MMJ43KOTKP43TWDQRKLPJANCNFSM4JFXZXUA .

DimitarNestorov commented 4 years ago

0.1.0 released. This should be fixed now.