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
{{ message }}
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.
Hello! I am interested in working on this issue. I am new to open source but I have two years of iOS development experience and I have published a native iOS to the App Store. May we discuss a design to solve this one?
Here is what I've found so far, please let me know if I'm on the right track:
I tested the offline scan by setting my device to airplane mode and scanning a food product.
This forces the error callback (line 442) to be called in ScannerViewController inside getProduct(barcode: ...)
The next line checks isOffline(errorCode:) and if true, call handleGetProductSuccess(barcode: ...) in order to //Assume product does not exist and store locally for later upload
For me, the error code passed is -1004 "Could not connect to the server."
Because this does not match NSURLErrorNotConnectedToInternet || NSURLErrorTimedOut isOfflineisOffline(errorCode:) returns FALSE even though I am offline in airplane mode.
I get the same errorCode (-1004) when I turn off WiFi.
Would including this NSURLErrorDomain Code=-1004 in isOffline(errorCode:) be the best way to fix this?
Offline scans are not logged to history
The text was updated successfully, but these errors were encountered: