I'm getting this message in my logs.
"Not saving crash log because we have reached the limit for logs to store on disk. Sync or otherwise clear logs from /var/mobile/Library/Logs/CrashReporter to save new log
I assume this refers to the device as I have deleted the crashreports in XCode.
How can I delete iOS crash reporter logs off the device?
Disconnect your device and close Xcode.
On your dev machine you should look in:
/Users/%username%/Library/Logs/CrashReporter/MobileDevice/%devicename%
Move all reports to the Trash and then sync your device with iTunes. That should remove the logs from the device.
The directory /var/mobile/Library/Logs/CrashReporter is the one in your iOS device, instead of your Mac OS X/Windows computer. The directory ~/Library/Logs/CrashReporter/MobileDevice mentioned by another answer, could be simply removed by using Xcode Devices (shortcut in Xcode: command+shift+2)
So if your want to remove iOS device crashlogs, you need to get into that dir. If you jailbreaked your iOS device, you could ssh to your iOS device with default password alpine (if you did not change it)
ssh root#x.x.x.x
x.x.x.x is the IP address of your iOS device.
after you sshed to your iOS device, Now you could remove all files/directories in it to free some space:
cd /var/mobile/Library/Logs/CrashReporter
rm -rf *
Syncing your device through iTunes will remove the logs from your device.
To delete crash logs on iOS device.
In Xcode, Devices window, with device selected, click View Device Logs button.
A modal window pops up listing all logs in left pane, and selected log contents in right pane.
Click top log item in left pane.
Scroll to bottom of log list.
Shift-Click on log item at bottom of list. All log items will be selected.
Press Delete key.
Confirmation dialog box appears.
Confirm deletion in dialog box.
Done!
Related
I trying use Over The Air (OTA) iOS IPA File Distribution to install IPA file for iphone but it have error.
So that I need get log from when I click the install link to the dialog error show.
Please show me the tool or a method to get log install.
System logs show info about installation process. To see operating system logs from device you should connect you iphone/ipad to your computer. Then choose in XCode Window > Devices, and select you connected device from list on the left. If console with logs is hidden you can open it by clicking this icon:
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.
I need to export .realm from Documents folder on real iOS device. Since iOS 8.3 Apple has disabled direct access to device's Documents folder how can I do that. For example I can send it by email, but is there any easier way?
You can download a device's container for your app from Xcode's "Devices" window with the following steps:
Connect your device to your Mac.
In the Devices window under Devices, select your device.
Under Installed Apps, select the app from the list.
From the Action menu (the gear icon), choose a menu item:
Show Container. A dialog shows the file contents of the container.
Download Container. In the dialog that appears, enter a location and click Save. The saved file will have a .xcappdata extension.
Replace Container. In the dialog that appears, select a file with a .xcappdata extension, and click Open.
Source: https://developer.apple.com/library/ios/recipes/xcode_help-devices_organizer/articles/manage_containers.html
You can still get to the Documents folder on a simulator. To find the folder of the simulator you're running on, first type the following in Terminal:
xcrun simctl list
And note the UUID of the simulator you're currently using.
Then navigate to ~/Library/Developer/CoreSimulator/Devices/<Simulator UUID>/data/Containers/Data/Application/<Application UUID>/Documents/.
You could also, in your app's code somewhere, get the path of your app's Document's folder and print it to the console with NSLog. Then copy the path, switch to Finder and press Shift-Cmd-G. Paste the path into the Finder field and it will take to your Documents folder.
Using Xcode 3.2.5. I recently connected a coworkers iPhone to my mac to try to install a test build for him to test. After that, I cannot remove his device from my Xcode Organizer. Removing the device will remove it from the device list, but a few minutes later it comes right back without me doing anything.
From another question I found this plist file, and tried manually removing the corresponding entry from it. This doesn't work either. When the device comes back in the Xcode Organizer, it is also re-populated in this plist file:
/Users/kyleh/Library/Preferences/com.apple.Xcode.plist
The entry is under XCKnownRemoteComputers
This is more than just me nit-picking. Sometimes Xcode Organizer will also pop up a warning message when the device is automatically added back. The warning message says "Could not connect to the device." It's a modal dialog box, so I have to click OK in order to continue using the Organizer.
Perhaps you have device logs in the special sub-folder where XCode keeps them:
~/Library/Logs/CrashReporter/MobileDevice/
Xcode may be having trouble deleting them.
You might also try repairing permissions on your Mac with the Disk Utility.
there is just shortly some popup telling "symbolicating crash_XYZ",
but when it disappears, the list in "Device Logs"-tab of the XCode organizer
is empty again.
How to get the list of crashes back?
Reboot (iPhone),
Re-Sync (iTunes) did not help
if your organizer, choose “Devices” on top.
Below, in the left sidebar, you have the “Library” section and the “Devices” section.
In the Library, you should see “devices logs” where you will find all the logs (including crash logs) of all the devices you connected to your mac.
In the Devices, you can click on a device to see its specific logs.
I'm having the same problem, this is what I did: It's a kludge but you can copy crash logs from Settings.app under General > About > Diagnostics & Usage and paste into an email to yourself.