A few iPhones in my company have been updated to IOS8 and I cannot see their console using iPhone Configuration Utility 3.5 (Mavericks). I can see the console on devices with iOS7.
I really don't want to install Yosemite on another partition just to be able to view logs. Is there some other tool that will allow me to view the logs on the iPhone?
Follow the steps below,
1) Upgrade/Use Xcode 6.
2) Connect device to system.
3) Go to 'Window' menu present in Xcode menu bar.
4) Select 'Devices'.
5) Click on device name which is showing in left side pan of Devices window under "DEVICES" heading.
6) Check the right side pane of Devices window it should be showing 'Device Information', 'Installed
Apps' and below that a Device console. If you are not able to see Device console click on Up headed arrow button that is 'Show the device console' button present at bottom of window.
Related
I've seen several (e.g. question1, question2, question3) questions about viewing crash reports that don't help me. Since I'm new to Apple development, my questions sort of translates to "is this how I'm supposed to open crash reports?"
Here's what I'm doing:
Open project in Xcode (version 12.4)
Navigate to Window->Organizer and click "Crashes"
Select the release build (1.2) for which I'm trying to view crash reports
Because Xcode shows no crash reports for that particular release (I do see some for older releases), I did this:
Login to App Store Connect
Navigate to App Analytics->MyApp->Crashes
Click "Add Filter" then App Version -> 1.2
This page shows that there have been over 100 crashes for this build in the last month (and they pretty well span the whole month). I am expecting to be able to view a report for each one of these. Is that not necessarily possible?
In response to some of the SO questions I've seen, I've done this:
Navigate to TestFlight->Build 1.2-> Build Metadata to verify I have included Symbols
Navigate to Users and Access->MyAccount to verify I have admin permission and Access to Reports
Restarted Xcode
What else should I be doing?
Under the Window menu, choose "Devices and Simulators". Plug in an iPhone or iPad. Even if the logs are for Mac apps.
Click on the device you plugged in in the left column. To the right find the button "View Device Logs".
In the new window click on "All Logs". You can drag any .ips fils onto the left window to view them. You can right click on any file to symbolicate them.
All this makes me think that someone at Apple has lost their mind.
In my case the symbolicate doesn't work and the logs don't display correctly
I have just installed XCode 9 beta 3.
But I don't see an iOS 11 version under Pref, Components.
How can I setup an iOS simulator?
1) Open the Devices and Simulators window:
Window -> Devices and Simulators
2) Click the plus in the lower lefthand corner
You will see dialog to add a new simulator
3) Select a device (i.e. iPhone 7) that supports iOS 11 and click create
I had a similar issue only seeing iPhone 5 and 6 sims and not able to create / download iPhone 7 simulator with iOS11. My solution was to move Xcode 9 beta 3 from the downloads folder into the Applications folder along side xcode 8. I didn't realise it was still in the DL folder. Once launched from the Applications folder Xcode 9 beta 3 loaded with all the sims in place. Worth checking if your's is still in the downloads folder too with a previous version of Xcode in the Applications folder.
Follow these steps to add a (new) simulator
Click on Simulator icon and open simulator list.
At the end of list, there is an option to add new simulator "Add Additional Simulator". That will open 'Device & Simulator' window.
Switch to 'Simulator' tab.
There are three field in simulator tab.
Click on '+' icon, on left bottom corner of window.
Simulator Name: Enter simulator name here
Device Type: Select iPad from this dropdown list
OS Version: Select OS version from this dropdown list
Click on 'Create'
A new simulator will be added in your Simulator option list.
Look at this snapshot to understand flow of above steps:
And if there is no simulator/OS version in simulator list, you're looking for,
Click on Simulator icon and open simulator list.
At the end of list, there is an option to add new simulator "Download Simulator". That will open 'Component' window (from Xcode >> Preferences).
Select/click simulator from list, which you need to download.
Look at this snapshot:
Crash logs used to be accessible through the Settings app. I can't find that in iOS 8. Where did that go?
It's not gone now is it.
I found it. It moved, it's no longer inside General/Diagnostics... It's in Privacy/Diagnostics.
Start by opening up the Settings app.
Navigate to Settings - Privacy - Diagnostics & usage - Diagnostics &
usage Data
Tap on the crash and you will see a text field with a crash log. Long
press to Select All and then Copy the crash text.
Paste it into something you can get off of your device (for example,
an email to yourself).
If you have iOS 10.3 or later, go to Settings > Privacy, scroll down and tap Analytics. Then tap Share iPhone & Watch Analytics.
If you have iOS 10 to iOS 10.2, go to Settings > Privacy > Diagnostics & Usage and select Automatically Send or Don't Send.
Getting Crash Logs Directly From a Device Without Xcode
Your users can retrieve crash reports from their device and send them to you via email by following these instructions.
(It is not possible to get device console logs directly from a device)
1) Open Settings app
2) Go to Privacy, then Diagnostics & Usage
3) Select Diagnostics & Usage Data
4) Locate the log for the crashed app. The logs will be named in the format:
5) Select the desired log. Then, using the text selection UI select the entire text of the log. Once the text is selected, tap Copy
6) Paste the copied text to Mail and send to an email address as desired
Getting Crash Logs and Console Output From a Device Using Xcode
Even though you won't be able to run the app in Xcode's debugger, Xcode can still give you all the information you need to debug the problem.
Using Xcode 6
1) Plug in the device and open Xcode
2) Choose Window -> Devices from the menu bar
3) Under the DEVICES section in the left column, choose the device
4) To see the device console, click the up-triangle at the bottom left of the right hand panel
5) Click the down arrow on the bottom right to save the console as a file
6) To see crash logs, select the View Device Logs button under the Device Information section on the right hand panel
7) Find your app in the Process column and select the Crash log to see the contents.
8) To save a crash log, right click the entry on the left column and choose "Export Log"
9) Xcode 6 will also list low memory logs here. These will be shown with a Process name "Unknown" and Type "Unknown". You should examine the contents of these logs to determine whether any of these are caused by your app. For more information about low memory logs, see Understanding and Analyzing iOS Application Crash Reports.
Using Xcode 5
1) Plug in the device and open Xcode
2) Open the Organizer window and select the Devices tab
3) Under the DEVICES section in the left column, expand the listing for the device
4) Select Device Logs to see crash logs or select Console to see Console output
Back to Top
Enabling App Store Diagnostic Reporting
Crash logs are automatically collected from customers who have opted in to sending diagnostic and usage information to Apple.
Beginning with Xcode 6.3, crash logs from App Store customers running at least iOS 8.3 and TestFlight beta testers can be found in the Xcode Organizer. To obtain these crash logs:
1) Open the Organizer window in Xcode 6.3 and above
2) Select "Crashes" at the top. The available crash logs can then be found within this window.
The App Distribution Guide contains further information about the Crash Reporting service.
Crash reports from customers running older iOS versions may be found in iTunes Connect.
If someone is reporting a crash, and you do not see a corresponding report in iTunes Connect, you should direct them to the following knowledge base articles for Mac or for Windows so they can opt-in to sending you crash reports.
Back to Top
iOS 13.4.1
Using iPhone
Settings -> Privacy -> Analytics & Improvements -> Analytics Data -> <app_name>
Using MacOS
~/Library/Logs/CrashReporter/MobileDevice/<device_name>/<app_name>
Using Xcode
Window -> Devices and Simulators -> <device_name> -> View Device Logs -> All Logs -> <app_name>
When your app crashes, Xcode will enter the debugger and show you more information about the crash:The most important parts are:
The red arrow
The red arrow displays which line of code crashed & why it crashed.
The debugger console
Many crashes log more information to the debugger console. It should automatically appear when the app crashes, but if it’s not there, show the debugger by selecting the button in the top-right corner of Xcode, and show the console by clicking the button in the bottom-right corner of the debugger.
The stack trace
The stack trace lists the functions the program came from before it got to the code that crashed.
Part of the stack trace is displayed in the Debug Navigator on the left of the screen, and the debugger controls allow you to select a stack frame to view in the debugger:
If you enter the bt command at the (lldb) prompt in the debugger and press return , you will get a textual representation of the stack trace that you can copy and paste:
Ref:https://medium.com/#javedmultani16/finding-information-about-a-crash-ios-642902134469
I have an iPad and an iPhone. My iPhone is listed under devices in Xcode, and I'm trying to add my iPad.
Q: How do I add a device in Xcode?
Sometimes plugging in the device does not bring up the window.
In this case, from the Xcode menu, select Window and then Organizer.
Connect your device to your Mac with cable.
Open XCode
Window -> Devices & Simulators
Tap on your device
Tap to check on "Show as run destination"
Tap to check on "Connect via network"
Open Xcode. Plug in the device. Follow the prompts.
Open Xcode
Window -> Devices & Simulators
On the bottom left of the Devices window is a "+" Sign, Click on it.
Choose a connected device from the list to setup
click "Next"
when complete Click "Done"
Disconnect and Reconnect the Device
Plug your device directly into your mac, don't go through a USB hub as in my case. As soon as I went directly from iPhone to mac, it showed up.
open xcode and in the above option => "Window" click and select " Devices and simulators ". In the opened window you can see bottom left side "+" button .
click and add your device
I added my iPhone,which had the same issue, by changing my deployment target to match the OS on my phone, selecting my phone in the simulation bar (by the play stop links) and clicking the fix issue link.
Connect the device -> Open Xcode -> Click the top runner bar, select the connected device (you may need to scroll up).
I'm developing an IOS app that creates files on the device, e.g. with NSKeyedArchiver.
During Android development it's possible to browse a device filesystem when it's connected to your workstation via USB, for instance to help with troubleshooting your app.
However for IOS I don't see anything similar under the Organizer in Xcode, to help me browse files my app creates from the workstation. Googling "iOO browse device files", "iPhone view files" etc. reveals solutions for jailbroken devices but not for regular devices provisioned for development.
How can I browse files on a device created by an iOS app I'm developing?
In Xcode's Organiser, go to your device's Summary tab. Find your application in the list, and click the disclosure triangle. Under it, you should see an icon saying "Application Data". Click the down pointing arrow to download the data, and it'll prompt you for somewhere to save it.
In Xcode 5, listed under your device in Organizer, click on "Applications" and you can see "Data files in Sandbox" in the bottom half of the window.
In Xcode 6, go to Window -> Devices, select the device, select the app name under Installed Apps, click the settings gearbox, then select Download container.... In finder, double finger tap the package and select Show package contents.
In Xcode 6, open the Devices window:
Then, select the app (in Installed Apps) and then click the gear icon and select Download Container.
Pls note, that you can view contents of downloaded .xcappdata container by right click on it and select "Show Package Contents"
iExplorer works like a charm! Just used it to export some app files! http://www.macroplant.com/iexplorer/download-ie3-mac.php
In Xcode9: / Window / Devices and Simulators
Select the desired installed app, click the gear at the bottom and Download container...
In Finder, "right-click" the downloaded file and Show Package Contents to open it in a new Finder window.
I hope it's useful. Peace.
XCode version : 10.2.1
goto window -> Devices and Simulators
and after that choose your device from the left list, choose the app from the installed app, so you can press show container for show app's contains on the new page on xcode, press download container to download it to your OSX, also you can replace an old container to the moment state with Replace container...