Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 5.1 only 64-bit simulator in instruments

Tags:

ios

xcode5.1

I just updated my xcode to 5.1... Installed all the simulators i needed (6, 7, 7.1 ) and can happily debug in each one.

However, the profiler now always starts the 64-bit retina 7.1 iphone simulator. Tried with time profiler, allocations, zombies, same exact simulator. Tried to switch it in the simulator's own menu, tried to restart instruments, xcode, nothing works. The "Profile" scheme has ticked the "Use the Run action's arguments", but doesn't happen anything. Also, didn't change manually anything in the project's settings before or after the update.

Is there a workaround or fix for this issue ?

Any response much appreciated!

like image 700
Templar Avatar asked Mar 17 '14 15:03

Templar


2 Answers

There is a way to avoid using the command line here. Do your "Profile" step from Xcode as you normally would, but choose the "Target" pulldown, head to "Options", and choose a different "Simulator Configuration" to match the version you'd like.

enter image description here

Then, just use the Library to drag over whatever things you'd like to measure that match any of the predefined sets (and even add more). Then hit Record and off you go. In past experience, sometimes I had to quit the simulator if it was already open, but not sure if that's necessary now.

like image 170
Scott Corscadden Avatar answered Sep 18 '22 11:09

Scott Corscadden


I have the same problem as I wanted to profile against the iPhone Retina 3.5-inch simulator. As a workaround I used Instruments from the command line:

instruments -t $InstrumentsTemplate  -w "iPhone Retina (3.5-inch) - Simulator - iOS 7.1" $AppLocation

where $InstrumentsTemplate is the path to the profiling template you want to use with Instruments and in my case was:

Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/Resources/templates/Time Profiler.tracetemplate

and $AppLocation is the path to the app you want to profile and looks like this:

~/Library/Application Support/iPhone Simulator/7.1/Applications/658FE3GB-49B6-48F5-B6A6-0D1C8D1F6BFD/AppName.app

To see a list of all Instruments templates that you can pass with -t use:

instruments -s

To see a list of all available simulators that you can pass with -w use:

instruments -s devices

Hope this helps.

like image 31
Dan Marinescu Avatar answered Sep 18 '22 11:09

Dan Marinescu