3

I want to implement "logout and new login" feature from iPhone and Apple Watch.

  • I am able to clear the credentials from iPhone (Using NSURLConnection because its old code) after logout, but not able to from apple watch (Using NSURLSession).

  • I am using NSURLSession in Apple Watch as it is new and recommended by Apple.

  • I tried with ephemeralSessionConfiguration to connect with server from apple watch (Watch OS 2.0, Swift 2.0, iOS 9.0 >> ). I called: 'invalidateAndCancel' and resetWithCompletionHandler APIs to clear the credentials and no change in the behaviour.

  • Only one time it is firing the authentication challenge. After that it is always using the credentials which I provided first time. So I am not able to use the new logged in user credentials.

  • I tried to get the Credential store and cache to clear the credentials. But the shared credential store and cache is empty.

Question

Is there anything wrong with my approach ? or Is it a bug of Watch OS 2.0 ?

Nahuel Ianni
  • 3,177
  • 4
  • 23
  • 30
Rajeev
  • 31
  • 2

0 Answers0