Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mambu

macrumors newbie
Original poster
Apr 7, 2014
4
0
milan, italy
Hi everybody, i'm mambo from italy(sorry for my english), i'm working for a italian company and few day ago my boss have gave me the responsibility of our apple App.
Now i have to test the app and maybe modified it when occurs, but i don't nothing of Xcode. For now i want start the application on simulator, but when i run the build fallied and the only message is:

Code:
xcodebuild: error: SDK "iphoneos5.1" cannot be located.
mv: rename CorePlot.zip to /Users/xxx/Desktop/CorePlot.zip: No such file or directory

i'm sorry if the question is so stupid that are basically, but if you can, give me a hand:)
Thank you very much:)
 
Code:
xcodebuild: error: SDK "iphoneos5.1" cannot be located.

The problem is as follows: you most probably created the original project in Xcode 4.4, which has 5.1 as the then-current, default SDK.

When you create a project in any new (Xcode 4+) Xcode, it'll compile against, by default, the latest available SDK, which is, as of Xcode 4.4, iOS 5.1. As newer Xcodes have newer SDK's as default, when you opne the same project in, say, Xcode 4.6.3, it'll compile the project against iOS 6.1 (the default SDK for Xcode 4.6.3) and, when opening in Xcode 5.1, it'll be compiled against iOS 7.1 as it's the default SDK in Xcode 5.1.

You can easily check out whether the default "latest" is the "Base SDK" setting by double-clicking the project name in the upper-left window and, in the default target, navigating to Build Settings tab and, then, look for "Base SDK". In the following screenshot, I've annotated the default setting in Xcode 4.4 for you:

NativeXcode44Project-default-xcode44.png


As you can see, it contains "Latest iOS (iOS 5.1)", the first part of which means any (newer) Xcode will always use the latest iOS available in that particular Xcode, independently of its version. The second part (iOS 5.1) states the current Xcode, 4.4, has iOS 5.1 as its default SDK.

If, for some reason, you want to change this "Base SDK" (you, in most cases, shouldn't as Xcodes always come with one SDK only and, instead of "hacking" old SDK's under new Xcodes, it's cleaner to just use older Xcode versions to compile against older iOS SDK's) to the currently available SDK in the particularly Xcode version, you can do this:

NativeXcode44Project-settingToWiredIn51-xcode44.jpg


(above is a thumbnail; I haven't embedded the original image in here as it's too wide. It's available at https://dl.dropboxusercontent.com/u...Xcode44Project-settingToWiredIn51-xcode44.png )

If you try to open the same project, now hard-wired to iOS5.1, in an Xcode version with different default iOS version, you'll see this in the same Build Settings tab (here, in the latest (5.1) Xcode):

xcode51-notfound.jpg


(full image: https://dl.dropboxusercontent.com/u/81986513/032014/xcode51-notfound.png )

As you can see, Xcode displays the same error message as you've cited.

The solution is simple: as I've shown you in the 2nd screenshot, just set "Base SDK" back to "Latest iOS".
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.