Skip to content
This repository has been archived by the owner on Jan 18, 2022. It is now read-only.

GTMOAuth2ViewControllerTouch doesn't correctly handle dismissal with a pop gesture #26

Closed
GoogleCodeExporter opened this issue Aug 11, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. [in code] Create a new GTMOAuth2ViewControllerTouch instance and push it 
onto the navigation stack.
2. Build and run the app and cause the GTMOAuth2ViewControllerTouch controller 
to be presented.
3. Use the iOS 7 navigation stack pop gesture, but tap and drag from the left 
edge of the screen instead of doing a quick tap and swipe. Don't allow the pop 
to complete by dragging part-way across the screen then back so that the pop 
operation is effectively started and canceled.

What is the expected output? What do you see instead?

The problem is that -viewWillDisappear: is implemented instead of 
-viewDidDisappear:, so as the pop gesture is started, -viewWillDisappear: is 
called and does a state cleanup. When you cancel the pop by dragging back then 
the controller is still active but it's in an inconsistent state. By just 
renaming -viewWillDisappear: to -viewDidDisappear: (both the controller's 
method and its call to super), then the cleanup only happens when the pop has 
actually completed.

This is not something that you would notice if you tapped on the Back button 
since the pop operation always runs to completion.

What version of the product are you using? On what operating system?

This is being built against the iOS 7 SDK and is in the current source as of 
today.

Please provide any additional information below.


Original issue reported on code.google.com by steve.ch...@foliumpartners.com on 7 Mar 2014 at 8:24

@vincentjames501
Copy link

+1. We just ran into this one. This can probably be solved by using something like http://stackoverflow.com/a/20644597 and performing the necessary clean up in viewDidDisappear instead.

@thomasvl
Copy link
Member

Closing this out as GTMAppAuth is now provided by Google's identity teams and uses the required out of proc webviews to do signins; so gtm-oauth2 is being deprecated.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants