什么是 Xcode 7.1 运行目标列表中的通用 iOS 设备?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/33287929/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 08:05:38  来源:igfitidea点击:

What is Generic iOS Device in Xcode 7.1 run destinations list?

iosxcodeios-simulator

提问by ShurupuS

I found a strange option in my simulators list in Xcode I've never seen before. Generic iOS Devicein Build Only Device

我在 Xcode 的模拟器列表中发现了一个我以前从未见过的奇怪选项。通用iOS设备只建设备

Interesting, but when I try to build for this device - I get error:

有趣,但是当我尝试为此设备构建时 - 我收到错误:

A build only device cannot be used to run this target.
Please select an available device or choose a simulated device as the destination.

Can anyone explain - for what purposes do I need this option?

谁能解释一下 - 我需要这个选项的目的是什么?

I have Xcode 7.1 and iOS 9.1

我有 Xcode 7.1 和 iOS 9.1

enter image description here

在此处输入图片说明

回答by Chris Loonam

The purpose of that target is to build for iOS devices, even if your phone is not plugged in. You can compile for iOS (armv7, armv8, arm64) architectures and see if there are any errors upon compilation, as these errors may be different than when you build for iPhone Simulator (i386 architecture).

该目标的目的是为 iOS 设备构建,即使您的手机未插入。您可以针对 iOS(armv7、armv8、arm64)架构进行编译,并在编译时查看是否有任何错误,因为这些错误可能不同与为 iPhone 模拟器(i386 架构)构建时相比。

This allows you to build (?+B) for iOS architectures, but you will not be able to run your executable on this target, as there is nothing to run the program on.

这允许您为 iOS 架构构建 ( ?+ B),但您将无法在此目标上运行您的可执行文件,因为没有任何东西可以运行该程序。

回答by rswayz

Also super-useful now: the Generic iOS Device allows you to Archive without having a device plugged in, so you can package the app and upload to iTunes Connect without needing a device!

现在也非常有用:通用 iOS 设备允许您在没有插入设备的情况下进行存档,因此您可以打包应用程序并上传到 iTunes Connect,而无需设备!