Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with SquareInAppPaymentsSDK installation through cocoapods #217

Closed
AndrewBordin opened this issue Aug 10, 2023 · 18 comments · Fixed by #227 or #226
Closed

Issue with SquareInAppPaymentsSDK installation through cocoapods #217

AndrewBordin opened this issue Aug 10, 2023 · 18 comments · Fixed by #227 or #226
Labels
bug Something isn't working

Comments

@AndrewBordin
Copy link

AndrewBordin commented Aug 10, 2023

Describe the issue

I encountered an error when installing this plugin at build time after following the getting started guide. The issue I received at build time was as follows:

dyld[43511]: Library not loaded: @rpath/SquareBuyerVerificationSDK.framework/SquareBuyerVerificationSDK

After getting this issue in my own app, I built the starter app as well and ran into the same error. There seems to be some issue with installing the framework through cocoapods, specifically the SquareBuyerVerificationSDK. I am using cocoapods verison 1.11.3 and react-native verison 0.72.3.

I did end up fixing the error by manually installing the In-App Payments SDK:
https://developer.squareup.com/docs/in-app-payments-sdk/installation#option-3-install-the-in-app-payments-sdk-manually

As well as embedding both frameworks manually as well.

To Reproduce

Steps to reproduce the issue:

Follow the getting started guide for iOS and install the sdk with cocoapods.

Expected behavior

The app builds.

Environment (please complete the following information):

  • platform: iOS
  • OS and version: iOS16.4
  • dev environment: MacOS
  • In-App Payments Plugin version: 1.7.3
System:
  OS: macOS 13.4
  CPU: (12) x64 Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
  Memory: 856.60 MB / 32.00 GB
  Shell:
    version: 5.1.16
    path: /usr/local/bin/bash
Binaries:
  Node:
    version: 16.13.2
    path: ~/.nvm/versions/node/v16.13.2/bin/node
  Yarn:
    version: 1.22.17
    path: /usr/local/bin/yarn
  npm:
    version: 8.1.2
    path: ~/.nvm/versions/node/v16.13.2/bin/npm
  Watchman:
    version: 2022.09.12.00
    path: /usr/local/bin/watchman
Managers:
  CocoaPods:
    version: 1.11.3
    path: /usr/local/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 22.4
      - iOS 16.4
      - macOS 13.3
      - tvOS 16.4
      - watchOS 9.4
  Android SDK: Not Found
IDEs:
  Android Studio: 2022.2 AI-222.4459.24.2221.10121639
  Xcode:
    version: 14.3.1/14E300c
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: javac 15
    path: /usr/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.72.3
    wanted: 0.72.3
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false
@AndrewBordin AndrewBordin added the bug Something isn't working label Aug 10, 2023
@talha-irshad-kodexo
Copy link

Facing the same issue, it seems like the documentation hasn't been updated for ages. It is also mentioned to link the library with react native link command which is also deprecated. Also can you let me know where I should place the new run script as that also not mentioned in the documentation, is it okay if I place it as the last build phase?

@CharmisG
Copy link
Contributor

@talha-irshad-kodexo

Please follow below steps to add the new run script:

  1. In the Build Phases tab for your application target, click the + button at the top of the pane.
  2. Select New Run Script Phase.
  3. Paste the following into the editor panel of the new run script:
    FRAMEWORKS="${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}"
    "${FRAMEWORKS}/SquareInAppPaymentsSDK.framework/setup"

@AndrewBordin
Copy link
Author

@talha-irshad-kodexo So long as the new run script is placed below the embed frameworks step you should be good. Placing it at the bottom will work.

@talha-irshad-kodexo
Copy link

@AndrewBordin @CharmisG I am facing another error, I have created a different issue, I would really appreciate it if you guys could help me out in that issue

@AndrewBordin
Copy link
Author

@CharmisG why was this issue closed?

@CharmisG
Copy link
Contributor

@AndrewBordin
Are you still facing same issue ??

@AndrewBordin
Copy link
Author

@CharmisG Yes, the issue of installing the library using the Getting Started guide still fails, as you get this error:
dyld[43511]: Library not loaded: @rpath/SquareBuyerVerificationSDK.framework/SquareBuyerVerificationSDK

It will only work if you install the In-App Payments SDK manually.

@AndrewBordin
Copy link
Author

@CharmisG any update? Can you re-open the issue?

@CharmisG CharmisG reopened this Aug 22, 2023
@CharmisG
Copy link
Contributor

CharmisG commented Sep 12, 2023

@Huynie
Copy link

Huynie commented Sep 12, 2023

I'm also having this issue and I've tried everything I can find thus far:

All on a fresh project running RN 0.72.4, cocoapods 1.12:

  1. nuked everything ( node_modules, package-lock.json, ios/Pods, ios/build, podfile.lock ) then reinstalled (npm i, pod install).

  2. Manuel install following this.

I'm at a lost. Anything help is appreciated.

@CharmisG
Copy link
Contributor

@Huynie
Can you please tell me which iOS version you are using?

@Huynie
Copy link

Huynie commented Sep 16, 2023

@CharmisG

I've tried it on IOS version: 12.0, 12.4, 13.4, 14.0, and 16.4.

@HunterT11
Copy link

I'm also having this error, can anyone help?

@AndrewBordin
Copy link
Author

AndrewBordin commented Sep 20, 2023

@HunterT11 The only way I have gotten it to work is by manually installing the SDK. Take a look at this link (make sure you switch it from Java Android to iOS, and then scroll down to option 3). Then you will have to embed both frameworks manually, here is how to do that.

@AndrewBordin
Copy link
Author

I'm also having this issue and I've tried everything I can find thus far:

All on a fresh project running RN 0.72.4, cocoapods 1.12:

  1. nuked everything ( node_modules, package-lock.json, ios/Pods, ios/build, podfile.lock ) then reinstalled (npm i, pod install).
  2. Manuel install following this.

I'm at a lost. Anything help is appreciated.

What error are you running into when installing the sdk manually?

@HunterT11
Copy link

HunterT11 commented Sep 20, 2023 via email

@HunterT11
Copy link

HunterT11 commented Sep 21, 2023 via email

@Huynie
Copy link

Huynie commented Oct 31, 2023

I'm still having issues getting my app to build from installing this through cocoapods and manually. I've tried it on IOS 15.0 all the way up to 17.0 with no luck.

I've even tried the react-native-in-app-payments-quickstart example project and got as far as building the app, but the app crashes upon launch.

Any help would be appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
6 participants