有没有办法用iOS 9.3测试我的Xcode 7.2编译的应用程序? [英] Is there a way to test my Xcode 7.2-compiled app with iOS 9.3?

查看:72
本文介绍了有没有办法用iOS 9.3测试我的Xcode 7.2编译的应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在测试设备上安装了iOS 9.3 beta,因为我正在运行一些9.3编译的应用程序,但我还有一个用Xcode 7.2编译的旧应用程序。我可以轻松地在任何iOS 9.2设备上运行该应用程序,但如果我尝试在一个iOS 9.3 beta设备上运行它,我会收到找不到Developer Disk Image错误。

I have the iOS 9.3 beta installed on a testing device as I'm running a few 9.3-compiled apps, but I also have an old app that is compiled in Xcode 7.2. I can run the app on any iOS 9.2 device with ease, but if I try to run it on the one iOS 9.3 beta device, I get the "could not find Developer Disk Image" error.

Xcode 7.3包含对Swift的一些更新,所以我必须更改我的大量文件,而我只想测试它是否正常工作。有没有办法做到这一点,而无需更改很多Swift代码?它是在针对9.2编译的App Store上,我可以在我的9.3设备上运行它,所以我不明白它为什么这么难。

Xcode 7.3 includes some updates to Swift, so I'd have to change a great deal of my files, and I just want to test to see if it's working fine. Is there any way to do this without having to change a lot of Swift code? It's on the App Store compiled for 9.2 and I can run it on my 9.3 device, so I don't understand why it's so difficult.

推荐答案

如果您想避免Xcode的测试版可能会改变您的原始项目,只需制作项目的副本,然后在测试版中打开它。如果你有一个在Swift 2.1.1(Xcode 7.2)中运行的应用程序,与Swift 2.2(Xcode 7.3)的差异非常适中。如果您使用副本执行此操作,则可以确信您的原始项目不会被更改。

If you want to avoid the beta version of Xcode from potentially altering your original project, just make a copy of the project and then just open it up in the beta version. If you have an app running in Swift 2.1.1 (Xcode 7.2), the differences to Swift 2.2 (Xcode 7.3) are pretty modest. And if you do this with a copy, you can be confident that your original project won't be altered.

如果您因某些原因不想这样做您可以在运行iOS版测试版的设备上安装Xcode的生产版本中的应用程序:

If you don't want to do that for some reason you can install apps from a production version of Xcode on a device running a beta version of iOS:


  1. 首先,您要确保您在测试版iOS设备上安装了配置文件。最简单的方法是在测试设备上运行一些来自beta Xcode的Hello World应用程序。如果系统提示您在您的设备上添加团队/个人资料,则应该像往常一样继续这样做。

  1. First, you want to make sure you have the profiles installed on your beta iOS device. The easiest way to do this is to run some "Hello World" app on your beta device from the beta Xcode. If prompted to add a team/profile onto your device, you should go ahead and do so, like usual.

退出测试版Xcode并启动生产Xcode并打开要安装的应用程序的项目。选择通用iOS设备,在跳转栏中选择活动方案,然后构建应用程序。然后,您应该在Project Navigator树中的 Products 文件夹中看到 .app 文件(不是红色)在左侧面板中。

Quit the beta Xcode and start the production Xcode and open the project for the app you want to install. Select "Generic iOS Device" where you choose the active scheme in jump bar and then build the app. You should then see the .app file (not in red) in the Products folder in the "Project Navigator" tree in the left panel.

通过打开设备窗口在设备上安装应用程序( shift + 命令 + 2 )并选择有问题的设备。在右侧面板中(如果您也显示控制台,也可以在右上方面板中),您将找到已安装的应用程序部分。只需将Products文件夹中的 .app 文件拖到此已安装的应用程序部分。

Install the app on the device by opening the devices window (shift+command+2) and selecting the device in question. In the right panel (or top right panel if you're showing the console, too), you'll find a "Installed Apps" section. Just drag the .app file from the Products folder into this installed apps section.

显然,如果您要安装其他应用,可以重复步骤2和3视情况而定。

Clearly, if you have other apps you want to install, you can just repeat steps 2 and 3 as appropriate.

在设备上安装应用程序的方法有很多种,但我觉得这对于设备安装的一次性安装来说是最简单的方法在我前面。如果以这种方式执行此操作,您将无法进行调试,但您至少可以启动它,按照其步调运行它,查看设备控制台以获取您可能的任何调试消息 NSLog 'ing,等等。

There are a bunch of different ways to install an app on a device, but I find this is the easiest for one-off installs with a device sitting in front of me. You won't be able to debug if you do it this way, but you can at least fire it up, run it through its paces, watch the device console for any debugging messages you may be NSLog'ing, etc.

这篇关于有没有办法用iOS 9.3测试我的Xcode 7.2编译的应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