Cant launch iOS app with Instruments on device - iphone

App installs, Instruments launch, but drop down in instruments says select target, and the app never launches. Console says
6/14/11 2:36:22 PM Instruments[1951] XRMobileDeviceException while performing application lookup on device : (null)
Device is iOS 4.3.3, regular build and run works and no warnings from Xcode. Profile just doesnt work. Tried cleaning the build, restarting Mac OS and the device. Still no go!

I had the same problem. I didn't solve it, but an easy workaround is to launch the app yourself and then attach to it from the Attach to Process... command in the Target menu in the Instruments window.

I had the same problem, my solution was to initiate instruments from XCODE.
Xcode 11:
Run the app on simulator
Open Debug Navigation (Command + 7)
Click on cpu
Click on “Profile in Instruments”
Xcode 3.2.5
Launch XCODE
Select Device, or Simulator
Up on top Click RUN > RUN WITH PERFORMANCE TOOL > LEAKS
This allowed me to test without giving me that error.
This is in XCODE 3.2.5 that I did this in .. it might be a little different if you are using 4.x

Related

Xcode 7.1 crashes always when debugging is executed

If I set a breakpoint and start the debugging mode, Xcode tried to read the attributes and after that Xcode crashes. The position of the breakpoints in the source code has no influence. I tried following steps:
After XCode crashes:
If simulator is still running make sure to select IOS Simulator->Reset Content And Settings before closing it.
Close Simulator (CMD-Q)
Window --> Organizer --> Delete derived data
If debugging on ANY devices, delete the app from the device and REBOOT the device completely.
Launch XCode
Remove All breakpoints
Product --> (hold down Alt/option key) Clean Build Folder
Product --> Clean
Close XCode again via XCode->Quit XCode (NOTE: Must be a GRACEFUL Exit, so XCode can properly do a complete shutdown/cleanup cycle)
Reboot your Mac
Launch Xcode
If running in simulator, pick a different device to simulate than when it crashed.
Do a test run of your app (with no breakpoints)
If all goes well, start adding a breakpoints (All Exceptions is always a good starting point).
But Xcode still crashes and crashes and ...
I used Xcode 7.1 and Yosemite (I cannot update to El Capitan).
In Xcode Build Settings there is Enable Clang Module Debugging disable it.
Hope,It helps you!

Xcode 5.0.1 iOS 7.0.3 Instruments dev tool is blocked when a script capture is launched

Since i upgraded to Xcode 5.0.1 Instruments dev tool is blocked when a script capture is launched.
The same workflow is working when choosing an iso6.1 simulator.
Here are some details:
My Config:
Xcode 5.0.1
Simulator configuration: iOS7.0
SDK version: 7.0
Application deployment target : 7.0
Workflow:
1- in Xcode create a new iOS project .
2- Make sure that target is iOS7, iPhone simulator .
3- Launch the product in Instruments (Click Product ->Profile choose Automation and click Profile)
4- Click stop.
5- In Script panel click Add-> Create.
6- At the bottom of the window Click Record (Button with red dot)
Result : Instruments dev tool is blocked with message "Starting capture" and spinner.
The same workflow is working when choosing an iso6.1 simulator.
I've done re-installing XCode and still get the same problem.
Anyone else have this issue?
Who can help me to resolve this issue ?
Thanks for your help !
Have the same Issue.Could not find adequate solutions ,but you can use Instruments 5.0(Xcode 5.0) and everything will work.

App stopped running on device - ‘No such file or directory'

Initially I started building an iPhone app (App still in development stage) using Xcode 4.2, it was working fine on both device and simulator.Later, we wanted to add support for iPhone 5 (4 inch display). When I ran it on Xcode 4.5 (including Default-568h.png), it was working fine (on the simulator both 3.5 inch and 4 inch). But when i tried to run it on device, it keeps on giving me the error
"Could not launch appname.app” No such file or directory (/Users/<user>/Library/Developer/Xcode/DerivedData/appname-ffotpypmbvaguyhfvnnejhjotpbp/Build/Products/Debug-iphoneos/appname.app/appname).
I tried the following steps, but no luck :(
Deleted the app from device. Restarted the device.
Quit XCode.Trashed all folders from `DerivedData.Cleaned the project. Restarted
machine.
Set Build for active architectureto YES
Deleted Required device capabilities from -info.plist
Do I have any other options to try, or should I repeat these again and again?
The last time I had a similar issue, a normal clean wasn't enough, as it left some derived data. In Xcode, select the Product menu and hold down the option key to reveal "Clean Build Folder...", or even better, close Xcode and delete /Users/<user>/Library/Developer/Xcode/DerivedData/ entirely.

iOS - 'set start-with-shell off' issue when running iPhone application in simulator

I am getting the following error when trying to debug my iPhone application in the simulator.
Detected an attempt to call a symbol in system libraries that is not present on the iPhone:
fcntl$UNIX2003 called from function irc_connect in image KadeChat.
If you are encountering this problem running a simulator binary within gdb, make sure you 'set start-with-shell off' first.
I have done a bunch of Googling on this, and it seems that it might be a bug with the simulator. Does anyone know for sure?
I am building against the 4.2 version of the iOS SDK. Does upgrading to 4.3 fix this?
Thanks!
before this cleanAll build then
In xcode go to Project > set active executable > appname - Iphone 4.0 simulator
then open simulator then go to Hardware > version > 4.0.2
then double click urapptarget and in build tab change "ios deployment target = 4.0"
now run in simulator it will work

Why won't instruments execute my Monotouch application?

I'm trying to use Instruments to look at resource usage in my Monotouch app. However, I can't get the app to launch through Instruments.
When I hit the record button in Instruments, the app launches on my iPhone, buzzes (signifying it's a debug build), then crashes - and Instruments reports:
Target failed to run: Remote exception encountered : 'Failed to get task for pid 384'
The app runs fine when I launch it directly on the phone.
I've tried it with debug builds and ad hoc builds (using the parameters defined on the Monotouch support page). Always the same.
I'm using Monotouch 3.2.5, iOS 4.3.1 (on a 3GS), Xcode 4 and Snow Leopard.
I've see this issued mentioned in a few places around the web, but haven't seen a resolution. Anyone know how to resolve it?
It's a signing problem: to run under the control of Instruments, the app is compiled with the Release build settings, not the Debug build settings, which usually means the app is signed with your Distribution certificate instead of your Developer certificate.
The app needs to be signed with a Developer certificate for Instruments to be able to control it.
Change your signing option to Developer on the Release build and you should be fine.
I also ran into this issue with Xcode 4. What worked for me was...
From Xcode 4, run on the connected iOS device.
Launch the Instruments app manually.
Choose my template (in this case TIme Profiler).
Choose my app from the Target menu (to the right of the Record button).
Click the Record button.
The suggested Entitlements solution did not work for me (since Entitlements are evidently no longer required in Xcode 4).
The suggested signing solution did not work either. Also, it would be inconvenient to change this every time I wanted to test with Instruments.
Check your Entitlements.plist for the signed app. If get-task-allow is false, it will prevent Instruments from attaching to the process.
How about launching Instruments from inside XCode? If you're using Xcode 3, it's in the Build menu and then Run with performance tools. This will fire up Instruments and automatically start recording.