7

I've updated my Xcode to the Xcode 10.0 beta version and tried to run a project with realmswift in it, now i'm facing an error where it says:

Header 'RealmSwift-Swift.h' not found

hcoat
  • 2,633
  • 1
  • 22
  • 29
Sarvad
  • 171
  • 3
  • 12
  • Possible duplicate of https://stackoverflow.com/questions/39668619/xcode-8-with-mixed-swift-and-objective-c-project-generated-modulename-swift-h (though of course there is always a chance that Xcode 10 introduces some further complication) – matt Jun 04 '18 at 22:05

1 Answers1

14

I noticed this after trying out the "Conversion to Swift 4.2" button (which failed for me). When I switched to another target where I didn't run this yet, the project built without problems. And after cleaning the project properly, the failing target worked again.

Please note that according to the Release Notes this beta has several "known issues" regarding cleaning, including this one (which has the workaround for it listed, too):

enter image description here

So you might want to try deleting the DerivedData folder manually on top of cleaning in Xcode.

Jeehut
  • 20,202
  • 8
  • 59
  • 80