react-native-toolbar-android / toolbar-android

MIT License
48 stars 37 forks source link

Error while using toolbar-android with use_frameworks in podfile #19

Closed Prince-Mittal closed 3 years ago

Prince-Mittal commented 3 years ago
Issue-1 Issue-11

Xcode Version : 12.4 react-native version : 0.63.3 react version : 16.13.1 @react-native-community/toolbar-android version: "0.1.0-rc.2"

Podfile :

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
source 'https://github.com/BlinkReceipt/PodSpecRepo.git'
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'

# Override Firebase SDK Version
# $FirebaseSDKVersion = '6.34.0'

# Allow iOS Static Frameworks
$RNFirebaseAsStaticFramework = true

target 'AppName' do
  config = use_native_modules!
  use_frameworks!
  # use_frameworks! :linkage => :static
  # use_frameworks! :linkage => :dynamic
  use_react_native!(:path => config["reactNativePath"])
  pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
  # pod 'BlinkReceipt'
  pod 'BlinkEReceipt'

  target 'AppNameTests' do
    inherit! :complete
    # Pods for testing
  end

  # Enables Flipper.
  # Note that if you have use_frameworks! enabled, Flipper will not work and
  # you should disable these next few lines.
  # use_flipper!
  # post_install do |installer|
  #   flipper_post_install(installer)
  # end
end

We want to use the android toolbar in the project which is using use_frameworks in podfile. But it is causing linking issues. We have tried to add framework in the build Phases but still we are getting the same problem. I have added the screenshots of the issue shown in the xcode. Can anybody help with this?

super-potion commented 3 years ago

Running into the same issue. Are you on an Apple Silicon chip?

Prince-Mittal commented 3 years ago

@super-potion I was running into this issue due to the usage of use_frameworks! according to which every pod should be dynamic frameworks but this was causing issue with the static libraries used in react-native project. So to use dynamic frameworks with static libraries I have found a plugin called cocoapods-user-defined-build-types that can be used to define the build type of every pod or any specific pod.