-[NXOAuth2AccountStore handleRedirectURL:] returns a BOOL and a NSError is created further down in -[NXOAuth2Client openRedirectURL:] if the redirect URL contains an error. The way to get the error is to listen to a notification.
It's more obvious how to get the error if a (NSError**) error parameter is passed in. This also conforms to the pattern recommended by Apple. Nothing is asynchronous, so a notification is not necessary. I left the notification in however.
When I checked out NXOAuth2 I didn't immediately understand what to do with the redirect URL, so I emphasized that in the README.
-[NXOAuth2AccountStore handleRedirectURL:]
returns aBOOL
and aNSError
is created further down in-[NXOAuth2Client openRedirectURL:]
if the redirect URL contains an error. The way to get the error is to listen to a notification.It's more obvious how to get the error if a
(NSError**) error
parameter is passed in. This also conforms to the pattern recommended by Apple. Nothing is asynchronous, so a notification is not necessary. I left the notification in however.When I checked out NXOAuth2 I didn't immediately understand what to do with the redirect URL, so I emphasized that in the
README
.