Krumelur
Krumelur

Reputation: 33048

How can I use Instruments Automation in the iOS Simulator? It cannot attach or find iOS Simulator

How can I attach to an application currently running in iOS Simulator 6, or start an application using Automation in Xcode Instruments? I'm using Xcode 4.5. I see my app is running in the Simulator. If I launch Instruments, I select the "iOS Simulator -> Automation" template. However, the drop down on top tells me under "Attach to process" that "Current Instrumentation disallows attach" and when using "Choose target", I'm presented a list of Apps from my Applications folder, but none of them is iOS Simulator, since it is inside the Xcode.app bundle. It is working just fine on the device.

Any ideas?

Upvotes: 0

Views: 3055

Answers (1)

Terry Westley
Terry Westley

Reputation: 126

"Attach to process" gives me the same result: "Current Instrumentation disallows attach." So I can't answer that part of your question.

To run your app in simulator from Instruments:

  • Be sure your mac is selected in the "Choose target" drop-down
  • In the Choose target drop-down, select Choose target -> Choose target
    • You will see that list of apps in your application folder -- you got this far
  • Now click the down-pointing triangle next to Applications to close Applications folder or simply scroll down farther to reveal the rest of the top-level folders on your mac
  • Browse to your app
    • Find it in a path like this: /Users/YOUR-USER-NAME/Library/Application Support/iPhone Simulator/5/Applications/GUID/YOUR-APP-NAME
    • Oddly, the file browser does not display folder "extensions," so iOS version 5.0 and 5.1 both show up as "5" in the folder list

Upvotes: 5

Related Questions