To start adding the Amplify Libraries to your iOS project, open your project in Xcode and select **File > Add Packages...**

![Add package dependency](/images/project-setup/20_4_add-package-dependency.png)

Enter the **Amplify Library for Swift** GitHub repo URL (`https://github.com/aws-amplify/amplify-swift`) into the search bar and hit **Enter**. Wait for the result to load.

You'll see the **Amplify Library for Swift** repository rules for which version of Amplify you want Swift Package Manager to install. Choose the dependency rule **Up to Next Major Version**, as it will use the latest compatible version of the dependency that can be detected from the `main` branch, then click **Add Package**.

![Search for repo](/images/project-setup/20_5_search-amplify-repo.png)

Lastly, choose which of the libraries you want added to your project. Always select the **Amplify** library. The "Plugin" to install depends on which categories you are using:

- API: **AWSAPIPlugin**
- Analytics: **AWSPinpointAnalyticsPlugin**
- Auth: **AWSCognitoAuthPlugin**
- DataStore: **AWSDataStorePlugin**
- Geo (Developer Preview): **AWSLocationGeoPlugin**
- Storage: **AWSS3StoragePlugin**

  _Note: AWSPredictionsPlugin is not currently supported through Swift Package Manager due to different minimum iOS version requirements. Support for this will eventually be added._

![Select dependencies](/images/project-setup/20_7_select-dependencies.png)

Select all that are appropriate, then click **Add Package**.

You can always go back and modify which SPM packages are included in your project by opening the Package Dependencies tab for your project: Click on the Project file in the Xcode navigator, then click on your project's icon, then select the **Package Dependencies** tab.

<Callout>

You must explicitly import plugins in your app code when using Swift Package Manager to install Amplify, as in:

```swift
import Amplify
import AWSAPIPlugin
import AWSDataStorePlugin
```

This is a result of Swift Package Manager's importing only relevant pieces of the dependency being installed–in this case, the categories of Amplify.

</Callout>

