#Ronit

1 messages · Page 1 of 1 (latest)

spark egretBOT
lofty pewter
#

Looks like there is another discoverReaders being called?

sweet terrace
#

there is only one method that i am calling no any other method i had added in app

lofty pewter
#

Have you tried putting breakpoint to discorverReaders and see where it is called?

sweet terrace
#

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")
                }
           }
lofty pewter
#

Can you open the discoverReaders source code and put breakpoint there?

sweet terrace
#

yes

#

getting this specific error (NSError) baseNSError@0 = domain: "com.stripe-terminal" - code: 1000 {
_userInfo = 0x0000000283d88a80 2 key/value pairs
}

lofty pewter
#

A different error?

sweet terrace
#

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

lofty pewter
#

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

sweet terrace
#

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

lofty pewter
#

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