views:

961

answers:

1

I'm currently working on an iPhone app.

This app has a login screen, also a signup screen.

After the user has successfully signed up, I dismiss the signup view, then the app automatically logs in using the created account. After which, the login view is dismissed, showing the main view.

I'm trying to modify this by immediately dismissing the login view, since I already have the account details of the user when the signup is successful. Basically, the ideal flow is: after the user successfully signs up, I save the username and password in a singleton class, then dismiss the signup view. When I get to the parent view (which is the login screen), I have a variable that checks if there was a successful signup. If that variable is true, I want to immediately dismiss the login view.

However, I come across this error message: Data Formatters temporarily unavailable, will re-try after a 'continue'. (Unknown error loading shared library "/Developer/usr/lib/libXcodeDebuggerSupport.dylib")

I'm not really sure why this happens. I have no problems dismissing the login view when I go through the actual login procedure - which of course also dismisses the login view if the user inputs a correct username and password.

I'm not exactly sure, but I'm starting to think that the iPhone cannot handle dismissing 2 view controllers almost at the same time.

Is it possible that I'm dismissing the login view too quickly? Is that a factor? Is there anyway for me to be able to dismiss 2 view controllers almost simultaneously without coming across this error message?

A: 

It seems likely that dismissing 2 UIViewControllers at the same time is the cause of this error (I have seen it for various other reasons, including running short of memory).

Try a different flow, where you check for the saved values first, then load your main view if valid, or the login view if not. I do this in one app, and it works fine.

Paul Lynch
But the main view is the parent view controller of my login view, and it (main view) is loaded in the application didFinishLaunchingWithOptions method. Wouldn't reloading it cause a problem somewhere? And I also have a logout button in the home view, which simply pushes the login view. That would stack up my views assuming that after logging out, the user might want to signup with a different username.I also considered memory issues, so I checked my app for possible leaks - using the build and analyze function in xcode and the run with performance tools (leaks and activity monitor).
iphone newbie
So I'm pretty sure my app isn't really running short of memory.
iphone newbie