How to Integrate Appxiom in iOS
This guide explains how to integrate AppxiomCore and AppxiomDebug into your iOS project using CocoaPods for advanced monitoring and diagnostics.
Step 1: Set Up CocoaPods
CocoaPods is a popular dependency manager for Swift and Objective-C projects. If you haven't already, install CocoaPods by following the official guide.
Step 2: Add Appxiom to Your Project
Add the following lines to your Podfile to include both AppxiomCore and AppxiomDebug:
Podfile:
pod 'AppxiomCore', 'x.x.x', :configuration => ['Release']
pod 'AppxiomDebug', 'x.x.x', :configuration => ['Debug']
AppxiomDebugincludes all features ofAppxiomCoreplus auto detection of Frame rate issues.
Next, install the pods by running the following command in the terminal where your Podfile is located:
Terminal:
pod install --repo-update
Use the
--repo-updateoption the first time to ensure you have the latest pod specs.
Step 3: Import Appxiom in Your Code
Import AppxiomCore wherever you need to use its APIs:
- Objective C
- Swift
#import <AppxiomCore/Ax.h>
import AppxiomCore
Frequently Asked Questions (FAQ)
Q: What is the difference between AppxiomCore and AppxiomDebug?
A: AppxiomCore is flavour for release builds. AppxiomDebug includes all AppxiomCore features plus additional debugging tools like slow frame rate issue detection for debug builds.
Q: Why do I need both AppxiomCore and AppxiomDebug in my Podfile?
A: This setup ensures you get full monitoring in release and extra debugging features in development without bloating your production app.
Q: Do I need to run pod install every time I change the Podfile?
A: Yes, after modifying your Podfile, always run pod install to update your dependencies.
Q: What does --repo-update do?
A: It updates your local CocoaPods repository to fetch the latest pod versions and specs.
Q: Can I use Appxiom with Swift Package Manager or Carthage?
A: Currently, Appxiom is distributed via CocoaPods. Check the release notes of documentation for updates on other package managers.
Q: Where should I import AppxiomCore?
A: Import AppxiomCore in any file where you want to use Appxiom APIs.
Q: Will AppxiomDebug be included in my release build?
A: No, AppxiomDebug is only included in debug builds as specified in the Podfile configuration.
Q: What features are enabled by AppxiomDebug?
A: AppxiomDebug enables features like automatic slow frame rate issue detection to help you catch performance problems during development.