Is there a way to obtain a unique ID for the device to add to the attributes of a data point? At first I thought AppFramework.device would provide this, but it is not constant from one app execution to the next.
You can either write some logic to create your own unique ID and store it in QSettings, or if you are using AppStudio (which it looks like you are), you can use AppFramework's createId() method to get a unique ID, and store it in the settings with AppFramework's Settings. This should persist between sessions, but wouldn't be accessible between multiple apps (as iOS apps are sandboxed). Hopefully this gets you on the right track.
Any idea on what the AppFramework's createId() method actually does? I remember trying this and I'm pretty sure it creates a different id every time you run it, which means it isn't directly tied to that device. E.g. if you delete and re-install the app, you would never get the same id back - is that correct?
FYI for others, I asked a similar question in the AppStudio space:
How to query the device/computer type such as manufacturer?
createId() will create a unique ID every time it is invoked. So you would need to code some logic into your app so that if the Settings does not yet have an ID set, then to call this function, and set that ID. Else, it would not call the method, and just use the ID that has been already generated. However, you are correct that if the app was deleted, that it would not be tied to this ID.
Retrieving data ...