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

Multiple targets match implicit dependency for linker flags '-framework fmt' #213

Open
dotku opened this issue Aug 17, 2022 · 0 comments
Open

Comments

@dotku
Copy link

dotku commented Aug 17, 2022

I wasn't able to run build after I add pod 'RNPhotoEditor', :path => '../node_modules/react-native-photo-editor/ios', the error I got is

error: Multiple commands produce '/Users/jaylin/Library/Developer/Xcode/DerivedData/ImageEditorLab-fjygnipvadpacsgfpuwniwhwnmkf/Build/Products/Debug-iphonesimulator/ImageEditorLab.app/LaunchScreen.storyboardc'
    note: Target 'ImageEditorLab' (project 'ImageEditorLab'): LinkStoryboards
    note: That command depends on command in Target 'ImageEditorLab' (project 'ImageEditorLab'): script phase “[CP] Copy Pods Resources”
warning: duplicate output file '/Users/jaylin/Library/Developer/Xcode/DerivedData/ImageEditorLab-fjygnipvadpacsgfpuwniwhwnmkf/Build/Products/Debug-iphonesimulator/ImageEditorLab.app/LaunchScreen.storyboardc' on task: PhaseScriptExecution [CP] Copy Pods Resources /Users/jaylin/Library/Developer/Xcode/DerivedData/ImageEditorLab-fjygnipvadpacsgfpuwniwhwnmkf/Build/Intermediates.noindex/ImageEditorLab.build/Debug-iphonesimulator/ImageEditorLab.build/Script-E235C05ADACE081382539298.sh (in target 'ImageEditorLab' from project 'ImageEditorLab')

2022-08-17 02:08:57.079 xcodebuild[89267:3472159] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2022-08-17 02:08:57.080 xcodebuild[89267:3472159] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
** BUILD FAILED **

and th podfile is

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

platform :ios, '12.4'
install! 'cocoapods', :deterministic_uuids => false

production = ENV["PRODUCTION"] == "1"

target 'ImageEditorLab' do
  config = use_native_modules!

  # Flags change depending on the env values.
  flags = get_default_flags()

  use_react_native!(
    :path => config[:reactNativePath],
    # to enable hermes on iOS, change `false` to `true` and then install pods
    :production => production,
    :hermes_enabled => flags[:hermes_enabled],
    :fabric_enabled => flags[:fabric_enabled],
    :flipper_configuration => FlipperConfiguration.enabled,
    # An absolute path to your application root.
    :app_path => "#{Pod::Config.instance.installation_root}/.."
  )

  use_native_modules!
  pod 'RNPhotoEditor', :path => '../node_modules/react-native-photo-editor/ios'
  use_frameworks! :linkage => :static
  pod 'iOSPhotoEditor', :git => 'https://github.com/prscX/photo-editor', :branch => 'master'

  $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

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

  post_install do |installer|
    react_native_post_install(installer)
    __apply_Xcode_12_5_M1_post_install_workaround(installer)
    installer.pods_project.targets.each do |target|
      if target.name.include?('iOSPhotoEditor')
        target.build_configurations.each do |config|
          config.build_settings['SWIFT_VERSION'] = '5'
        end
      end
    end
  end
end
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