#wullvie_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1336503248957472851
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi there, do you see any errors when dicovering the reader again?
I'm using the discoverReaders:delegate:completion method. Works perfectly on the first run: discovers the reader immediately upon searching, and connects no issue. But if i power off the reader, power it back on, there's nothing appearing / happening inside my terminal:didUpdateDiscoveredReaders method
I have a timeout that gets called after 20 seconds that gets triggered after the first discover. This cancels the current SCPCancelable. It just feels like for whatever reason the discover gets stuck after initial connection / discover call
I've ensured that there is no current "SCPTerminal.shared.connectedReader", and have this cleanup method to tidy things up: ```if (self.discoverCancelable) {
[self.discoverCancelable cancel:^(NSError * _Nullable error) {
// self.discoverCancelable = nil;
}];
}
[SCPTerminal.shared clearCachedCredentials];
// Explicitly disconnect from terminal
[SCPTerminal.shared disconnectReader:^(NSError * _Nullable error) {
if (error) {
NSLog(@"Error disconnecting reader: %@", error.localizedDescription);
} else {
NSLog(@"Reader disconnected successfully.");
}
}];```
the only error i get is from the disconnectReader, it just tells me there was no reader connected
So after a power cycle, you called discoverReaders again but the completion callback was never called?
yes. I've tried aborting my timeout and let it run indefinitely but it eventually times out on it's own
i also don't get any logs inside the didUpdateDiscoveredReaders delegate after the power cycle. nothing happens
I see, are you using the latest version of Stripe Terminal iOS sdk?
yeah. 4.1.0