BAM

Debugging a packaged .ipa on your iOS device in OSX and Linux

Debugging a packaged app can seem like an impossible task, but iOS actually provides access to its system logs. This means that you can easily debug a packaged app with idevicesyslog, a command line tool that is part of the amazing libimobiledevice project.

Here are the steps to follow:

Step 1: Install libimobiledevice

What's so great about this project is that this library is also available in Linux, giving you access to the intricates of your iOS device. To install it, simply use the appropriate package:

++pre>++code># For OSX
brew install libimobiledevice  
# For Ubuntu
sudo apt-get install libimobiledevice  
++/code>++/pre>

Step 2: Change Lockdown Rights

If you get the error message "ERROR: Could not start service com.apple.syslog_relay." while trying to debug a packaged .ipa and understand why it's crashing, don't worry. There is a solution to this problem. You might need to change the rights to lockdown by doing sudo chmod 777 /var/db/lockdown*.

Step 3: Connect Your Device and Run idevicesyslog

After installing the package, plugin your device, run idevicesyslog, and enjoy reading crash reports :) With the idevicecrashreport <Path_to_dump_folder> command line tool, also made available by this library, you can extract and dump the device crash logs in the specified folder. This makes it easier for you to understand why your application is crashing and further improve it.

By following these steps, you should be able to debug your packaged iOS app with system logs easily and efficiently.

Conclusion

In conclusion, debugging a packaged iOS app with system logs is a straightforward process that can save you time and effort. With idevicesyslog and libimobiledevice, you have all the tools you need to identify and fix errors and improve the performance of your app.

Développeur mobile ?

Rejoins nos équipes