How do I enable user experience monitoring for iOS apps?

To set up user experience monitoring for your iOS apps, you can follow either the CocoaPods- or Carthage-based approach. Although not recommended, you can also follow the manual approach.

Independently of the approach followed, you have to add the generated application and environment IDs to your project’s Info.plist file, so that your iOS mobile app can send monitoring data to your Dynatrace monitoring environment. Further details for each approach are provided below.

Set up OneAgent with CocoaPods

To set up OneAgent with CocoaPods:

Click Applications in the navigation menu.

Select your mobile application.

Click the browse button (...) in the top right corner and select Edit.

Click Instrumentation in the left menu.

Select Apple iOS.

Select the CocoaPods tab. Insert Dynatrace as a library dependency within the CocoaPods Podfile specification. This can be done by either using Dynatrace as a dynamic framework or as a static library.

Note:

  • For iOS 8+ apps, use the framework.
  • For iOS 6+ apps, use the static library.
  • If you’re using Hockeyapp with Dynatrace, you’ll need to include Dynatrace as a framework to avoid symbol clashes. See the framework example above.

For further information about Podfiles, please see the Podfile Syntax Reference.

CocoaPods automatically adds Dynatrace to your iOS project during the build process.

Set up OneAgent with Carthage

Dynatrace OneAgent can also be included via Carthage. Use this line to add it to your Carthfile:

binary "https://files.dynatrace.com/mobileagent/carthage/dynatrace.json"

Set up OneAgent manually

To set up OneAgent manually:

  1. Click Applications in the navigation menu.
  2. Select your mobile application.
  3. Click the browse button (...) in the top right corner and select Edit.
  4. Click Instrumentation in the left menu.
  5. Select Apple iOS.
  6. Select the Developer tab and follow the instructions provided on that page.