Download PDF
Download page Install the iOS SDK.
Install the iOS SDK
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 AppDynamics iOS SDK framework helps you to monitor the performance and activities of an iOS application. You can add the AppDynamics iOS SDK in your Xcode environment from the 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 Type | Xcode Version |
---|---|
CocoaPods and Manual | >=7 |
Swift Package Manager | >=14.1 |
CocoaPods Install
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
TEXTIn your project directory, run this command:
pod install
Manual Install
To manually install the iOS SDK, follow these steps:
Download the iOS SDK
Navigate to the AppDynamics Download page.
- From the APP AGENT list, check the Mobile RUM Agent - iOS checkbox.
- 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.
- Unzip
iOSAgent-<version>.zip
. Import the
ADEUMInstrumentation.framework
(orADEUMInstrumentation.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 AppDynamics iOS Agent requires these libraries:
SystemConfiguration.framework
CoreTelephony.framework
libz.dylib
or.tbd
To add the libraries:
- Select the target that builds your app in Xcode.
- Select the Build Phases tab.
- Expand the Link Binary With Libraries section.
- 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.
- Select your project in the Project Navigator.
- In the target list, select the target that builds your application.
- Select the Build Settings tab.
- Scroll to Linking and open.
- Go to Other Linker Flags and double-click to open the popup.
- 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 AppDynamics iOS SDK package:
- Navigate to File > Add Packages.
- In the search bar, specify the following GitHub URL:
https://github.com/CiscoDevNet/AppDynamicsAgent.git - Specify the version that you want to add.
- Click Add Package.
- Select the package and the target application.
- Click Add Package.
After you add the package, complete the following:
- Add the Required Libraries.
- Set the -Objc Flag.
- Automatically Upload the dSYM File to AppDynamics with Each Build.
Update iOS Agent Using Swift Package Manager
Complete the following steps in your Xcode environment:
- In the Package Dependencies section, navigate to the AppDynamics Agent package.
- Right click the AppDynamics Agent package and click Update Package
- 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
In your project directory, run this command:
$ pod update
Rebuild.
Upgrade Manually
To pick up new features or to get crucial bug fixes you want to upgrade the iOS SDK in your app.