Search code examples
javascriptiosobjective-creact-nativecross-platform

Module 'SquareReaderSDK' not found in IOS (React Native)


I'm encountering an issue with integrating the SquareReaderSDK into my iOS project. Despite following the documentation and ensuring that I've properly added the SDK to my project, Xcode still reports that it cannot find the SquareReaderSDK module.

Here are the steps I've taken so far:

  1. I've added the SquareReaderSDK framework to my project by dragging it into the "Frameworks, Libraries, and Embedded Content" section of my target settings.

  2. I've made sure that the framework is listed under "Link Binary With Libraries" in the "Build Phases" settings for my target.

  3. I've imported the SquareReaderSDK module in the appropriate files where I need to use it.

I've tried cleaning the build folder, deleting derived data, and restarting Xcode, but the issue persists.

Is there anything else I might be missing or any additional steps I need to take to properly integrate the SquareReaderSDK into my project? Any help or insights would be greatly appreciated.

Versions:

  • "react-native": "0.72.3",

  • "react-native-square-reader-sdk": "^1.4.3"

Device:
IOS simulator: IPhone 15

Error Screenshot:

enter image description here

I have followed the documnentation of sqaure reader sdk.
https://github.com/square/react-native-square-reader-sdk/blob/master/docs/get-started.md#step-5-install-reader-sdk-for-ios


Solution

  • The framework will install in the current ios directory.

    Important Note:- Make sure your sdk is present in this directory project_root_directory/ios and add you sdk in xcode

    enter image description here

    Step 1:-

    • Move to project_root_directory/ios

    Step 2:-

    Run this command

    Make sure to replace YOUR_SQUARE_READER_APP_ID with your Square Reader application ID and YOUR_SQUARE_READER_REPOSITORY_PASSWORD with your Square Reader repository password.