With the iOS 14 release (supported by iOS Agent 20.10.0), Apple introduced a new data collection policy. See iOS Data Collection Disclosure for details.

The Cisco AppDynamics iOS SDK framework helps you to monitor the performance and activities of an iOS application. You can add the Cisco AppDynamics iOS SDK in your Xcode environment from the Cisco AppDynamics GitHub repository.

You can install the iOS SDK using CocoaPods, Swift Package Manager, or by manually downloading and installing it. We recommended that you use CocoaPods or Swift Package Manager to install the iOS SDK because it handles the dependencies, the build settings, and simplifies upgrading.

  • Swift Package Manager install is supported for iOS Agent 23.10.1 or higher.
  • Download the list of copyrights and licenses for each Open Source components in iOS Agent. See, Release Notes.

Follow the instructions for your preferred installation method:

iOS SDK Install Requirements 

You must have the supported Xcode version.

Installation TypeXcode Version
CocoaPods and Manual>=7
Swift Package Manager>=14.1

CocoaPods Install

  1. Add the line below to a target block in your Podfile:

    pod 'AppDynamicsAgent'

    For example:

    platform :ios, '8.0'
    use_frameworks!
    
    target 'YourApp' do
      pod 'AppDynamicsAgent'
    end
    TEXT
  2. In your project directory, run this command:

    pod install

Manual Install

To manually install the iOS SDK, follow these steps:

Download the iOS SDK

  1. Navigate to the Download page.

  2. From the APP AGENT list, check the Mobile RUM Agent - iOS checkbox.
  3. Click Download for the latest iOS Agent that will appear in the Releases results. This downloads a file named iOSAgent-<version>.zip

Add the Framework to the App

You can only use a Swift framework if that framework was built with the exact same version of Swift as the Xcode compiling your app.

  1. Unzip iOSAgent-<version>.zip.
  2. Import the ADEUMInstrumentation.framework (or ADEUMInstrumentation.xcframework) folder into your project Xcode.

If you don't see that Xcode has automatically added the correct path(s), add a project-relative path to your frameworks.


Add Required Libraries

The Cisco AppDynamics iOS Agent requires these libraries:

  • SystemConfiguration.framework
  • CoreTelephony.framework
  • libz.dylib or .tbd

To add the libraries:

  1. Select the target that builds your app in Xcode.
  2. Select the Build Phases tab.
  3. Expand the Link Binary With Libraries section.
  4. If any of the above libraries are not listed:
    • Click the + button.
    • Locate the missing library in the list.
    • Click Add

Repeat this step for each missing library.

Set the -ObjC Flag

You also need to add the -ObjC flag to Other Linker Flags.  

  1. Select your project in the Project Navigator.
  2. In the target list, select the target that builds your application.
  3. Select the Build Settings tab.
  4. Scroll to Linking and open.
  5. Go to Other Linker Flags and double-click to open the popup. 
  6. If the -ObjC flag is not in your list, click + and add it.  

The -ObjC flag is necessary because the iOS Agent defines categories with methods that can be called at runtime, and by default, these methods are not loaded by the linker. As a result, you'll get an "unrecognized selector" runtime exception. The use of -ObjC ensures the methods will be loaded.

Swift Package Manager Install


Swift Package Manager install is supported for iOS Agent 23.10.1 or higher.

Complete the following steps in your Xcode environment to add the Cisco AppDynamics iOS SDK package:

  1. Navigate to File > Add Packages.
  2. In the search bar, specify the following GitHub URL:
    https://github.com/CiscoDevNet/AppDynamicsAgent.git
  3. Specify the version that you want to add.
  4. Click Add Package.
  5. Select the package and the target application.
  6. Click Add Package.

After you add the package, complete the following:

  1. Add the Required Libraries.
  2. Set the -Objc Flag.
  3. Automatically Upload the dSYM File to Each Build.

Update iOS Agent Using Swift Package Manager

Complete the following steps in your Xcode environment:

  1. In the Package Dependencies section, navigate to the Cisco AppDynamics Agent package.
  2. Right click the Cisco AppDynamics Agent package and click Update Package
  3. Change the version rule to match the update version.

For more information, see Adding package dependencies to your app.

Upgrade the iOS SDK

Upgrade with CocoaPods

  1. In your project directory, run this command: $ pod update

  2. Rebuild.

Upgrade Manually

To pick up new features or to get crucial bug fixes you want to upgrade the iOS SDK in your app.

  1. Download the updated SDK.
  2. Replace the .framework file using the updated SDK.
  3. Rebuild your app.