构建期间出现RxRealm.swift错误

cxfofazt  于 2022-12-17  发布在  Swift
关注(0)|答案(1)|浏览(123)

请帮帮我。我需要建立一个旧的ios应用程序,但我从来没有与swift或xcode。我得到错误时,编译。我的理解是,这是一个包的问题,而不是代码的问题。顺便说一句,该项目正在工作,因为它的版本是在AppStore。请帮助我解决这个问题。

Type 'List<Element>' does not conform to protocol 'NotificationEmitter'
Type 'AnyRealmCollection<Element>' does not conform to protocol 'NotificationEmitter'
Type 'Results<Element>' does not conform to protocol 'NotificationEmitter'
Type 'LinkingObjects<Element>' does not conform to protocol 'NotificationEmitter'

我的播客文件:

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

target 'Project name' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!
  pod 'RxRealm'
  pod 'RxAlamofire', '5.1.0'
  pod 'RxGesture'
  pod 'Action'
  pod 'lottie-ios'
  pod 'SwiftLint'
  pod 'SwiftyJSON'
  pod 'FSPagerView'
  pod 'StreamView', :git => 'https://github.com/Macostik/StreamView.git'
  pod 'Firebase', '7.1.0'
  pod 'Firebase/Messaging', '7.1.0'
  pod 'SDWebImage'
  # Pods for OneSpace

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

  target 'Project nameUITests' do
    inherit! :search_paths
    # Pods for testing
  end
  
  target 'Notification Extension' do
      use_frameworks!
      pod 'RxRealm'
      pod 'RxAlamofire'
  end

end

Pod版本:

pod --version
1.11.3

我尝试从这个分辨率Build compile errors in RxRealm.swift after RxRealm pod update: Type 'List' does not conform to protocol 'NotificationEmitter'设置pod,但得到以下错误

jdzmm42g

jdzmm42g1#

我把它弄成这样

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

target 'One Space' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!
  pod 'RxRealm'
  pod 'RxAlamofire', '6.1.0'
  pod 'RxGesture'
  pod 'Action'
  pod 'lottie-ios'
  pod 'SwiftLint'
  pod 'SwiftyJSON'
  pod 'FSPagerView'
  pod 'StreamView', :git => 'https://github.com/Macostik/StreamView.git'
  pod 'Firebase', '7.1.0'
  pod 'Firebase/Messaging', '7.1.0'
  pod 'SDWebImage'
  # Pods for OneSpace

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

  target 'One SpaceUITests' do
    inherit! :search_paths
    # Pods for testing
  end
  
  target 'Notification Extension' do
      use_frameworks!
      pod 'RxRealm'
      pod 'RxAlamofire'
  end

end

相关问题