I'm building an iOS app in which i have implemented Fabric and using Digits for login.When login is successful session remains open.
I'm facing an issue i want to clear the app cache to reset the session so user can login again with a new phone number.But it is not happening.
The code i'm using to clear the app cache:
- (void)viewDidLoad {
[super viewDidLoad];
[[NSURLCache sharedURLCache] removeAllCachedResponses];
}
Help is appreciated!
Rather than go low-level and mess with NSURLCache, you can use your library's own high-level mechanics:
[[Digits sharedInstance] logOut]