I am trying to get my project to build but I keep getting compile errors in one of the files that is provided by the Swift toolchain. The error is "Unknown type name 'NSCalendarIdentifier'" and it is in NSCalendarShims.h. I compared my file to the one on Github and they are exactly the same, I really don't know what is wrong. I am running Xcode 9.4.1 on MacOS Mojave Dev Beta. I've tried deleting Xcode and all it's dependencies as well as recloning my project and nothing works. I've also tried reverting to commits that previously worked but they all cause this same error. Thank you
It's likely an incompatibility with CocoaPods. Every time a new Swift version is released, people find that existing pods break. CocoaPods must be doing something a bit hinky that makes it dependent on the exact Swift version, in a very fragile way.
In most cases that we hear about here, people fix the problem by rebuilding all their pods. (Sorry, I don't use CocoaPods, so I've never been interested into looking into the problem to understand what's really going on.)