Welcome! › Forums › Unity Plugins › In-App Web Browser › ClearCache() not working on iOS
Tagged: ClearCache iOS cache
- This topic has 3 replies, 3 voices, and was last updated 8 months, 3 weeks ago by Neyker.
-
AuthorPosts
-
July 19, 2021 at 2:01 pm #11846kfournierParticipant
Hello.
I’ve encountered issue with cache clearing on iOS.
Context:
User can login to their BIM360 account from our app to browse and download files from it.
The InAppWebBrowser is only used to handle the login to the user account. It is composed of four screens: 1) email address; 2) password; 3) right permission; 4) auth callback local url.
Then, we use the token given as parameter in the local url to perform BIM360 requests.What we want:
When the user decide to logout, or if the token is expired, the user has to log again to access online files.Problem:
If we do not clear the cache and the user try to log in again, they are directly at step 3 (they do not have to enter their email/password).
By clearing the cache (InAppBrowser.ClearCache()
) on browser close, everything is ok. On iOS, however, it does not work.Is it a known problem ? I’ve seen several posts that were either about the opposite (they did not wanted the cache to be cleared) or about Android (and from 2017/2018).
Regards,
Kévin Fournier
- This topic was modified 3 years, 2 months ago by kfournier. Reason: wrong html tags
July 23, 2021 at 9:57 am #11849PiotrKeymasterWhat are you using for storing credentials? LocalStorage? Cookies?
July 26, 2021 at 9:13 am #11852kfournierParticipantI do not now what is used by BIM360 to store the credentials. We do not have control over the credential saving by the BIM360 login page. I’ll try to firgure it out and see if we can do something about it through javascript.
I noticed that one of my sentence was incomplete in my first message:
By clearing the cache (InAppBrowser.ClearCache()) on browser close, everything is ok on Android. On iOS, however, it does not work.
Clearing the cache works well on Android so we do not have the problem on this plateform. That’s why I created this thread in the first place.
January 25, 2024 at 1:04 am #23032NeykerParticipantGood afternoon
im having the exact same issue,
i have a page that use only for a login and recieve a token in the url thats ok, but when i try to made a log out and re open the browser immediatly the cookies of the web page are not cleaned and the user pass immediatly
also im using of course the (InAppBrowser.ClearCache()) in many places trying to clean the cookies but its not working also tried InAppBrowser.CloseBrowser()
finally this system is working properly in android but not on iOS
idont know if exist a way to delete completely the instance of the web browser or somehting like that becasue when the app is closed and re open the browser works again properly also i dont know if there is a way to copy this behavior of close the app into unity of course without closing the app
-
AuthorPosts
- You must be logged in to reply to this topic.