How to solve the "Could not build module 'Foundation'" error in Xcode 11 Beta 2

Hello,


I met this problem when I start my first Objective-C project. I use the Xcode 11 Beta 2, and when I just type:


#import <Foundation/Foundation.h>


then the Xcode shows me the error:


Could not build module 'Foundation'

How can I solve this error? I'm really appricieate your help


Thanks a lot!

Replies

If you’re just starting out, you should work with released tools, which means Xcode 10.2.1, available from the Mac App Store. Pre-releases tools often have weird problems, and it’s best to avoid those where you can.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

FWIW, I'm encountering the same error using Xcode 11.3.1. It's one of many problems I'm having trying to use C++ code in an iOS app project.


See here:
https://forums.developer.apple.com/thread/130084


I've placed links in my last reply there and that put it into moderation. Not sure you can see it. People have succeeded in using C++ code but so far I am not among them.