tags:

views:

3589

answers:

12

Hello All:

I download a sample of UICatalog and run it.When I compile it ,it shows the failed message:There is no SDK with the name or path "iphoneos4.0".I find the "Base SDK" of UICatalog's Targets is iphone Device 4.0(missing).How can I solve this question and run it.

Thank you!

+5  A: 

Select the root level of the project, in "Groups & Files". It's blue. Then hit command-I to get its Info.

Pick "Build" from the segmented controller at the top of the info window. In the first section of that panel you'll see Base SDK as one of the first few lines of options. Select the latest version of the SDK you find in there, and close the window to save your options.

Build-and-run the project, and you should be good to go.

Dan Ray
The question is still existent,thank you for give me advice。
lqf
Did you try what I said? I didn't give you advice, I gave you instructions. Advice would sound like, "Go into plastics".
Dan Ray
Yes,I had tried.But the question is still existent.
lqf
You're going to need to say some more about what happened, then. If you follow those instructions, it solves that problem.
Dan Ray
The problem is:"error: There is no SDK with the name or path 'iphoneos4.0'".
lqf
I bet your Xcode installation is out of date. Try getting the latest version from Apple.
Dan Ray
@lqf: If this didn't solve your problem, you shouldn't accept it as your answer. Accepting this as your answer is misleading to others with the same problem.
Erik B
+1  A: 

My problem was that in the sample code another xcodeproj was embedded. So I looked after that file with Finder, opened it with Xcode and than the same as Dan said: Project -> Edit Project Settings -> Under "Architectures" set Base SDK to "iPhone Simulator x.x" (the latest one you have installed)

testing
+1  A: 

Getting the same errors

Just upgrade to the developers build. Trying to build an app based on DrillDownSave from the sample files. Was building fine before the update. Now when I attempt to build I get:

Check dependencies

[BEROR]error: There is no SDK with the name or path 'iphoneos4.0'

I have followed the instructions above, setting those values to 4.1 (most recent), and this has failed to resolve the issue, still same error

Will K.
I am also seeing this issue.
Jim Blackler
The same thing happens to me, really strange.
aticatac
I just downloaded the latest SDK and I'm having the same issue.. the usual solution, set the project base SDK to the latest version didn't do the trick for me either.
dkk
Make sure that it's not also set in your target(s) settings; if so delete it from there and make sure it's set in the Project's "Build" tab.
geowar
A: 

You have to make sure that you change to the "iPhone Simulator" under the project settings in the appropriate configuration (i.e. if you are building a debug build you have to change to the simulator under the debug configuration).

For some reason I was getting this error when I did change the simulator but realized that I was doing a debug build but changed to the simulator under the release configuration and not the debug configuration.

+3  A: 

Ok, I've solved it.

  1. In Groups & Files go to Targets and select your target.
  2. Press Ctrl+I (or open the info in some other way)
  3. Set the Base SDK of your target

(The Base SDK should also be set at the project)

dkk
The base SDK shouldn't be set in a target; delete it from there and set it via the Project's "Build" tab.
geowar
The targets do not have to be deleted. They just have to be set to the right Base SDK as well since they may override the project's base SDK.
dkk
A: 

dkk's answer is what made things work for me. I had to change the Base SDK on the target and not just the project. Perhaps you have to do both.

adolfox
The base SDK shouldn't be set in a target; delete it from there and set it via the Project's "Build" tab.
geowar
A: 

I just went Project -> Edit Project Settings -> Build -> then change the Base SDK to iPhone 4 simulator or I'm assuming whichever SDK you want to use. I never had to specify the build for a given target, although my program was created on a mac that was already configured to use the iPhone 4.0 simulator.. so perhaps the targets were set for the simulator SDK and the project itself wasn't? Either way... just glad it works.

randomness
+2  A: 

For the official answer: http://developer.apple.com/library/ios/#qa/qa2010/qa1701.html

geowar
A: 

I was having the same problem and what I did to solve it was:

  1. Go to Menu Project
  2. Go to Set Active SdK
  3. Select the option SIMULATOR instead of DEVICE
  4. Build and Run and the ERROR has gonne!

I hope it works for you guys... =)

Victor
A: 

I had the same issue with another Apple sample app. The only way I could resolve it (in fact, the only way I could get the option of running in the simulator at all) was to change from debug to release and back. The dropdown still shows Base SDK Missing but if you click it, the simulator options are there and it builds.

I think that's a bug.

Steve
+3  A: 

After loading the project into XCode..

Under Groups and Files

1) right click on UICatalog<-(or your demo project name) and select Get Info

2) in Base SDK select IOS Simulator 4.1

3) Close and save info pane

4) expand Targets exposing UICatalog<-(or demo project name)

5) right click on UICatalog and select Get Info

6) in Base SDK select IOS Simulator 4.1

Combo box in UICatalog project pane (upper left corner) should switch to "Device - 4.1 | Debug" instead of "No Base SDK"

if you Build and Run at this point you might get another error. If so, open the UICatalog combo and switch from Device to Simulator

The "official link" mentioned above states…

"Note: Targets can override build settings defined at the Project level. "

..but should probably read "will" instead of "can"

Larry
A: 

Steve nailed it. This is an Xcode bug. I loaded the NavBar sample and Xcode didn't even offer the simulator as an option, and it complained about the missing SDK even though it was set correctly in the project and wasn't set at all on the target.

Do what Steve said: "The only way I could resolve it (in fact, the only way I could get the option of running in the simulator at all) was to change from debug to release and back. The dropdown still shows Base SDK Missing but if you click it, the simulator options are there and it builds."

Oscar Goldman