Breakpoint integration of Reveal 15 and older is not compatible with Xcode 10

When integrating Reveal 15 or an older version into your iOS project using a debugger breakpoint and running your app in Xcode 10, you may see a message in the debugger console similar to this:

error: target x86_64-apple-ios10.0.0 is not supported by Reveal Server.

A similar problem occurs when integrating Reveal 17 or an older version into a tvOS app, with the following message:

error: dlopen failed for unknown reasons.

This error is caused by a change of debugger behaviour in Xcode 10, and prevents Reveal's debugger commands from recognising the target architecture as a valid one, thus stopping breakpoint integration from working. The issue has been fixed since Reveal 16 for iOS and Reveal 18 for tvOS. However, if you can't update to the latest version, try one of the following workarounds:

  • In the UIApplicationMain symbolic breakpoint that you've created as part of breakpoint integration steps, replace reveal load command with a manual library loading command:

    expr (Class)NSClassFromString(@"IBARevealLoader") == nil ? (void *)dlopen("/Applications/Reveal.app/Contents/SharedSupport/iOS-Libraries/RevealServer.framework/RevealServer", 0x2) : ((void*)0)

    • This workaround only works when inspecting apps running in the Simulator – it doesn't replicate the full functionality of reveal load command.
    • This command assumes you have Reveal installed at /Applications/Reveal.app – please modify it otherwise.
    • If you're inspecting tvOS apps, you'll need to change iOS-Libraries with tvOS-Libraries in the loading path.
  • Use a different integration method: using CocoaPods or via manual linking.

  • Or follow the steps outlined below to install the fixed version of the debugger support script.

Installing Xcode 10-compatible debugger commands

  • Download and unarchive the RevealServerCommands.py attachment – it's a modified revision of Reveal debugger support script included in the latest version of Reveal.
  • Place RevealServerCommands.py in a safe location: it could be your Documents folder for simplicity, or even ~/Library/Application Support/Reveal if you prefer.
  • If you have Reveal installed at a location other than /Applications/Reveal.app, open RevealServerCommands.py and change line 11 to include the correct installation path.
  • Open ~/.lldbinit file with a text editor. You should see a section added by Reveal when you installed debugger commands:

    ### Reveal LLDB commands support - DO NOT MODIFY
    command script import /Applications/Reveal.app/Contents/SharedSupport/Scripts/RevealServerCommands.py
    ###
  • Replace this section with one that points to the location where you've placed the modified RevealServerCommands.py, e.g.:

    ### Reveal LLDB commands support
    command script import ~/Documents/RevealServerCommands.py
    ###
    • Note that this example also removes the DO NOT MODIFY part of the comment. This stops Reveal from detecting this installation instruction and suggesting to repair it since the path is different.
  • Restart Xcode, run your app and try inspecting it with Reveal. You should see a successful Reveal loading message, e.g.:

    Loading Reveal Server from /Applications/Reveal.app/Contents/SharedSupport/iOS-Libraries/RevealServer.framework/RevealServer...
    Reveal Server was loaded successfully.

Restoring default debugger commands

If you later decide to update Reveal to the latest version (which already fixes this issue) after performing the modifications described above, please remember to follow these steps:

  • Remove the manually modified section from .lldbinit.
  • Remove the modified RevealServerCommands.py from disk.
  • Use HelpInstall Debugger Commands… menu in Reveal to restore the normal loading instructions.
  • If you've modified your UIApplicationMain symbolic breakpoint, restore its command to reveal load.

More information about Reveal Server debugger commands is available in this guide.