Twitch login | Swift

i need to implement the Twitch login in Swift app with implicit-grant-flow

I think i should use this Authenticating a User Through a Web Service from apple for use a web authentication session to authenticate a user in my app (in this case Twitch login page).

I do not understand how can i catch the token after the login , “Your app’s registered redirect URI. The access token is sent to this URI.” , in my case i should set http://localhost for iphone ?

Since you asked this on StackOverflow too I answered there