tvOS installation and configuration

Follow these instructions to install and configure the iOS agent.


tvOS apps using Cocoapods have separate installation procedures.

Installing your tvOS application

As part of the installation process, New Relic automatically generates an application token. This is a 40-character hexadecimal string for authenticating each mobile app you monitor.

For Admins with existing New Relic accounts, follow these steps to install and configure your application. (If you don't have a New Relic account, signup at—it's free, forever.)

  1. Go to > Mobile.
  2. If applicable: From the Mobile Apps list, select Add a new app
  3. From the Get Started page, select tvOS as the platform for mobile monitoring.
  4. Type a name for your mobile app, and select Continue.

Configuring your tvOS application

These procedures to configure your tvOS app are also available on the Get Started page in the mobile monitoring UI.

  1. Download and unzip the tvOS SDK.

  2. To add the New Relic tvOS Mobile Framework to your Xcode project: Use Finder to drag the NewRelicAgentTVOS.framework folder into your Xcode project, and drop it onto your Project in the Project Navigator window.

  3. Follow the prompts to copy items into destination and to create folder references.

  4. Add the SystemConfiguration.framework, libc++.tbd, and libz.tbd libraries to your Linker settings.

  5. To start the agent: Import the tvOS agent header at the top of your prefix.pch.

  6. Add +[NewRelic startWithApplicationToken:<appToken>] to the top of -application:didFinishLaunchingWithOptions: in your AppDelegate.m using the unique application token that is automatically generated.

  7. Add a build script to your target's Build Phases and paste the following, replacing PUT_NEW_RELIC_APP_TOKEN_HERE with your application token:

    SCRIPT=`/usr/bin/find "${SRCROOT}" -name | head -n 1`
  8. Clean and build your app, and then run it in the simulator or other device.

Within a few minutes you will begin to see data for your iOS app: Go to > Mobile > (select an app). If you don't, see No data appears.

Executing a demo crash (optional)

If you have trouble getting your app to crash, the New Relic agent provides an API to execute a demo crash.

Recommendation: Add one of these lines of code to a button click event handler as applicable:

[NewRelic crashNow];


[NewRelic crashNow:@"<reason>"];

Changing the logging level (optional)

By default the New Relic agent will log at the info level. Increasing the log level to verbose or higher priority is only encouraged for debugging and not for release builds. Verbose level or higher priority will log all API interactions with the New Relic server.

Six log levels are available for mobile monitoring:

  • none
  • error
  • warning
  • info
  • verbose
  • ALL

To increase your logging level in the app, add this method call before calling startWithApplicationToken:

[NRLogger setLogLevels:NRLogLevelALL];