简体   繁体   中英

How to clear IOS simulator memory cache

In my ionic app I set tokens in local memory:

 set: function(key, value) {
        $window.localStorage[key] = value;
      },

This works fine. When i ran the app in ios simulator for the first time.. it detected that there was nothing in the localstorage and behaved accordigly. However everytime I run the app in the simulator now.. it always detects the token . I would like to clear the localStorage in the IOS simulator for my app.

Whats the process to do this ?

Just treat your simulator like a real iPhone. Click and hold one of the icons so they all wiggle. Then delete your installed app. This will remove its saved data.

Hit - H (like the home button on the phone) to exit wiggle mode.

Open the simulator. Open the iOS Simulator, in the top Menu bar: Hardware -> Erase All Content and Settings... . This will clear the whole simulator to default settings as well as remove any apps you have installed and their associated stored data.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM