Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error with latest ReactiveCocoa Carthage : No such module 'Result'

I'm updating my project to Swift 5 Xcode 10.3.

Everything was working fine with the previous Swift version now with the latest ReactiveCocoa 10.0.0

Already tried :

  1. Deleting and updating all carthage
  2. Deleting derivedData Folder, clean and build

enter image description here

like image 285
vishal virodhia Avatar asked Jul 31 '19 10:07

vishal virodhia


1 Answers

Swift added its own Result type to the standard library in version 5. As such, ReactiveSwift removed its dependency on the third-party Result library it had previously used, and offers these instructions to update your code:

  • If you have used Result only as dependency of ReactiveSwift, remove all instances of import Result, import enum Result.NoError or import struct Result.AnyError and remove the Result Framework from your project.

  • Replace all cases where NoError was used in a Signal or SignalProducer with Never

  • Replace all cases where AnyError was used in a Signal or SignalProducer with Swift.Error

So for this particular error, just delete the import Result line.

like image 151
jjoelson Avatar answered Nov 19 '22 12:11

jjoelson