Thinking about that there is a small txt file generated but the application
just to know who was the last user logged in. This is write when
successfully login is made, and is read at startup to be faster than open
sqlite and read this info.
But, to read is a simple, on ViewAppear:
if
(File.Exists(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolde
r.Personal), "File.txt")))
{
using (StreamReader streamReader = new
StreamReader(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolde
r.Personal), "File.txt")))
{
textBoxUser.Text = streamReader.ReadLine();
}
}
And to write is just, on button tap event:
using (StreamWriter streamWriter = new
StreamWriter(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolde
r.Personal), "File.txt"), false))
{
streamWriter.WriteLine(Login);
}
I think about that because a few times on simulator when back to this screen
with a "logoff" button, an error occurs, speaking about excessive number of
locks in file, something like that, when trying to read it. But really
strange btw.
But maybe it can be at least a small seed to make thinking grow up,
Thanks,
Karl
From: René Ruppert <[email protected]>
Date: quarta-feira, 1 de agosto de 2012 03:46
To: Karl Heinz Brehme Arredondo <[email protected]>
Cc: David Junod <[email protected]>,
"[email protected]" <[email protected]>
Subject: Re: [MonoTouch] App rare times do not open until reinstall
I've had exactly the same problems. Killing in task manager didn't help,
neither did a reboot. I suspect some kind o locks in the keychain or in the
file system. I've never been able to explain the issue.
Grüße, René
Am 01.08.2012 um 05:34 schrieb Karl Heinz Brehme Arredondo
<[email protected]>:
> Nope, no external things.. Just MonoTouch and .Net
>
> Thanks,
>
> Karl
>
> From: David Junod <[email protected]>
> Date: terça-feira, 31 de julho de 2012 21:59
> To: Karl Heinz Brehme Arredondo <[email protected]>
> Cc: "[email protected]" <[email protected]>
> Subject: Re: [MonoTouch] App rare times do not open until reinstall
>
> are you using any sort of Analytics that try to connect to a web server?
>
> On Jul 31, 2012, at 3:54 PM, Karl Heinz Brehme Arredondo
> <[email protected]> wrote:
>
>> Hi,
>>
>> Is there something that could explain that an application that always open in
>> about 2 seconds (the only work is to init and open a custom ViewController,
>> no network, no database, no nothing than mount the screen from Interface
>> Builder) some rare times get more than 15~20 seconds and is killed?
>>
>> This few random users that rare times has that problem are instructed to
>> close all open applications and also restart iOS, but nothings help. For now,
>> just uninstall and reinstall the same version solves the problem Since it
>> doesn't open, I can't do nothing to track or to save user database not
>> sync'ed yet because application do not open anymore. No database is reading
>> startup, just after user type user and password and enter. But they never see
>> the log on screen.
>>
>> I never saw this on simulator or my device, nor other employees that help on
>> test and validations before go to users.
>>
>> Thanks,
>>
>> Karl
>> _______________________________________________
>> MonoTouch mailing list
>> [email protected]
>> http://lists.ximian.com/mailman/listinfo/monotouch
>
> _______________________________________________
> MonoTouch mailing list
> [email protected]
> http://lists.ximian.com/mailman/listinfo/monotouch
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch