Estimote / iOS-Proximity-SDK

Estimote Proximity SDK for iOS
https://developer.estimote.com
Apache License 2.0
61 stars 26 forks source link

Offline functionality #56

Open ksinghal opened 4 years ago

ksinghal commented 4 years ago

I am trying to implement the following use case on iOS:

  1. User opens app and we start observing proximity for certain zones
  2. User enters/exits zones
  3. User's phone goes offline and user quits app completely
  4. User opens app and observe proximity for the same zones??

I have encountered an issue with this process in which everything works until step 4. At that point, the iOS device says:

Fetching devices attached to provided tags failed!
List of attachments is empty or all requests failed due to: Optional(EstimoteProximitySDK.RequestError.connectionFailed)

I do not believe this is related to #36 since all my tags are setup properly and ii dont receive errors on steps 1-3.

Please advise if the above use case is possible, and if the EstimoteProximitySDK can cache tags and attachments from the cloud. I am especially interested in caching the data so that if there fresh launch of the app without internet, we can use the last cached data from when the app was previously online to start proximity monitoring.

chwastek commented 4 years ago

@ksinghal terribly sorry for the delay I believe you had no attachments for these beacons (not tags, attachments). If so then next release (very soon) will fix this issue, where tags will be the only thing required for Proximity SDK to work 🖖

chwastek commented 4 years ago

@ksinghal is ☝️ still an issue with offline not working? latest release 1.7.0 has few fixes and offline was proved to be working. Please ensure that Proximity SDK did store and cached your tags/attachments mappings during first online run - then (when running offline) you should see logs similar to these:

🚨Fetching devices attached to provided tags failed!
ℹ️Loaded locally stored tags mapping (total: 1).
⚠️ List of attachments is empty or all requests failed due to: Optional(EstimoteProximitySDK.RequestError.connectionFailed)
⚠️ Failed to load attachments from Cloud.
ℹ️Loaded locally stored attachments mapping (total: 0).