# Carthage integration

This guide covers the steps needed to use the [Carthage](https://github.com/Carthage/Carthage) dependency manager to add Nutrient to an iOS app.

Fat frameworks, which are used by Carthage, are a legacy distribution option that rely on iOS devices and Simulator using different processor architectures. Using fat frameworks leads to undefined behavior when running on Simulator on Apple silicon Macs and can cause crashes because the ARM64 slice isn’t compiled for a simulator. XCFrameworks are Apple’s solution to this problem. We recommend [migrating from Carthage to Swift Package Manager](/guides/ios/knowledge-base/how-do-i-migrate-from-carthage-to-spm.md), which uses XCFrameworks.

1. Open your project’s Cartfile in a text editor and add the Nutrient dependency:

   ```sh

   binary "https://my.nutrient.io/pspdfkit-ios.json"
   ```

   The Carthage JSON URL from above will ensure you always use the latest available version of Nutrient. Alternatively, you can select a specific version to update at your own pace. Take a look at our [advanced Carthage integration] guide for more details.

2. In the terminal, change the directory to the location of your Cartfile: `cd path/to/Cartfile`.

3. Run `carthage update` and wait for Carthage to download Nutrient.

4. Open your application’s project or workspace in Xcode.

5. Drag the binaries from `Carthage/Build/iOS` into the **Frameworks, Libraries, and Embedded Content** section of your target.![drag-and-drop-frameworks](@/assets/guides/ios/best-practices/carthage-integration/drag-and-drop-frameworks.png)

6. To work around the [compatibility issue between fat frameworks and Xcode 12](https://github.com/Carthage/Carthage/blob/master/Documentation/Xcode12Workaround.md), make sure `EXCLUDED_ARCHS` for iOS Simulator SDK is set to arm architectures (`arm64`) in your project configuration. This ensures you’ll avoid running into an issue while building for iOS Simulator:

   ```

   "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
   ```![drag-and-drop-frameworks](@/assets/guides/ios/best-practices/carthage-integration/enable-validate-workspace.png)
---

## Related pages

- [Advanced CocoaPods integration](/guides/ios/miscellaneous/advanced-cocoapods-integration.md)
- [App Transport Security](/guides/ios/pspdfkit-instant/app-transport-security.md)
- [Advanced Carthage integration](/guides/ios/miscellaneous/advanced-carthage-integration.md)
- [Bitcode](/guides/ios/faq/bitcode.md)
- [Framework Size](/guides/ios/faq/framework-size.md)
- [Airdrop](/guides/ios/features/airdrop.md)
- [Customizing The Page Number](/guides/ios/customizing-pdf-pages/customizing-the-page-number.md)
- [Nightly Builds](/guides/ios/best-practices/nightly-builds.md)
- [About Memory Usage](/guides/ios/memory-and-storage/about-memory-usage.md)
- [Customizing the log level on iOS](/guides/ios/features/logging.md)
- [iOS PDF SDK security](/guides/ios/faq/sdk-security.md)
- [Powered By Nutrient](/guides/ios/miscellaneous/powered-by-nutrient.md)
- [Optimize PDF documents for mobile rendering on iOS](/guides/ios/miscellaneous/optimize-pdf-documents-for-mobile-rendering.md)
- [Third Party Compatibility](/guides/ios/miscellaneous/third-party-compatibility.md)
- [Reduce App Size](/guides/ios/best-practices/reduce-app-size.md)
- [Modifying permissions in your iOS app](/guides/ios/getting-started/permissions.md)
- [Transferring File Edits To A Server](/guides/ios/best-practices/transferring-file-edits-to-a-server.md)
- [Saving Data Externally](/guides/ios/memory-and-storage/saving-data-externally.md)
- [Using Document Efficiently](/guides/ios/getting-started/using-document-efficiently.md)
- [Using Automatic Saving Safely](/guides/ios/best-practices/using-automatic-saving-safely.md)
- [Manage your iOS status bar with view controllers](/guides/ios/faq/view-controller-based-status-bar-appearance.md)
- [Strategies For Multiple Bundle Ids](/guides/ios/faq/strategies-for-multiple-bundle-ids.md)
- [Youtube Links](/guides/ios/miscellaneous/youtube-links.md)
- [Version Numbering](/guides/ios/best-practices/version-numbering.md)

