Device logs not appearing in Xcode - ios

I have some crash logs which I am able to see in the iPad when I go to Settings->About->Diagnostics & Usage ->Diagnostics & Usage Data. But when I connect my iPad to the my computer and click Xcode->Window->Organizer->My Device Name, I am not able to see the logs at all. What might have been the issue? Any idea.

Better Method to take device logs:
~/Library/Logs/CrashReporter/MobileDevice/<your iPhone’s name>/

The device logs are now contained in SQLite databases in this folder:
~/Library/Developer/Xcode/iOS Device Logs
Clear that out and take control of your CPU from Xcode again! Once its cleared out then maybe you'll get it to show the one you want if to perform the crash again.

Related

app works well in simulator,But crash in iphone

I had developering an audioQueue Program. It's works well either simulator or iphone with xcode.
But if i lanch the app in my iphone independently,the app wil crash after 20s.
I can't get any debug information! Can anyone lead me a way to solve the problem?
You should be able to retrieve crash logs by connecting your phone to iTunes on a mac and syncing it. Then in Finder choose Go > Go to folder and type /Library/Logs/CrashReporter/MobileDevice/<your phone name>/
There should be a list of files named after your apps

App Keeps Respringing When Launched

For some reason, whenever I try to run any app created in Xcode (even brand new ones), something happened (?) and now Springboard takes up a ridiculous amount of CPU until it launches. Once it's launched it's fine, but until then it will often respring if there's not enough memory. It runs fine in the Sim, just not on the physical phone. No clue why. I can provide logs or info, I'm just not sure what to put here; I've looked at most logs etc.
Where do you want to run the app? On a real device or in the Simulator? If you're using a real device, unplug it, open /Library/Developer/Xcode/iOS DeviceSupport and delete the folder with the iOS version of your device. After that, reconnect it. Does that help?
Also, please provide any logs you get and information about your system versions, devices and the Xcode version.

Is it possible to test ready ipa file by instruments

I have an application built in IPA file by Adobe Flashbuilder (with AIR) the app works smoothly on iPad. Well.. worked smoothly until I had encountered some memory leaks. Is it possible to monitor this application's memory usage with Apple's Instruments?
For now I am deploying this app by dragging IPA file into iTunes and synchronize then.
I need to monitor this app. Is it possible? What should be eventually done to make it working?
Yes. you can analyse using instruments.
Install your app in your device.
Connect your device to your Mac.
Open Instruments and select Leaks (you can select any option infact, like Allocations etc.,) in the dialog that appears.
In the Top Left corner, you will see "Choose Target". the first two options are your device and your Mac. Select your device.
In the same menu, the 5th option is again "Choose Target". There you will see all the installed applications in your device. Select the app you want to analyse.
Finally, Press Record, and you will see your app running in the device and Leaks/Allocations (whatever you have selected) being shown in the instruments.
Hope this helps you.
Try running Instruments and select an installed app on your device, if you get this message, you know what's happening
Target failed to run: Permission to debug com.fantageek.MyApp was
denied. The app must be signed with a development identity (e.g. iOS
Developer).
I believe it's possible through the Xcode organiser. It outputs events happening on the device to a log. Don't quote me on that though

How can we print the contents of GDB or log statements on the device(iPad)

This question might be a bit strange and i apologize for that... i have rather a strange problem with my iPad app. My app is running absolutely fine when i connect the device to my system and run the app. But,it is getting crashed repeatedly once i try to use the app after disconnecting it from my system. This is very strange to me. I am unable to even debug this because of this strange issue. i need at least GDB log to debug my code.So, is there any way in which i can print my GDB log on my device(iPad)... At least is there any other way in which i can solve this strange issue...
Is it crashing while you are debugging and then disconnect the device. If you disconnect your device while debugging, the app will stop on your device and you need to reopen it to continue using it on the device.
If you want the Logs stored on your device, connect your device to your Mac and in Xcode go to Window -> Organiser. Select the Devices Tab and on the left should be your Device and an option to view the Device Logs which should get you the same Crash Logs you get in the Debugger Output window. Xcode will Symbolise them if it can so you should be able to debug the issue. It will also show Crash Logs for Applications you do not develop but those will not be Symbolised so won't make much sense.
Alternatively, if you choose the Console option you'll be able to see the Console output which will show all your NSLog outputs. It will also have some Device Specific output which you can ignore.
Use NSLog(), you can read the resulting console entries in the Xcode organiser after connecting the device via USB:

Is there a way to view console output when testing an app on an ipad?

I am trying to debug an app I have made which uses an accessory which goes into the connector slot. Therefore, if I want to test the app with the accessory, I cannot connect the iPad to my computer at the same time. Some issues are arising and it would be nice to get some sort of feedback as to what is happening but without the connection to xcode I am blind.
Any help would be appreciated.
When not connected to the debugger, your NSLog-ed messages go to device's console which you can see when you connect the device later and click on it's console tab in Xcode organizer.

Resources