gpt4 book ai didi

ios - 在 Swift REPL 中使用 iphonesimulator sdk 和 macosx sdk 有什么区别?

转载 作者:行者123 更新时间:2023-11-28 05:34:10 24 4
gpt4 key购买 nike

您可以使用 --sdk 选项的几个不同选项来运行 Swift REPL。你可以运行:

xcrun swift -v -sdk $(xcrun --show-sdk-path --sdk iphonesimulator)

xcrun swift -v -sdk $(xcrun --show-sdk-path --sdk macosx)

还有

xcrun swift -v -sdk $(xcrun --show-sdk-path --sdk iphoneos)

这似乎工作得不是很好并且会导致很多错误。
使用 iphonesimulator sdk 与 macosx sdk 时,我的输出有何不同?

最佳答案

桌面、设备模拟器和设备硬件是不同的构建目标:

SDK               Targetmacosx            OSX Desktopiphonesimulator   iOS Simulatoriphoneos          iOS Hardware

Currently, xcodebuild supports these platforms:

 OS X           The local Mac, referred to in the Xcode interface as My Mac, and which supports the fol-lowing following
lowing keys:

arch The architecture to use, either x86_64 (the default) or i386.

iOS An iOS device, which supports the following keys:

name The name of the device to use.

id The identifier of the device to use, as shown in the Devices tab of the Xcode
Organizer.

iOS Simulator The iOS Simulator, which supports the following keys:

name The full name of device to simulate, as presented in Xcode's UI.

OS The version of iOS to simulate, such as 6._, or the string latest (the default) to
indicate the most recent version of iOS supported by this version of Xcode.

这是在 IDE 中抽象出来的:

For iOS, Xcode automatically switches between the iOS Simulator SDK and the device SDK, depending on where you intend to run your app. You don’t need to select these settings manually.

引用资料

关于ios - 在 Swift REPL 中使用 iphonesimulator sdk 和 macosx sdk 有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25633332/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com