square / react-native-square-reader-sdk

React Native Plugin for Square Reader SDK
Apache License 2.0
117 stars 36 forks source link

Use of undeclared identifier 'SQRDReaderSDK' #193

Closed mormrod closed 2 years ago

mormrod commented 2 years ago

Describe the issue

I am on a brand new RN 0.69.5 app.

I am trying to install v1.4.0 into iOS and I've been through all the Installation steps. They appear to be out of date, as they reference SquareReaderSDK.framework and not SquareReaderSDK.xcframework, which makes me think there are other steps missing or have changed.

In the AppDelegate.mm file (again, out of date reference to AppDelegate.m in the docs) I have added the code from the docs and I am getting this error during the build process:

"Use of undeclared identifier 'SQRDReaderSDK'" on the line for [SQRDReaderSDK initializeWithApplicationLaunchOptions:launchOptions];

To Reproduce

Steps to reproduce the issue.

For example -

  1. Start a RN 0.69.5 app
  2. npm install react-native-square-reader-sdk
  3. Follow the docs, copying the framework into place etc
  4. Attempt to build app

Expected behavior

The app should build. The app was building prior to installing react-native-square-reader-sdk

Environment (please complete the following information):

System: OS: macOS 12.0.1 CPU: (12) x64 Intel(R) Core(TM) i7-8700B CPU @ 3.20GHz Memory: 2.13 GB / 32.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 14.18.2 - ~/.nvm/versions/node/v14.18.2/bin/node Yarn: 1.22.19 - ~/.nvm/versions/node/v14.18.2/bin/yarn npm: 6.14.15 - ~/.nvm/versions/node/v14.18.2/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman Managers: CocoaPods: 1.11.3 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3 Android SDK: Not Found IDEs: Android Studio: 2021.1 AI-211.7628.21.2111.8139111 Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild Languages: Java: 14.0.1 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 18.0.0 => 18.0.0 react-native: 0.69.5 => 0.69.5 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

mormrod commented 2 years ago

UPDATE: I've got it working on RN 0.69.5, but there are some steps:

With all those things in place, it did eventually build for RN 0.69.5.

The docs are in dire need of an update, as is the troubleshooting guide which is now 4 years old and not even remotely accurate

CharmisG commented 2 years ago

Hello @mormrod

Thank you for the update, but if you still face issues, please take a pull from the latest code update.