本文介绍了乐器总是推出用于通用自动化的通用应用程序的iPad模拟器,我如何强制它使用iPhone模拟器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用iOS 4.2和Xcode 3.2.5创建了一个通用二进制文件。我正在尝试对应用程序进行一些自动化测试,因为iPad和iPhone版本之间的界面略有不同,我有单独的UIAutomation脚本。不幸的是,无论我做什么,当我点击Instruments中的记录按钮时,它总是使用iPad模拟器启动应用程序。如何强制Instruments启动iPhone模拟器?

I've created a universal binary using iOS 4.2 and Xcode 3.2.5. I'm trying to do some automation testing on the application and since the interfaces are slightly different between the iPad and iPhone versions, I have separate UIAutomation scripts. Unfortunately, no matter what I do, when I click the record button in Instruments, it always starts the application using the iPad simulator. How can I force Instruments to launch the iPhone simulator?

通用应用程序在所有3个模拟设备(iPhone,iPhone(Retina)和iPad)的模拟器中运行良好。我可以通过Xcode管理Active Executable,并且Build and Run / Debug工作正常,使用指定的模拟器正确。当我启动Instruments时,我选择iOS模拟器>全部>自动化,然后为iPhone选择我的自动化脚本,然后将目标设置为project-name / build / Debug-iphonesimulator / project-name。

The universal app runs fine in the simulator for all 3 simulated devices (iPhone, iPhone (Retina), and iPad). I can govern the Active Executable via Xcode and "Build and Run/Debug" works fine, correctly using the simulator specified. When I launch Instruments I'm choosing iOS Simulator > All > Automation, then selecting my automation script for the iPhone and then setting the target as project-name/build/Debug-iphonesimulator/project-name.

推荐答案

根本不需要乱用你的应用程序:乐器允许你选择是否使用iPhone或iPad模拟器。假设您已经选择了自己的应用:

No need to mess around with your app at all: Instruments allows you to select whether to use the iPhone or iPad simulator. Assuming you've already selected your app:


  1. 点击目标选择器(当前显示您的应用名称)。

  2. 单击编辑活动目标

  3. 在底部附近,单击选项下拉列表。

  4. 在列表底部,您可以选择模拟器配置。

  1. Click the Target selector (currently displaying your app name).
  2. Click "Edit Active Target"
  3. Near the bottom, click the "Options" drop down.
  4. At the bottom of the list, you can select the "Simulator Configuration".

这篇关于乐器总是推出用于通用自动化的通用应用程序的iPad模拟器,我如何强制它使用iPhone模拟器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-25 06:02