« Integrating Reveal / Dynamic Loading

Load Reveal Without Changing Your Xcode Project

This method will only work for apps running in the iOS Simulator.

Loading Reveal without changing your Xcode project is a great way to let you introspect any iOS project you happen to be working on without needing to change anything. It also means you don’t need to worry about accidentally shipping a release build of your app linked with the Reveal library.

  1. Open your iOS project in Xcode, and select View → Navigators → Show Breakpoint Navigator.
  2. In the bottom left of the pane, click the + button and select Add Symbolic Breakpoint.

    Adding Symbolic Breakpoint to Xcode project

  3. Enter UIApplicationMain into the Symbol field.

  4. Click the Add Action button, and ensure that Action is set to Debugger Command.
  5. Copy and paste the following text into the field below:

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

    Note: Ensure that you update the path to Reveal.app on your Mac.

  6. Check Automatically continue after evaluating actions.

    Setting up Symbolic Breakpoint in Xcode project

  7. Right click the newly created breakpoint and select Move Breakpoint To → User.

    Moving the Breakpoint to the User

    You can enable and disable the breakpoint as you would any other. User breakpoints are available across all Xcode projects.

  8. In Xcode, build and run your application under the iOS Simulator.

    Reveal App Chooser showing Soundstagram

    If everything worked, you should be able to switch to Reveal and see your iOS application listed in the app selector pull-down. Select your app and verify that you can see a snapshot of the app matching what you see in the simulator.

Getting Help

If you have any problems or questions about integrating Reveal into your app, head over to our support site.