# Installing Crash SDK

If you add IMQA Crash to an iOS project, you can check the performance issues of the application, which occur in the app developed with Objective-C or Swift, in various viewpoints.&#x20;

The latest update guide will be updated at <https://github.com/onycom-imqa/IMQA-Crash-Release>.

{% hint style="warning" %}
\[Supported OS] iOS 9.0 and later / latest version of Xcode
{% endhint %}

{% hint style="warning" %}
Please install Crash SDK after creating an iOS project at the IMQA project page and receiving the project key.
{% endhint %}

## &#x20;<a href="#framework" id="framework"></a>

## 1. SDK embedded framework method <a href="#framework" id="framework"></a>

You can install the IMQA Crash SDK using one of the following two methods. You can select your preferred installation method according to your environment.

### **XCFrameworks** <a href="#xcframework" id="xcframework"></a>

1\. Download the latest SDK file using the link below:\
&#x20;  **\[**[**https://github.com/onycom-imqa/IMQA-Crash-Release/releases/download/v3.9.0/IMQACrashAgent.zip**](https://github.com/onycom-imqa/IMQA-Crash-Release/releases/download/v3.9.0/IMQACrashAgent.zip)**]**

2\. Extract the downloaded file and drag and move the IMQACrashAgent.framework file to Targets > \[Project Name] > General > Frameworks, Libraries, and Embedded Content.

3\. Now, SDK installation is complete.

### CocoaPods method <a href="#cocoapods" id="cocoapods"></a>

1\. Enter the following statement in Podfile: (Please add it to the source part.)

```
pod 'IMQACrashAgent', '~> 3.24.1'
```

2\. Run “pod install” at the project directory in the terminal.

3\. Now, the SDK installation is complete.

## 2. Codes for initializing the Objective-C environment <a href="#objective-c" id="objective-c"></a>

### Setting the AppDelegate.m header <a href="#appdelegate-m" id="appdelegate-m"></a>

Add the IMQACrashAgent header to AppDelegate.m.

{% code title="AppDelegate.m" %}

```swift
#import <IMQACrashAgent/IMQACrash.h>
```

{% endcode %}

### Setting the AppDelegate.m execution code <a href="#appdelegate-m-code" id="appdelegate-m-code"></a>

Initialize IMQACrashAgent in application: didFinishLaunchingWithOptions: at AppDelegate.m. didFinishLaunchingWithOptions: You can receive PROJECT\_KEY after creating a project on the IMQA website.

{% code title="AppDelegate.m" %}

```swift
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

  NSString* PROJECT_KEY = @"<PROJECT_KEY>";
  IMQACrashConfiguration* crashConfig = [[IMQACrashConfiguration alloc] initWithApiKey:PROJECT_KEY];
  [IMQACrash startWithConfiguration:crashConfig];

  return YES;
}
```

{% endcode %}

## 3. Codes for initializing the Swift environment <a href="#swift" id="swift"></a>

### \<project\_name>-bridging-header.h  <a href="#project-name" id="project-name"></a>

Add the IMQA Crash bridge header to the project.

{% code title="\<project\_name>-bridging-header.h" %}

```
#import <IMQACrashAgent/IMQACrash.h>
```

{% endcode %}

### Setting the AppDelegate.swift execution code <a href="#appdelegate-swift-code" id="appdelegate-swift-code"></a>

Initialize IMQMCrashAgent in application: didFinishLaunchingWithOptions: at AppDelegate.swift. You can receive PROJECT\_KEY after creating a project on the IMQA website.

{% code title="AppDelegate.swift" %}

```swift
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

    let PROJECT_KEY = ""
    let crashConfig = IMQACrashConfiguration(PROJECT_KEY)
    IMQACrash.start(with: crashConfig)

    return true
} 
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.imqa.io/imqa-guide/eng/installation-guide/ios/crash-sdk-install.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
