App testing on iPhone, where is the crash log? - ios

I was finally able to put the app on my phone to test it but soon as I open the app, it crashes..It is written in swift. Is it even compatible on the iPhone yet? I'm currently running 7.0.4. Also is there any where I can access the crash logs? I tried to look in Devices -> Device logs, but didn't see my app in the logs.
Has anyone been able to get it working on their phone and how?
I made my own certificates and editted the info.plist to get it through xCode without dev account..but I don't think that matters

you can get crash logs using iPhone configuration utility application.
you can download it from here : http://support.apple.com/kb/dl1465

You can get the crash reports using the Xcode organizer.
Connect the device.
Open the Xcode organizer.
Select the devices tab (Xcode 5.1)
Select Devices Logs under the device.
This will also trigger the symbolication process of the crash reports, so you should see your class names, methods, filenames and line numbers a few seconds after selecting a crash report.
The top level Device Logs item will only show the crash reports of your devices, once you did the above steps to get the organizer to import the crash reports from a device.

Related

iPhone 7 device logs won't show up in the debugger in Xcode

When building and running my app from Xcode on our iPhone 7's, I can't get the logs to show up in the debugging area. I've tested both mine and my wife's iPhone 7's. It's completely blank. They show up for other devices (iPhone 5, iPad, etc.) and for the simulators but not for the 7's.
When I view logs in Window > Devices > (select device), or in the system's Console, I also don't see logs for my app. There's only references to the app from symptomsd, etc. But no process even appears with my apps name.
It seems there is some incompatibility between my app and these specific devices. I've been using and updating the same app since around 2012 so maybe there is some sort of cruft in there that is blocking logs on these very latest devices.
Things I've tried:
Building and running other apps (logs show up)
Testing other devices (logs show)
Re-powering iPhone and restarting Xcode
Setting a breakpoint and running a command in the debugger (I got response from that command)
Any other steps to try would be appreciated.
You can use alsodump to log. You may try this, maybe this one works. What may help you:
1. Create new building scheme.
2. Try running it on simulator. Use many iOS versions. Maybe the latest one have a bug.
3. Remove Derived data in this project.

How do I view crash reason in iTunes Connect?

Is there any way to get crash information in iTunes Connect? I notice under App Analytics it displays the number of "Opt-in Only Crashes". I press the number under it (in my case 2). This takes me to a page that only seems to show the days that the crash happened. Is there any way I can see useful crash information, for example line of code, etc.?
To see where is the problem just open your Xcode > Window > Organizer > Crashes from your Application.
You already deployed your app on App Store (or as an Ad Hoc or Enterprise build) then you won't be able to attach Xcode's debugger to deployed app for debugging. To debug problems, you need to analyze Crash Logs and Console output from the device. To read crash reports with backtraces its need to be symbolicated before they can be analyzed. Symbolication is a process which replaces memory addresses with human-readable function names and line numbers.
To understanding and Analyzing Application Crash Reports you can refer Symbolicating Crash Reports, Debugging Deployed iOS Apps or Analyzing Crash Reports.
Overview of the crash reporting and symbolication process.
Set Debug Information Format (DEBUG_INFORMATION_FORMAT) in build settings these debug symbols are stored inside the binary or in a companion Debug Symbol (dSYM) file.
When you archive the application for distribution, Xcode will gather the application binary along with the .dSYM file and store them at a location inside your home folder.
At the time of deploying on the App Store or a beta test using Test Flight, include the dSYM file when uploading your archive to iTunes Connect.
When your application crashes, an unsymbolicated crash report is created and stored on the device.
You can retrieve crash reports directly from their device by following the steps in Debugging Deployed iOS Apps. If you have distributed your application via AdHoc or Enterprise distribution, this is the only way to acquire crash reports from your users.
Crash reports retrieved from a device are unsymbolicated and will need to be symbolicated using Xcode. Xcode uses the dSYM file associated with your application binary to replace each address in the backtrace with its originating location in your source code. The result is a symbolicated crash report.
If the user has opted to share diagnostic data with Apple, or if the user has installed a beta version of your application through TestFlight, the crash report is uploaded to the App Store.
The App Store symbolicates the crash report and groups it with similar crash reports. This aggregate of similar crash reports is called a Crash Point.
The symbolicated crash reports are made available to you in Xcode's Crashes organizer.
Yes, You can view those crashes in Xcode. This can found in apple docs in Analyzing crash reports

