#Ronit
1 messages · Page 1 of 1 (latest)
Looks like there is another discoverReaders being called?
there is only one method that i am calling no any other method i had added in app
Have you tried putting breakpoint to discorverReaders and see where it is called?
yes it enters in the error in this code
self.discoverCancelable = Terminal.shared.discoverReaders(config, delegate: self) { error in
if let error = error {
print("discoverReaders failed: (error)")
if let error = error as? String {
self.showAlertPopup(title: "Error", message: "(error)")
}
else
{
let errorMessage = error.localizedDescription
self.showAlertPopup(title: "Error", message: "(errorMessage)")
}
} else {
print("discoverReaders succeeded")
}
}
Can you open the discoverReaders source code and put breakpoint there?
yes
getting this specific error (NSError) baseNSError@0 = domain: "com.stripe-terminal" - code: 1000 {
_userInfo = 0x0000000283d88a80 2 key/value pairs
}
A different error?
yes it is inside the block of discoverReader block
this error comes because the reader is offline not turned on
how can i check that reader is offline or not turn on before hitting the discoverReader
That sound like a completely different error than the one you faced initially?
I guess you would need to make sure the reader is ON before connect then
yes, working on it due the multiple tap on connect reader button this error comes up i just clicked multiple time because i did not recieved any response from reader.
so is there any method to prevent multiple time calling the discoverReader
Hmm I guess you probably need to write a stopgap before the call on your code (?) It's your code to call the function, so only your code can stop multiple time calling