xcode “目标具有名称冲突的框架:安装pod时出现“OneSignal...”错误

lo8azlld  于 2023-05-19  发布在  其他
关注(0)|答案(1)|浏览(139)

我最近更新了Xcode和Cocoapods,现在每次我尝试更新Pod时都会收到此错误:

[!] The 'Pods-TestApp' target has frameworks with conflicting names: onesignal.xcframework, onesignalcore.xcframework, onesignalextension.xcframework, and onesignaloutcomes.xcframework.

我尝试导航到Pod文件夹并搜索OneSignal Pod的两个版本,但没有任何。但是,有两个文件夹:OneSignal和OneSignalXcFramework。我在网上读到两个库包含相同的文件名,所以我有一种预感,这就是问题所在,但在同一个线程中,据说两者可以同时使用。这是我的podfile:

# Uncomment the next line to define a global platform for your project
 platform :ios, '16.0'

target 'TestApp' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!
  
  
      # Pods for TestApp
  pod 'Firebase/Analytics'
  pod 'Firebase/Auth'
  pod 'Firebase/Firestore'
  pod 'Firebase/Performance'
  pod 'Firebase/Messaging'
  pod 'Firebase/Storage'
  pod 'Firebase/InAppMessaging'
  pod 'Kingfisher'
  pod 'GoogleSignIn'
  pod 'SideMenu'
  pod 'Firebase/Database'
  pod 'FirebaseFirestoreSwift'
  pod 'EmptyDataSet-Swift'
  pod 'SwiftSpinner'
  pod 'OneSignal'
  pod 'BSImagePicker'
  pod 'SkeletonView'
  pod 'BulletinBoard'
  
target 'OneSignalNotificationServiceExtension' do
  pod 'OneSignalXCFramework', '>= 3.0.0', '< 4.0'
end
  
  target 'TestAppTests' do
    inherit! :search_paths
    # Pods for testing
  end

  target 'TestAppUITests' do
    # Pods for testing
  end

end

我可以做些什么来解决这个问题?顺便说一句,我已经尝试去整合的豆荚和重新安装他们,但没有工作。

rryofs0p

rryofs0p1#

你已经回答了问题。

target 'TestApp' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  pod 'OneSignalXCFramework', '>= 3.0.0', '< 4.0'

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

  target 'TestAppUITests' do
    # Pods for testing
  end

end

安装后的情况下,如果你得到rsync错误.(这将发生由于xcode更新)
我的另一个答案在这里。https://stackoverflow.com/a/75984932/16322682

相关问题