Swift CocoaPods RxCoCoa3.6.1版本在Xcode 9中失败

Swift CocoaPods RxCoCoa3.6.1版本在Xcode 9中失败,swift,xcode,cocoapods,rx-swift,rx-cocoa,Swift,Xcode,Cocoapods,Rx Swift,Rx Cocoa,RxCocoa版本3.6.1无法在Xcode 9中生成,错误消息: Initializer 'init(parentObject:)' with Objective-C selector 'initWithParentObject:' conflicts with initializer 'init(parentObject:)' from superclass 'RxScrollViewDelegateProxy' with the same Objective-C selector

RxCocoa版本3.6.1无法在Xcode 9中生成,错误消息:

Initializer 'init(parentObject:)' with Objective-C selector   'initWithParentObject:' conflicts with initializer 'init(parentObject:)' from superclass 'RxScrollViewDelegateProxy' with the same Objective-C selector      

这似乎是由@objc推断引起的。奇怪的是,关闭Swift 3 style@objc推理似乎可以解决这个问题。将此内容放在播客文件的末尾:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['SWIFT_VERSION'] = '3.2'
      if target.name == 'RxCocoa' then
        config.build_settings['SWIFT_SWIFT3_OBJC_INFERENCE'] = 'Off'
      end
    end
  end
end

这将设置使用Swift 3.2 a构建的所有POD禁用RxCocoa的@objc推理。

这似乎是由@objc推理造成的。奇怪的是,关闭Swift 3 style@objc推理似乎可以解决这个问题。将此内容放在播客文件的末尾:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['SWIFT_VERSION'] = '3.2'
      if target.name == 'RxCocoa' then
        config.build_settings['SWIFT_SWIFT3_OBJC_INFERENCE'] = 'Off'
      end
    end
  end
end
这将设置所有要使用Swift 3.2构建的POD,并禁用RxCocoa的@objc推理