Did you by any chance delete the app from the phone before the test where the data disappeared?
In iOS, Apple will automagically delete associated data when an app is removed. However, if you just install a revised app (with the same “bundle id”) the data is retained. This is an iOS thing; not Xojo.