« Integrating Reveal

Static Linking

Integrating Reveal's static library into your iOS application is the quickest and easiest way to enable Reveal introspection.

WARNING: Never ship a product which has been linked with the Reveal library. The instructions below outline a way to use build configurations to isolate linking the Reveal static library to Debug builds.

  1. Open your iOS project in Xcode.

  2. Launch Reveal and select either "iOS Library" or "tvOS Library" from the Help → Show Reveal Library in Finder menu. This will open a Finder window with the appropriate framework selected.

    Show Reveal Library in Finder

  3. Drag Reveal.framework (or Reveal-tvOS.framework for tvOS projects) into the Project Navigator panel of your project in Xcode.

    Drag Reveal framework to project

  4. In the Add to targets dialog that is shown, select all targets you want to integrate with. Optionally, select Copy items if needed to copy Reveal.framework into your project — if you do, you'll need to remember to update this library whenever Reveal is updated by following the previous steps again.

    Copy resource to project dialog

  5. Click Finish.

  6. In Xcode's Project Navigator, select your project then do the following for each target that you wish to use with Reveal:

  7. Select the Build Phases tab and remove Reveal.framework/Reveal-tvOS.framework from the Link Binary With Libraries section if it is present.

    Remove Reveal framework from target

    • Select the Build Settings tab and add the following to the Debug configuration of the Other Linker Flags setting:

      For iOS projects:

        -ObjC -lz -framework Reveal

      For tvOS projects:

        -ObjC -lz -framework Reveal-tvOS

      Add linker flags to target

  8. If you are using Xcode 7, you will need to ensure that the directory containing Reveal.framework is in your project's "Framework Search Paths". Your Framework Search Paths should look something like:

    For iOS projects:

     FRAMEWORK_SEARCH_PATHS = $(inherited) "$(SYSTEM_APPS_DIR)/Reveal.app/Contents/SharedSupport/iOS-Libraries"

    For tvOS projects:

     FRAMEWORK_SEARCH_PATHS = $(inherited) "$(SYSTEM_APPS_DIR)/Reveal.app/Contents/SharedSupport/tvOS-Libraries"

    Add framework search paths

  9. In Xcode, build and run your application using a scheme that is set to use the Debug configuration. If you are running your iOS or tvOS application on a device, ensure that it is on the same Wi-Fi network as Mac running Reveal.

    Reveal App Chooser showing Soundstagram

    If everything worked, you should be able to switch to Reveal and see your iOS or tvOS 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 (or device).

  10. Run your application again, this time using a scheme set to use the Release configuration. Verify that Reveal cannot connect to your application. If you can still connect, check to make sure Reveal.framework or Reveal-tvOS.framework is not listed in the Link Binary With Libraries section of the Build Phases tab.

No code needs to be added, nor any headers imported for Reveal integration. The library will load automatically at launch and start the necessary Reveal services within your app.

If you'd like more control of the integration you should read the dynamic loading integration instructions.

Getting Help

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