Why compiler display error on one project, and not on the other for the same libraryt CDMarkdownKit?

2020-05-23 ios swift xcode cocoapods

I have two projects: FS and IL.

For both of them I use Xcode 11.5, Swift Language Version 4, cocoapod lib CDMarkdownKit and different Macbooks.

In podfile.lock there is the same version:

- CDMarkdownKit (1.2.1)

Now when I compile it on FS I got an error:

enter image description here

but on IL project everything compiles fine without error in the same place:

enter image description here

I have no idea what makes the difference. Could you help me with this?


Looks to me that in the first case you don’t handle the ‘default’ case into the switch, and that’s why the compiler tells you to be more exhaustive in handling all the cases. In the second case you actually have default: break, which does the trick. Handling all the cases or adding the fallback ‘default: break’ should do the job