xcode xcodebuild,缺少 iOS 模拟器 sdk
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10356880/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
xcodebuild, missing iOS simulator sdk
提问by subzero
I'm automating the building process for an iOS project. Everything was fine... but now I have to support iOS 4, what I have installed is the iOS simulator 4.3 (Xcode : Preferences > Downloads > Components).
我正在自动化 iOS 项目的构建过程。一切都很好......但现在我必须支持iOS 4,我安装的是iOS模拟器4.3(Xcode:首选项>下载>组件)。
Inside xcode I have these options:
在 xcode 中,我有以下选项:
- iOS device
- iPad simulator 5.0
- iPad simulator 5.1
- iPhone simulator 5.0
- iPhone simulator 5.1
- iOS设备
- iPad模拟器5.0
- iPad 模拟器 5.1
- iPhone 模拟器 5.0
- iPhone 模拟器 5.1
There is no4.3
没有4.3
From command line
从命令行
$ xcodebuild -showsdks
Mac OS X SDKs:
Mac OS X 10.6 -sdk macosx10.6
Mac OS X 10.7 -sdk macosx10.7
iOS SDKs:
iOS 5.0 -sdk iphoneos5.0
iOS Simulator SDKs:
Simulator - iOS 5.0 -sdk iphonesimulator5.0
There is no4.3
没有4.3
Questions:
问题:
- Where is the 4.3 simulator installed?
- What sdk value should a pass to xcodebuild for the 4.3 simulator?
- 4.3模拟器安装在哪里?
- 什么 sdk 值应该传递给 4.3 模拟器的 xcodebuild?
Thanks guys.
谢谢你们。
采纳答案by A-Live
The simulator SDK's are located at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs
模拟器 SDK 位于 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs
You can use the following xcodebuild
(/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild
) command:
您可以使用以下xcodebuild
( /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild
) 命令:
xcodebuild -target $target -sdk $sdk -configuration $configuration
where $target
is the target name specified in the project, $sdk
could be taken from the output of the command you used to see the available SDK's (iphoneos5.0
, iphonesimulator5.0
) and $configuration
could be AdHoc
, AppStore
or whatever else you have setup in the project.
$target
项目中指定的目标名称在哪里,$sdk
可以从您用来查看可用 SDK ( iphoneos5.0
, iphonesimulator5.0
)的命令的输出中获取,$configuration
可以是AdHoc
,AppStore
或者您在项目中设置的任何其他内容。
For the missing SDK issue you could check the item status at Xcode : Preferences > Downloads > Components
to be Installed
and check the folder iPhoneSimulator4.3.sdk
exists at the SDK's location. If it does but still not displayed as installed, you could consider removing and reinstalling it or reinstall the Xcode completely.
对于缺失的 SDK 问题,您可以检查项目状态为Xcode : Preferences > Downloads > Components
,Installed
并检查iPhoneSimulator4.3.sdk
SDK 位置是否存在文件夹。如果有但仍未显示为已安装,您可以考虑删除并重新安装它或完全重新安装 Xcode。
回答by Surajit Patro
If you have iOS Lion. Follow the following steps
如果你有 iOS Lion。请按照以下步骤操作
Go to Applications (Right click on Xcode Icon)
转到应用程序(右键单击 Xcode 图标)
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/ Developer/Applications/iPhone Simulator.app
There you will find the iOS Simulator App.
在那里你会找到 iOS 模拟器应用程序。