Skip to content

Commit

Permalink
Minor edits, added logging statement to tvos docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ally-sassman committed Feb 15, 2023
1 parent 723062b commit ac03f28
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ Make sure your iOS app meets these requirements:
</td>

<td>
To take advantage of New Relic's iOS features, make sure you have the latest version of **[Xcode](https://developer.apple.com/documentation/xcode-release-notes)**.
To take advantage of New Relic's iOS features, make sure you have the latest version of [Xcode](https://developer.apple.com/documentation/xcode-release-notes).
</td>
</tr>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ As part of the installation process, New Relic automatically generates an [appli
To install and configure your iOS application:

1. Go to **[one.newrelic.com](https://one.newrelic.com/all-capabilities)**.
2. If applicable: From the Mobile Apps list, select **Add a new app**.
2. (If applicable) From the **Mobile Apps** list, select **Add a new app**.
3. From the **Get Started** page, select **iOS** as the platform for mobile monitoring.
4. Type a name for your mobile app, then select **Continue**.
5. If your installation does not automatically include the prefix header, follow the steps to [add the prefix header to your project](https://docs.newrelic.com/docs/mobile-monitoring/new-relic-mobile-ios/configuration/adding-prefix-header-ios-project/).
Expand Down Expand Up @@ -63,24 +63,24 @@ These procedures to configure your iOS app with CocoaPods and Objective-C also a
</Callout>
6. Add a build script to your target's **Build Phases**. Ensure the new build script is the very last build script. Then paste the following, replacing `APP_TOKEN` with your [application token](/docs/mobile-apps/viewing-your-application-token):

- ### **iOS Agent 7.4.0+:**
- For iOS agent 7.4.0 or higher:
```
SCRIPT=`/usr/bin/find "${SRCROOT}" -name run-symbol-tool | head -n 1`
/bin/sh "${SCRIPT}" "APP_TOKEN"
```
- ### **iOS Agent 7.3.8 or before:**
- For iOS Agent 7.3.8 or lower:
```
SCRIPT=`/usr/bin/find "${SRCROOT}" -name newrelic_postbuild.sh | head -n 1`
/bin/sh "${SCRIPT}" "APP_TOKEN"
```
- **OPTIONAL:** Add the following lines to your build script above the existing lines to skip symbol upload during debugging.
- OPTIONAL: Add the following lines to your build script above the existing lines to skip symbol upload during debugging:
```
if [ ${CONFIGURATION} = "Debug" ]; then
echo "Skipping DSYM upload CONFIGURATION: ${CONFIGURATION}"
exit 0
fi
```
7. Clean and build your app, then run it in the simulator or other device.
7. Clean and build your app, then run it in the simulator or on another device.

## Configure using Swift [#configuration]

Expand All @@ -91,12 +91,12 @@ These procedures to configure your iOS app with CocoaPods and Swift also appear
```
pod 'NewRelicAgent'
```
2. Close your project in Xcode, and update it by running this command from the **Terminal** in your project directory:
2. Close your project in Xcode, and update it by running this command from the terminal in your project directory:

```
pod install
```
3. Open your project in Xcode by running this command from the **Terminal** in your project directory:
3. Open your project in Xcode by running this command from the terminal in your project directory:

```
open App.xcworkspace
Expand All @@ -114,34 +114,34 @@ These procedures to configure your iOS app with CocoaPods and Swift also appear
```

<Callout variant="important">
To ensure proper instrumentation, you must call the agent on the first line of `didFinishLaunchingWithOptions()`, and run the agent on the main thread. Starting the call later, on a background thread, or asynchronously can cause unexpected or unstable behavior.
To ensure proper instrumentation, you must call the agent on the first line of `didFinishLaunchingWithOptions()`, and run the agent on the main thread. Starting the call later (on a background thread or asynchronously) can cause unexpected or unstable behavior.
</Callout>
6. Add a build script to your target's **Build Phases**. Ensure the new build script is the very last build script. Then paste the following, replacing `APP_TOKEN` with your [application token](/docs/mobile-apps/viewing-your-application-token):
6. Add a build script to your target's build phases. Ensure the new build script is the very last build script. Then paste the following, replacing `APP_TOKEN` with your [application token](/docs/mobile-apps/viewing-your-application-token):

- ### **iOS Agent 7.4.0+:**
- For iOS agent 7.4.0 or higher:
```
SCRIPT=`/usr/bin/find "${SRCROOT}" -name run-symbol-tool | head -n 1`
/bin/sh "${SCRIPT}" "APP_TOKEN"
```
- ### **iOS Agent 7.3.8 or before:**
- For iOS agent 7.3.8 or lower:
```
SCRIPT=`/usr/bin/find "${SRCROOT}" -name newrelic_postbuild.sh | head -n 1`
/bin/sh "${SCRIPT}" "APP_TOKEN"
```
- **OPTIONAL:** Add the following lines to your build script above the existing lines to skip symbol upload during debugging.
- OPTIONAL: Add the following lines to your build script above the existing lines to skip symbol upload during debugging:
```
if [ ${CONFIGURATION} = "Debug" ]; then
echo "Skipping DSYM upload CONFIGURATION: ${CONFIGURATION}"
exit 0
fi
```
7. Clean and build your app, then run it in the simulator or other device.
7. Clean and build your app, then run it in the simulator or on another device.

<InstallFeedback />

## Change the logging level (optional) [#logging]

By default the New Relic agent will log at the `info` level. Increasing the log level to `verbose` or higher is only encouraged for debugging and not for release builds.
By default the New Relic iOS agent will log at the `info` level. Increasing the log level to `verbose` or higher is only encouraged for debugging and not for release builds.
Six log levels are available for mobile apps monitoring:

* `none`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ Continue with the steps to configure New Relic.
## Add the New Relic framework to your app [#configuration]

1. Download and unzip the [iOS SDK for New Relic](/docs/release-notes/mobile-release-notes/xcframework-release-notes).
2. To add the New Relic framework to your Xcode project: Use **Finder** to drag the `NewRelic.xcframework` folder into your Xcode project, and drop it onto your project in the **Project navigator** window, under **Frameworks, Libraries, and Embedded Content**. Make sure **Embed & Sign** is selected under the **Embed** dropdown menu.
2. To add the New Relic framework to your Xcode project:
1. Using **Finder**, drag the `NewRelic.xcframework` folder into your Xcode project and drop it onto your project in the **Project navigator** window, under **Frameworks, Libraries, and Embedded Content**.
2. Make sure **Embed & Sign** is selected under the **Embed** dropdown menu.
3. Implement the agent using the appropriate method:

<Callout variant="important">
Expand All @@ -64,7 +66,7 @@ Continue with the steps to configure New Relic.
</td>

<td>
1. To start the agent: Import the New Relic header by adding `#import <NewRelic/NewRelic.h> at the top of your `AppDelegate.m`.
1. To start the agent, import the New Relic header by adding `#import <NewRelic/NewRelic.h> at the top of your `AppDelegate.m`.
2. Add `+[NewRelic startWithApplicationToken:@"APP_TOKEN"]` to the top of `-application:didFinishLaunchingWithOptions:` in your `AppDelegate.m`, using the unique [application token](/docs/mobile-apps/viewing-your-application-token) that is automatically generated.
</td>
</tr>
Expand All @@ -82,20 +84,20 @@ Continue with the steps to configure New Relic.
</tr>
</tbody>
</table>
4. Add a build script to your target's **Build Phases**. Ensure the new build script is the very last build phase, then paste the following, replacing APP_TOKEN with your application token:
4. Add a build script to your target's build phases. Ensure the new build script is the very last build phase, then paste the following, replacing APP_TOKEN with your application token:

- ### **iOS Agent 7.4.0+:**
- For iOS agent 7.4.0 or higher:
```
SCRIPT=`/usr/bin/find "${SRCROOT}" -name run-symbol-tool | head -n 1`
/bin/sh "${SCRIPT}" "APP_TOKEN"
```
- ### **iOS Agent 7.3.8 or before:**
- For iOS agent 7.3.8 or lower:
```
SCRIPT=`/usr/bin/find "${SRCROOT}" -name newrelic_postbuild.sh | head -n 1`
/bin/sh "${SCRIPT}" "APP_TOKEN"
```
- **OPTIONAL:** Add the following lines to your build script above the existing lines to skip symbol upload during debugging.
- OPTIONAL: Add the following lines to your build script above the existing lines to skip symbol upload during debugging:
```
if [ ${CONFIGURATION} = "Debug" ]; then
echo "Skipping DSYM upload CONFIGURATION: ${CONFIGURATION}"
Expand All @@ -110,7 +112,7 @@ Continue with the steps to configure New Relic.

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:
Recommendation: Add one of these lines of code to a button click event handler as applicable:

<table>
<thead>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ These procedures to configure your tvOS app with CocoaPods and Swift are also av

## Change the logging level (optional) [#logging]

Six log levels are available for mobile apps monitoring:
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`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ OR

## Changing the logging level (optional) [#logging]

Six log levels are available for mobile apps monitoring:
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`
Expand Down

0 comments on commit ac03f28

Please sign in to comment.