> For the complete documentation index, see [llms.txt](https://docs.abtasty.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.abtasty.com/server-side/sdks/ios/ios-1/swift-installation.md).

# Installation

Our Flagship SDK is available for distribution through CocoaPods, Swift Package Manager

#### Cocoapods

1. [Install CocoaPods](https://guides.cocoapods.org/)
2. Open Terminal and browse to the directory that contains your project then, enter the following command: `pod init`
3. Open your Podfile and add the following line to the Podfile

```ruby
target 'Your App' do
    use_frameworks!

    pod 'FlagShip'

    end
```

4. Run `pod install` from your Xcode project's base directory
5. Make sure you always open the Xcode workspace and not the project file when building your project

#### Swift Package Manager (SPM)

You can search for **Flagship** package on GitHub.

Add your GitHub or GitHub Enterprise account in Xcode’s preferences, and a package repository appear as you type.

For more information about Swift Package Manager, [refer to Apple documentation](https://developer.apple.com/documentation/xcode/adding_package_dependencies_to_your_app).

#### Carthage

1. Install [Carthage](https://github.com/Carthage/Carthage#installing-carthage)
2. Create a Cartfile in the same directory where your .xcodeproj or .xcworkspace is.
3. Add this line to the Cartfile

```ruby
github "flagship-io/flagship-ios" ~> 4.0.2
```

4. Run `carthage update --use-xcframeworks`
5. A Cartfile.resolved file and a Carthage directory will appear in the same directory where your .xcodeproj or .xcworkspace is.
6. Drag the built Flagship.xcframework bundles from Carthage/Build into the "Frameworks, Libraries, and Embedded Content" section of your application’s Xcode project.

For More information refer to [Carthage](https://github.com/Carthage/Carthage)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.abtasty.com/server-side/sdks/ios/ios-1/swift-installation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
