5

My app is written in swift, and it works pretty well in the simulator. However, when I try to build it for my iPad, it says

"Cannot load underlying module for 'Foundation"
"Cannot load underlying module for 'Foundation"
"Cannot load underlying module for 'Foundation"
"Cannot load underlying module for 'Foundation"

The iPad is in iOS 8, and the project is targeted for iOS 8

3
  • 2
    Is your iPad iOS 8? Is your project targeted for iOS 8? You need to provide a lot more details. Commented Jun 17, 2014 at 18:29
  • I started getting this error too today. My specs are. iPhone 5, running iOS8 Beta 3. Xcode Beta 3. XCode deployment target is 7.1. Runs fine in simulator, compile errors trying to run on device. Commented Jul 9, 2014 at 16:09
  • Not a real solution, but I fixed it by reinstalling XCode 6.0 Beta3. Ran a clean and everything works again. Commented Jul 9, 2014 at 17:52

3 Answers 3

1

Try to check Foundation.framework in your SDK for device targets:

ls /Applications/Xcode6-Beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk/System/Library/Frameworks | grep ^Foundation.

It must exists, if not, reinstallation of Xcode will fix this problem.

(Note: SDK frameworks for device and simulator are located in other folders)

Sign up to request clarification or add additional context in comments.

Comments

1

If Xcode 6.1 starts messing around like that, easy fix is to delete user settings by removing Xcode folder: ~/Library/Developer/Xcode.

Backup your keybindings and themes first from ~/Library/Developer/Xcode/UserData

Comments

0

If you look in the issue navigator, XCode will let you know the path it looked for Foundation in. Part of the path will include what Platform it's looking for.

In my case, I updated to XCode 6 Beta 3 and had this error caused by the deployment target defaulting to OSX 10.10 which I don't have installed.

You can click your project name to change your deployment target.

In my case, changing the deployment target back to 10.9 fixed this.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.