My goal is to create a unique hex id string using a random number. I accomplish this in JavaScript with the following code:
var id = (
Math.random() * Math.pow(10, 17) +
Math.random() * Math.pow(10, 17) +
Math.random() * Math.pow(10, 17) +
Math.random() * Math.pow(10, 17)
).toString(16);
This results in a random id such as: "2d50e9b4835d7e0".
I am now looking for a similar method in iOS that can generate a string of the same length (15 characters). Does anyone know of an iOS function that can achieve this?