How can I debug an iOS app executed in mobile not launched by Xcode?

I am developing an application for iOS in Objective C with Xcode. This application schedules local push notifications every 6 hours and it is crashing when I open the push notifications.
I need to debug the error to solve it. I can have the mobile connected to Xcode, but as the app is executed from local push notification I can't see the error messages on my Xcode debug console, as I haven't launched my app from Xcode.
Is there a way to have the iOS device connected to my Mac and see what error is happening?
I know that I can go to the mobile settings to view logs, but these logs are too ambigous for me aren't giving any error.
In addition to opening the console log as described by #saurabhgoyal you can tell Xcode to wait for your app to launch and then attach the debugger to it when it does.
Select the scheme you're using to build your app, select edit scheme, and click on the run icon. Then Look for a pair of radio buttons titled "Launch" and select the one with the name "Wait for executable to be launched."
Then when you run your app in Xcode it builds it and installs it on the device but does not launch it.
When your notification fires and the app launches the debugger attaches to your app and you can debug as normal (except that NSLog statements don't print to the debug console any more - an annoyance.)
Yes there is a way to see device logs on Mac.
Connect your iOS device to the Mac system using USB
Launch Xcode–>Window–>Devices
Select your device from the left panel
Now you can see the logs on the screen including the background activities.
In order to save the running logs.
Reproduce the issue or start working on your device on a the app you wanted to capture the logs. After the issue is reproduced click on the Save Console icon bottom right corner Xcode screen
For more details please visit this link
Hope this Helps!
Check your crash log
1.Launch Xcode on your desktop machine.
2.Open the Xcode Devices window. (Window menu -> Devices and Simulators, or Cmd-Shift-2.)
3.Find your device in the left sidebar, then select “device logs”.
Choose a Chrome crash (or multiple crashes) and select “Export” at the bottom of the Organizer window.

Xcode crash Logs not appearing

I have an iOS app that is only crashing with the client on iOS8.0
At first I tried to install iOS simulator8.0 on my xcode7.0, OS X El Capitan to test the code but, facing some issues, I dropped the case
Now, what I am trying to do is get the crash log from xcode's organizer, but weird things are happening:
I am logged in xcode with my iTunes account
The app had the checkbox on for "Include app symbols for your application…" when uploading it to testflight, BUT the build details in iTunes Connect shows "Includes Symbols: NO"
The organizer does not show every versions of the app on iTunes Connect, although we can see all the versions and build numbers from my colleague's xcode.
Organizer doesn't show all the crash log of the app of the given build number although I can see some crashes on different builds (On the other hand, my colleague can not see any crash log happening on the app for the current version and for all the previous versions)
Can anyone help me on any (or both) of the issues? Thanks
NB: I want to avoid to ask the client to send me his device's crash logs. Although one time I asked a client for the crash log from the device and there wasn't any crash registered on the device
The reason you and your colleague do not see the same crash logs is likely
because your colleague is assigned a lesser role in your team.
(Say you are admin and he's technical)
Can't help with the Includes Symbols: NO issue cause I have
debug symbols stripping set to NO for both debug an release targets
and yet I see the exact same issue (Includes Symbols: NO in itc).
Apple just does not like to symbolicate I guess...

crittercism - Not possible see my console crash log in xcode

How can I do to see the log of the crash in Xcode?, because when I have active the crittercism, with debugger mode, can not see the console log, always if I want to use xcode debugger, I need to disable crittercism and I think that is wrong.
Crittercism is right, it sends the report to the web service when open the app, but if I have the device connect to xcode, I can not see in the reports of the crash and crittercism does not send it to the web it.
I do not know if something is missing, exist something like a line that I need to add for this start to work ?
I've used Crittercism extensively for iOS and Android.
You should be able to see your Crash Logs in both Xcode as well as
within the Crittercism platform when your device is connected to Xcode.
Also, be sure you've configured your app for automatic symbolication.
see this article.

Resources