[aerogear-dev] More on AeroGear - iOS

Yagyesh yagyesh.agrawal at itpeoplecorp.com
Fri Jun 13 03:39:58 EDT 2014


1. 
Recently, while working on GoogleDrive iOS sample i found that the app was
not being notified back if user chose 'Cancel' instead of 'Accept' on the
Google's OAuth permission page. The returned url from Google looks something
like this:
org.aerogear.googledrive:/oauth2Callback?error=access_denied

And below is the code snippet from requestAuthorizationCodeSuccess method of
AGRestOAuth2Module:
------------------------------
// extract the code from the URL
            NSString* code = [[self parametersFromQueryString:[url query]]
valueForKey:@"code"];
            // if exists perform the exchange
            if (code)
                [self exchangeAuthorizationCodeForAccessToken:code
success:success failure:failure];
 ----------------------------

If user denied permissions, 'code' would be nil and there is no else part. I
believe there should be a way to notify the app. 

2. 
Another thing that i could not achieve was multipart upload. I'm not sure if
i did anything wrong but no matter what i tired i always used to get 'Bad
request' error. If multipart upload works for iOS, is there any example that
i can refer to? If multipart is not tested throughly, it would be time for
me to bring up wireshark, see how the request is actually being sent over
http & hopefully fix multipart upload for iOS.
 



--
View this message in context: http://aerogear-dev.1069024.n5.nabble.com/More-on-AeroGear-iOS-tp8157.html
Sent from the aerogear-dev mailing list archive at Nabble.com.


More information about the aerogear-dev mailing list