Esri / data-collection-ios

Mobile data collection app using the iOS Runtime SDK.
https://developers.arcgis.com/
Apache License 2.0
25 stars 26 forks source link

Bug fix for maps requiring credential #147

Closed esreli closed 5 years ago

esreli commented 5 years ago

I've determined the behavior the app was experiencing was due to an app bug (as reported in this issue: https://github.com/Esri/data-collection-ios/issues/141)

When a user logged out, the AppContext built a new AGSPortal and published the new portal to the rest of the app. The problem was, just because a new AGSPortal was built, does not mean that a corresponding new AGSMap(item: AGSPortalItem) was built as well. If the app was in online mode, a reference persisted to the map built using the previous portal, as well as the credentials. Those credentials would then get re-entered into the credential cache.

Now, when a new portal is loaded- if successful and app work mode is online, a new AGSMap is built using a AGSPortalItem derived from the new AGSPortal. If unsuccessful and app work mode is online, the current map is set to nil.

esreli commented 5 years ago

@nixta i'll confirm.