#Debugging

  1. constructor and destructor attributes

    GCC (and Clang) supports constructor and destructor attributes: __attribute__((constructor)) __attribute__((destructor))
    [Read More]
  2. State Preservation and Restoration Debug Logs

    The State Preservation and Restoration system is well documented here: Preserving Your App’s Visual Appearance Across Launches. But what is not well known is that there is a secret preference to enable debug logs.
    [Read More]
  3. Checking if Reduced Motion is enabled on iOS 7

    Apple introduced in iOS 7.0.3 a setting to reduce motion ( http://support.apple.com/kb/HT5595 ) : Settings -> General -> Accessibility -> Reduce Motion Sadly there is no public API to know if the user enabled “Reduce motion”.
    [Read More]
  4. QuickLook plugin to preview .strings files

    OS X and iOS use .strings files for localized text strings as described in the String Resources Documentation:
    [Read More]
  5. Using AddressSanitizer with Xcode 4.6.1

    Clang 3.3 now supports AddressSanitizer. Here is the description from the Clang 3.3 documentation:
    [Read More]
  6. Simple code injection using DYLD_INSERT_LIBRARIES

    In the following article I will describe a simple method to inject code into executables on Mac OS X 10.8 using the DYLD_INSERT_LIBRARIES environment variable.
    [Read More]
  7. Embedded computers in aircrafts

    I am back from vacations and had a 11 hours flight with AirAustral. On board each seat has an embedded computer. With this computer, you can watch movies, play games, …
    [Read More]
  8. Automatic Backtraces

    Here are different solutions to display automatically a backtrace when entering a specific function in your application. As an example we will take the following program. It’s a really simple program: the main function calls the function function1 which prints a string.
    [Read More]
  9. getrlimit and randomness

    To determine the maximum number of files your application can open, there is a function getrlimit() available.
    [Read More]
  10. Major issue in SimplePing

    The SimplePing sample from Apple can fail to perform a ping request (ICMP).
    [Read More]