Matt,
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.