# Library not loaded: CorePaymentCard SquareInApp

**URL:** <https://developer.squareup.com/forums/t/library-not-loaded-corepaymentcard-squareinapp/18406>\
**Category:** Questions\
**Tags:** payments-api\
**Created:** [August 22, 2024, 12:02am UTC](https://developer.squareup.com/forums/t/library-not-loaded-corepaymentcard-squareinapp/18406 "2024-08-22T00:02:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tbrass84](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/tbrass84/32/7144_2.png) [@tbrass84](https://developer.squareup.com/forums/u/tbrass84)\
**Post date:** [August 22, 2024, 12:02am UTC](https://developer.squareup.com/forums/t/library-not-loaded-corepaymentcard-squareinapp/18406/1 "2024-08-22T00:02:31Z")

</div>

Library not loaded: @rpath/CorePaymentCard.framework/CorePaymentCard is the error that keeps popping up on me. I have used CocoaPods to install SquareInAppPaymentsSDK, and it builds, but as soon as it launches it crashes.

I have done all that needs to be done according to Square’s documentation, including the Run Script Phase:

```auto
SETUP_SCRIPT=${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}"/SquareInAppPaymentsSDK.framework/setup"
if [-f "$SETUP_SCRIPT"]; then
  "$SETUP_SCRIPT"
fi

```

Any ideas why I’m STILL getting this?

---

<div class="post-metadata">

**Author:** ![Square-Dev-AI](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/square-dev-ai/32/2513_2.png) [@Square-Dev-AI](https://developer.squareup.com/forums/u/Square-Dev-AI)\
**Post date:** [August 22, 2024, 12:02am UTC](https://developer.squareup.com/forums/t/library-not-loaded-corepaymentcard-squareinapp/18406/2 "2024-08-22T00:02:55Z")

</div>

👋 I’m Square Dev AI, here to help answer your question!  
Based on the information you’ve provided, the following documentation will help answer your question:

> **[Troubleshoot In-App Payments SDK Problems](https://developer.squareup.com/docs/in-app-payments-sdk/troubleshooting)**
>
> Troubleshoot problems with the Square In-App Payments SDK.

> **[Square Developer Documentation](https://developer.squareup.com/docs/reader-sdk/build-on-ios)**
>
> Build with the Reader SDK on iOS to process in-person payments with Square hardware.

> **Additional Documentation**
>
> [Download, Configure, and Run the Client Sample](https://developer.squareup.com/docs/in-app-payments-sdk/quick-start/generate-token)  
> [Build on iOS: In-App Payments SDK](https://developer.squareup.com/docs/in-app-payments-sdk/build-on-ios)  
> [Install the In-App Payments SDK](https://developer.squareup.com/docs/in-app-payments-sdk/installation)

If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.  
Otherwise one of our Developer Advocates will provide additional assistance shortly.

---

<div class="post-metadata">

**Author:** ![Square-Dev-AI](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/square-dev-ai/32/2513_2.png) [@Square-Dev-AI](https://developer.squareup.com/forums/u/Square-Dev-AI)\
**Post date:** [August 22, 2024, 12:37am UTC](https://developer.squareup.com/forums/t/library-not-loaded-corepaymentcard-squareinapp/18406/3 "2024-08-22T00:37:33Z")

</div>

The error you’re encountering typically occurs when the required framework isn’t properly linked to your project. Here are a few steps you can take to troubleshoot:

1. Ensure that `SquareInAppPaymentsSDK.framework` is included in your project’s “Embedded Binaries” and “Linked Frameworks and Libraries” sections. You can find these in your project’s target settings.

2. Make sure that the Run Script Phase for the Square In-App Payments SDK is the last phase in the list. This is important because the order of build phases matters. The Run Script Phase for the Square SDK should be after the ‘Embed Frameworks’ phase.

3. Double-check that the `CorePaymentCard.framework` is included in the `SquareInAppPaymentsSDK.framework`. You can do this by navigating to the `SquareInAppPaymentsSDK.framework` in Finder and checking its contents.

4. Clean your project (Product → Clean Build Folder) and try to build and run your project again.

If you’ve checked all these and you’re still encountering the issue, it might be a problem with your Xcode environment or project configuration.

_This answer was reviewed by @Bryan-Square._
