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

Pod/target collision #165

Open
harryt04 opened this issue Sep 21, 2022 · 0 comments
Open

Pod/target collision #165

harryt04 opened this issue Sep 21, 2022 · 0 comments

Comments

@harryt04
Copy link

Here's my error message:
[!] Oops, you came across a limitation of cocoapods-binary.

The plugin requires that one pod should have ONLY ONE target in the 'Pod.xcodeproj'. There are mainly 2 situations causing this problem:

  1. One pod integrates in 2 or more different platforms' targets. e.g.

    target 'iphoneApp' do
      pod 'A', :binary => true
    end
    target 'watchApp' do
      pod 'A'
    end
    
  2. Use different subspecs in multiple targets. e.g.

    target 'iphoneApp' do
      pod 'A/core'
      pod 'A/network'
    end
    target 'iphoneAppTest' do
      pod 'A/core'
    end
    

Related pods: ["RCT-Folly", "React-Core", "React-Core"], target names: ["RCT-Folly.default-Futures", "React-Core.common", "React-Core-9d1fe9bd"]

I've been trying for days to get past this error, but I can't. Manually specifying pods with the :binary flag gets me passed this issue, but it task over an hour to install and precompile, and it appears it is installing a duplicate of the pods. Here is my Podfile:

plugin 'cocoapods-binary'
plugin 'cocoapods-static-swift-framework'

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text', :modular_headers => true

platform :ios, '11.0'
use_frameworks! :linkage => :static
all_binary!
set_custom_xcodebuild_options_for_prebuilt_frameworks "DEBUG_INFORMATION_FORMAT=dwarf"
enable_bitcode_for_prebuilt_frameworks!
inhibit_all_warnings!

target 'xrmobile' do
  config = use_native_modules!

  use_react_native!(
    :path => config[:reactNativePath],
    # to enable hermes on iOS, change `false` to `true` and then install pods
    :hermes_enabled => true,
  )


  # skip flipper on TF_BUILD builds
  if !ENV['TF_BUILD']
    use_flipper!
  end

  post_install do |installer|
    if !ENV['TF_BUILD']
      flipper_post_install(installer)
    end
    react_native_post_install(installer)
    __apply_Xcode_12_5_M1_post_install_workaround(installer)


    installer.pods_project.targets.each do |target|
      if target.name == "React-Core-AccessibilityResources" || target.name == "React-Core.common-AccessibilityResources"
        target.remove_from_project
      end
    end
  end
end

Thanks for your feedback!

If it's a bug:

  • What's your environment:

    • run pod env | egrep 'CocoaPods |Xcode|cocoapods-binary' then paste the result here

    CocoaPods : 1.11.3
    Xcode : 13.2.1 (13C100)
    cocoapods-binary : 0.4.4
    plugin 'cocoapods-binary'
    __apply_Xcode_12_5_M1_post_install_workaround(installer)

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

1 participant