Two-way sync between iPhone application and web application
The simplest solution by far is to use a UUID.
A less elegant solution is to have iPhone ids occupy a defined subset of the key space. For instance, with a 64-bit key, each iPhone could be assigned a specific pattern of the highest 20 bits.