You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run the authorizeAsync method on an iPad, the app crashes and cannot restart. The code runs, as I am able to log the value after the await, however the app crashes (stops and force exits) right after. To run again, it needs to be reinstalled (deleted and rebuilt in xcode). The app only crashes with a valid authcode. Invalid codes return proper error messages and the app continues running fine.
It works as expected in the simulator however.
Device permissions are working fine and handled in previous screens.
To Reproduce
For example -
Connect iPad device to Xcode and build app to that device
Call authorizeAsync(authCode)
Here the piece of code that reproduce the issue.
import{authorizeAsync}from'react-native-square-reader-sdk';authorizeReader=async(authCode)=>{try{// using a generated mobile auth code for quick startconstauthorizedLocation=awaitauthorizeAsync(authCode);console.log(authorizedLocation);}catch(error){console.log(error)}}
Expected behavior
Authorization method resolves and the app continues running.
Environment (please complete the following information):
Frame 3 says __CRASHING_DUE_TO_PRIVACY_VIOLATION__, however I followed the instructions for updating info.plist. Here's a snippet of what I added for square in case I missed something:
<key>NSBluetoothPeripheralUsageDescription</key>
<string>This app integrates with Square for card processing. Square uses Bluetooth to connect your device to compatible hardware.</string>
<key>NSCalendarsUsageDescription</key>
<string>Allow Buddy Kiosk2 to access your calendar</string>
<key>NSCameraUsageDescription</key>
<string>This app integrates with Square for card processing. Upload your account logo, feature photo and product images with the photos stored on your mobile device.</string>
<key>NSContactsUsageDescription</key>
<string>Allow Buddy Kiosk2 to access your contacts</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>This app integrates with Square for card processing. To protect buyers and sellers, Square requires your location to process payments.</string>
<key>NSMicrophoneUsageDescription</key>
<string>This app integrates with Square for card processing. To swipe magnetic cards via the headphone jack, Square requires access to the microphone.</string>
<key>NSMotionUsageDescription</key>
<string>Allow Buddy Kiosk2 to access your device's accelerometer</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>Give Buddy Kiosk2 permission to save photos</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>This app integrates with Square for card processing. Upload your account logo, feature photo and product images with the photos stored on your mobile device.</string>
<key>NSRemindersUsageDescription</key>
<string>Allow Buddy Kiosk2 to access your reminders</string>
The text was updated successfully, but these errors were encountered:
cezarcarvalhaes
changed the title
authorizeAsync(authCode) crashes iPad, but not simulator.
SOLVED: authorizeAsync(authCode) crashes iPad, but not simulator.
Nov 18, 2019
When I run the authorizeAsync method on an iPad, the app crashes and cannot restart. The code runs, as I am able to log the value after the await, however the app crashes (stops and force exits) right after. To run again, it needs to be reinstalled (deleted and rebuilt in xcode). The app only crashes with a valid authcode. Invalid codes return proper error messages and the app continues running fine.
It works as expected in the simulator however.
Device permissions are working fine and handled in previous screens.
To Reproduce
For example -
Here the piece of code that reproduce the issue.
Expected behavior
Authorization method resolves and the app continues running.
Environment (please complete the following information):
React Native Environment Info:
System:
OS: macOS 10.15
CPU: (4) x64 Intel(R) Core(TM) i7-6567U CPU @ 3.30GHz
Memory: 440.02 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 8.16.1 - ~/.nvm/versions/node/v8.16.1/bin/node
Yarn: 1.17.3 - /usr/local/bin/yarn
npm: 6.11.3 - /usr/local/bin/npm
SDKs:
iOS SDK:
Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
IDEs:
Xcode: 11.2.1/11B500 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.3 => 16.8.3
react-native: https://github.com/expo/react-native/archive/sdk-35.0.0.tar.gz => 0.59.8
Device:
iPad Pro (9.7-inch)
iOS 13.2.2
UPDATE:
I added an exception breakpoint, and then called
bt
after the(lldb)
in the console and this is what I got:Frame 3 says
__CRASHING_DUE_TO_PRIVACY_VIOLATION__
, however I followed the instructions for updating info.plist. Here's a snippet of what I added for square in case I missed something:The text was updated successfully, but these errors were encountered: