• /
  • Log in
  • Free account
Docs

iOS SDK API

New Relic Mobile has an SDK API to customize how New Relic monitors your app. For example, use methods in the NewRelic object to send custom attributes and events for your iOS app to New Relic Insights.

Here are all the methods in this API. For more information, see the New Relic iOS SDK API guide.

crashNow (iOS SDK API)

Throws a demo run-time exception named NewRelicDemoException to test New Relic crash reporting.

currentSessionId (iOS SDK API)

Returns ID for current session.

incrementAttribute (iOS SDK API)

Increments the count of a session attribute. Overwrites previous value and type each time called.

recordBreadcrumb (iOS SDK API)

Records a MobileBreadcrumb event, useful for crash analysis.

recordCustomEvent (iOS SDK API)

Records a custom New Relic Mobile event.

recordError (iOS SDK API)

Records Swift errors and NSErrors as MobileHandledException events. Optionally takes map with additional attributes showing context.

recordHandledException (iOS SDK API)

Records a handled exception. Optionally takes map with additional attributes showing context.

recordMetric (iOS SDK API)

Record custom metrics (arbitrary numerical data).

removeAllAttributes (iOS SDK API)

Removes all attributes from the session.

removeAttribute (iOS SDK API)

Removes the specified session attribute.

setAttribute (iOS SDK API)

Creates a session-level attribute shared by multiple Mobile event types. Overwrites its previous value and type each time it is called.

setMaxEventBufferTime (iOS SDK API)

Sets the event harvest cycle length. Default is 600 seconds.

setMaxEventPoolSize (iOS SDK API)

Sets the maximum size of the event pool.

setUserId (iOS SDK API)

Set a custom user identifier value to associate user sessions with analytics events and attributes.

Docs
Create issueEdit page
Copyright © 2021 New Relic Inc.