Swiftpack.co -  newrelic/newrelic-ios-agent-spm as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
newrelic/newrelic-ios-agent-spm
This repository hosts the Swift Package Manager deployment of the iOS agent
.package(url: "https://github.com/newrelic/newrelic-ios-agent-spm.git", from: "7.3.2")

Community Project header

New Relic Swift Package Manager Deployment

New Relic's mobile monitoring capabilities help you gain deeper visibility into how to analyze your iOS application performance and troubleshoot crashes. You can also examine HTTP and other network performance for unexpected lag, which will in turn help you collaborate more efficiently with your backend teams.

Installation

  1. Select File > Swift Packages > Add Package Dependency....
  2. Add the Github URL of the Package file:
https://github.com/newrelic/newrelic-ios-sdk

If you receive an artifact of binary target 'NewRelic' failed extraction: The operation couldn’t be completed. (TSCBasic.StringError error 1.) error when extracting the package, please close Xcode, delete the Derrived Data folder, re-open Xcode, and try again.

  1. Select the NewRelic package product, select your target, and select Finish.

  2. In your AppDelegate.swift file, add this call as the first line of applicationDidFinishLaunchWithOptions, replacing APP_TOKEN with your application token:

    NewRelic.start(withApplicationToken:"<var>APP_TOKEN</var>")
    

    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.

  3. 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:

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

Getting Started

If you have not created a Mobile Application:

  • Click "Add more" in the top right,
  • name your application, and
  • download the New Relic agent for your platform and follow the instructions.
  • You can also select the “Add more data” option from the user menu in the upper right corner of the top navigation, then the iOS button to access the installation page.

If you have previously created a Mobile Application:

  • Click the name of your mobile app,
  • choose Installation from the Settings section in the left nav, and
  • download the New Relic agent for your platform and follow the instructions.

Support

A note about vulnerabilities

As noted in our security policy, New Relic is committed to the privacy and security of our customers and their data. We believe that providing coordinated disclosure by security researchers and engaging with the security community are important means to achieve our security goals.

If you believe you have found a security vulnerability in this project or any of New Relic's products or websites, we welcome and greatly appreciate you reporting it to New Relic through HackerOne.

License

New Relic Swift Package Manager Deployment is licensed under the Apache 2.0 License.

GitHub

link
Stars: 2
Last commit: 4 weeks ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API