Best way to store iOS OAuth token?

I am writing an iOS application that uses the Twitch.tv API to allow my application to access their contents. They use the OAuth 2.0 protocol for authentication. I need to use this access token every time I make a request to access user information.

My question is where to store it?

Should I create a class with this property? In this class, I could also store the Redirect URI and Client_ID to store things in one place.

I thought about NSUserDefaults, but I did not read it very safely.

What is the best design pattern for this approach in iOS?

Thank.

+3
source share
1 answer

, , , , . NSUSerDefaults, , . , , . , .

, NSUserDefaults, keychain iOS. . , 4- - , . , .

+1

All Articles