TIWHTML5LocalStorage w/iPhone Controls

I am attempting to use a TIWHTML5LocalStorage control on a form containing iPhone Controls. I followed the code in the LocalStorage Demo, but I do not seem to be able to save any actual values.



Are there any issues with this combination? Is this something that only works at deployment?



D2010 w/IW12

I have confirmed that the Local Storage component fails under iOS and Android. It always has an empty Items list in the ansync events.

Hi,


I have not been able to reproduce an issue with the the HTML5 LocalStorage Demo on iOS Safari.
Can you please make sure private browsing is turned off in Safari settings on iOS?

Private browsing is turned off. I can accomplish what I need using cookies, but I would rather use Local Storage. My test is very simple. I am simulating a login page. I have 3 edits and a couple of buttons.



When the login button is clicked I store the three edit values. IN the FormCreate event I call GetAllItems to populate the edits on the next visit.



When I run the test as a normal IW form everything works. When I drop an iPhoneStyle onto the form and place the edits inside an iPhone region the items are no longer loaded.



Can you send/show me the code you tested? Am I doing something wrong in the code below?



procedure TIWForm1.IWAppFormCreate(Sender: TObject);

begin

TIWHTML5LocalStorage1.GetAllItems;

end;



procedure TIWForm1.ntnLoginAsyncClick(Sender: TObject; EventParams: TStringList);

begin

TIWHTML5LocalStorage1.SetItem('phone', IWEdit1.Text);

TIWHTML5LocalStorage1.SetItem('password', IWEdit3.Text);

TIWHTML5LocalStorage1.SetItem('email', IWEdit2.Text);

TIWHTML5LocalStorage1.GetAllItems;

end;



procedure TIWForm1.TIWHTML5LocalStorage1AsyncGetAllItems(Sender: TObject; EventParams, Items: TStringList);

var I: integer;

begin

for I := 0 to Items.Count - 1 do

begin

    if Items.Names = 'phone' then

      IWEdit1.Text := Items.ValueFromIndex;



    if Items.Names = 'email' then

      IWEdit2.Text := Items.ValueFromIndex;



    if Items.Names = 'password' then

      IWEdit3.Text := Items.ValueFromIndex;

end;

end;

Hi,


I've tested this using the IWHTML5StorageDemo on iOS 6.0.
I've retested now by adding an IWiPhoneStyle and IWiPhoneRegion to the demo. Then I moved all controls except the IWiPhoneStyle into the IWiPhoneRegion.
The updated demo is still working as expected on iOS 6.0.

Your code looks OK so I'm not sure what is causing this issue.

Can you please provide a ready to run sample project that demonstrates the issue so I can further investigate this?
Can you also let me know which version of IntraWeb and iOS you are using?

I am using D2010 w/IW 12.2.20.



Here is a link to my test project.

https://dl.dropboxusercontent.com/u/44457478/Project6IWLocalStorage.zip



It is in a generic IW application state. To reproduce the condition:

1. drop a iPhoneStyle component.

2. Cut the controls.

3. Drop an iPhoneRegion

4. Paste the controls onto the iPhone region

5. Run.

Your sample project (with or without IWiPhoneStyle and IWiPhoneRegion controls) is working as expected when tested here.

I've not been able to reproduce an issue.

Have you tried running the application on a different machine with a different IW version or with a different iOS device?

If the problem persists, can you please let me know exactly which version of iOS you are using and if you are using the default Safari iOS browser?