Chapter 8 Starter Project Error

I am using XCode 10. In some places, I am gettings the error "Contextual closure type ‘(String) throws → Bool’ expects 1 argument, but 2 were used in closure body. Specifically, when filtering the web responses in ActivityController.swift.

response
.filter { response, _ in
return 200…<300 ~= response.statusCode
}

Regards,

Gary

@gfgruvin Do you still have this issue or have you managed to solve it in the meantime?

Yes, I still have this problem.

Here is a screen shot of the problem I am having.

49

This is what the pod file looks like…

use_frameworks!

  pod 'RxSwift', '~> 4.0'
  pod 'RxCocoa', '~> 4.0'
  pod 'Kingfisher', '4.9.0'
end

post_install do |installer|
    installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings['SWIFT_VERSION'] = '4.0'
        end
    end
end

This topic was automatically closed after 166 days. New replies are no longer allowed.