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

孤人 提交于 2019-11-27 14:17:23

问题


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

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


回答1:


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).

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.




回答2:


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!



来源:https://stackoverflow.com/questions/33287929/what-is-generic-ios-device-in-xcode-7-1-run-destinations-list

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!