Skip to main content
Version: 1.0.0

Initialize Appxiom in iOS

To start using Appxiom, you must add the appkey and platformkey from Appxiom dashboard to info.plist file and call the Initialize function in your AppDelegate's didFinishLaunchingWithOptions method. This sets up the framework for monitoring and reporting issues in your iOS app.

Integration Steps

1. Add Appxiom Keys to Info.plist

Open your Info.plist file and add the following keys:

<key>AX</key>
<dict>
<key>AppKey</key>
<string>APP_KEY_FROM_APPXIOM_DASHBOARD</string>
<key>PlatformKey</key>
<string>PLATFORM_KEY_FROM_APPXIOM_DASHBOARD</string>
</dict>

Replace APP_KEY_FROM_APPXIOM_DASHBOARD and PLATFORM_KEY_FROM_APPXIOM_DASHBOARD with the actual keys from your Appxiom dashboard.

In case of SwiftUI projects, the info.plist file can be access via info tab in your app target.

2. Add Initialization Code

Insert the initialization code in your AppDelegate:

#import <AppxiomCore/Ax.h>

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[Ax initialize:application];
}

Testing Your Integration

After integrating Appxiom, verify the setup by sending a test issue to the dashboard.

3. Add Test API

Add the test API call immediately after the Initialize call in your AppDelegate:

#import <AppxiomCore/Ax.h>

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[Ax initialize:application];
[Ax test];
}

4. Run the App

Run your app on a simulator or real iOS device with an active network connection.

5. Verify in Appxiom Dashboard

Open the Appxiom dashboard and confirm that the test issue appears. If not, ensure the correct app and platform are selected. For troubleshooting, see the debug guide.

Remember to remove the test API after verification to avoid sending test issues every time the app runs.

Appxiom supports offline caching of issues that fail to sync. See the Offline Caching section for more details.

Once initialized, Appxiom will automatically monitor and report network call issues, memory leaks, abnormal memory usage, app hangs, frame rate issues, and crashes (crash reporting is enabled only in release builds).

Frequently Asked Questions (FAQ)

Q: Why do I need to initialize Appxiom in AppDelegate?
A: Initialization ensures Appxiom can monitor your app from launch, capturing all relevant events and issues.

Q: What does the test API do?
A: The test API sends a sample issue to the Appxiom dashboard to verify integration and connectivity.

Q: The test issue does not appear in the dashboard. What should I do?
A: Ensure your device has an active network connection, the correct app, platform and version is selected in the dashboard, and check the debug guide for more help.

Q: Can I leave the test API in production?
A: No, remove the test API after verification to avoid repeated test issues in your dashboard.

Q: What does Appxiom monitor after initialization?
A: Appxiom will report memory leaks, abnormal memory usage, app hangs, frame rate issues, crashes and other performance problems (in release builds).

Q: Does Appxiom work offline?
A: Yes, Appxiom supports offline caching and will sync issues when the device is back online.

Q: Is crash reporting enabled in debug builds?
A: Crash reporting is only activated in release builds for accurate production monitoring.