Using cookies with iPhone/iPod


Is there a trick to using cookies with the iPhone/iPod.  I have the newest IW and cookied do not seem to be working in my app.  I think I have cookies enabled in the ipod I am using but it does not have the value the next time I go into the program.  Is there some trick.
I have this in the region render of the login region (I have also tried it in the create of the region)
  IWEdit1.Text := WebApplication.Request.CookieFields.Values['ID'];
I have this in on AsyncButtonClick of the Log In button on
a region
  with WebApplication.Response.Cookies.Add do
    Name := 'ID';
    Value := IWEdit1.Text;

Do cookies work when you run the application in a desktop browser?

We can only provide support for TMS products.
For general questions about IntraWeb please refer to for further assistance.

I can understand that.  I thought since it was on the iphone and I was pulling the values into one our your iphone components there might be something you might know about accessing cookies with the iphone that might not be generally know to interweb.

Joseph Gordon


I was able to use localStorage to get this to work.  I have put
in the OnFocus of the ScriptEvent code of the edit control:
               this.value =  localStorage.getItem('MyID')
and in the OnClick ScriptEvent of the button click that does the
log in:
and that seems to be working.  (note that Java cares about
capitalization and that it's lower case L and upper case S
and lower case s and uppercase i)
BTW, instead of putting the load in the OnFocus of the edit,
you might be better off puttin in an AddToInitProc in the
FormCreate that says:
             AddToInitProc('IWEDIT0IWCL.value =  localStorage.getItem(''MyID'')')
So, the value gets set earlier.

I am having a little problem with this.  When I run it again the

values are showing right on the screen (on the client), but
when the code executes to use them, the Delphi (server)
does not seem to have the right values.  Do I need to do
anything to get the value back into the Delphi when I set
it in the script?