I am forming an NSManagedObjectID
like this:
NSManagedObjectID *objectID = [store newObjectIDForEntity: entityForPlayer
referenceObject: GKLocalPlayer.localPlayer.playerID];
store
is an NSIncrementalStore
. In the debugger GKLocalPlayer.localPlayer.playerID
looks like G:12345678
but objectID
looks like <x-coredata://<UUID>/Player/pG:12345678>
.
Where does the extra p
(before the verbatim player ID) come from? It apparently does not show up with other entity types, which also use NSString
s as reference objects.
Educated guess, because it's an implementation detail:
The p
means something like permanent, because the object has been saved to the store. i.e. [objectID isTemporaryID] == NO
.
It'll be a t
if the objects hasn't been saved yet. i.e. [objectID isTemporaryID] == YES
.