Skip to main content

Guest Login

Android

caution

Android unique identifiers are usually associated with sensitive user data, it is recommended to follow the Best practices for unique identifiers to distinguish your players.

An Android Universally Unique Identifier (UUID) is a 128-bit value that is generally known to be unique across space and time. Player Network identifies players based on their OpenID, which corresponds to the Android GuestID generated by the Android UUID. Therefore, any change in the GuestID will also lead to a change in the corresponding OpenID.

The Android GuestID is generated by the below logic with the code: UUID.randomUUID().toString();.

Image: Android GuestID Creation Process

Loss of GuestID

If players uninstall and reinstall the game, or delete their app data, their GuestID will be lost. Additionally, the GuestID will be lost if players reset their device or restore factory settings.

Since Android GuestIDs can be so easily lost, games should advise their players to link their guest accounts to LEVEL INFINITE PASS or other third-party channels.

iOS

The Identifier for Vendors (IDFV) is an unique identifier for vendors. All apps created by the same vendor on a device share the same IDFV. However, the IDFV differs for apps that are developed by different vendors on the same device, or for apps that are developed by the same vendor but on different devices.

Player Network uses IDFV as the iOS GuestID to generate the OpenID for a player to enter the game without creating an account. For more information on how Apple generates the IDFV, see identifierForVendor.

Keychain Storage

Though the IDFV does not change when the app (or another app from the same vendor) is installed on the device, it could change when:

  • The device is reactivated as a new device after a system upgrade or downgrade.
  • The device is restored to factory settings, and device data was erased.
  • The user reinstalls one or more apps from a vendor after deleting all apps from the vendor.
  • A test build of the app is installed on the device using Xcode, or the app is installed on the device using an ad-hoc distribution.

Saving the iOS GuestID to the keychain ensures that players get the same GuestID even in the scenarios mentioned in the previous section. The keychain is a secure and encrypted system-level SQLite database located at /private/var/Keychains/keychain-3.db on iOS devices to store sensitive information such as usernames, passwords, network passwords, and authentication tokens for different apps. Each key chain item contains one piece of information and its attributes, such as a password and its attributes.

Access groups are used to securely share keychain items among apps and do not require user permissions. Apps from the same keychain access group can share their keychain items once Keychain Sharing is enabled in Xcode. While apps have at least one private access group with the name of their App ID (a Bundle ID prefixed by an Apple-generated Team ID), and any number of keychain access groups, keychain items have only one access group. The name of the keychain access group is the Team ID that Apple generated, followed by a common string, typically in the form of a reverse DNS domain like the Bundle ID.

Image: iOS AppID

If apps do not specify the access group for a keychain item and Keychain Sharing is enabled, the first access group in the list configured for the app is used by default. However, if Keychain Sharing is not enabled or the app does not have any keychain access groups, the app's private access group in the name of the App ID is used by default.

Therefore, if app A saves data without enabling Keychain Sharing and app B enables Keychain Sharing, app B could add app A's App ID to its keychain access group to get data saved by app A.

It is recommended to make the private access group in the name of the App ID the first access group. This could avoid data loss due to access groups being deleted during version upgrades.

App Transfer

Developers can transfer the apps they own to another App Store Connect account if they sell the app, move to another organization, or experience other similar events. After an app is transferred, it is still available in the App Store or Mac App Store with all the ratings and reviews preserved, and users still have access to future updates.

For more information, see Overview of app transfer.

After an app is transferred, the associated App ID is also transferred. As different developer accounts have different Team IDs, the App ID of the transferred app now has a new Team ID as the prefix. If the earlier version has saved data to the keychain, developers will receive a Potential Loss of Keychain Access warning when they release an update of the app with a new developer account on App Store. This means that the updated app cannot access data saved to the keychain associatedd with the App ID prefix of the previous Team ID.

note
  • When an app is transferred, its Bundle ID does not change. If the App ID of the transferred app is a Wildcard App ID, it is converted to an explicit App ID that fully matches the Bundle ID.
  • A one-time loss in keychain data will occur if you switch your App ID prefix and a transferred app cannot maintain access to the prior keychain associated with the App ID prefix of the previous owner.
  • The keychain access will only be lost after an update to the app is released on the App Store.

Impact of app transfer on the loss of guest account

If Keychain Sharing is not enabled, the app transfer has no impact on guest accounts. However, if the app has enabled Keychain Sharing, there is a strong possibility that the Guest IDs will be lost.

If developers update a transfered app that has stored GuestIDs to the keychain, the GuestIDs will be lost. However, as Player Network takes IDFV as the GuestID to generate the OpenID, the GuestID remains the same as the one previously saved in the keychain if the new IDFV is identical to the previous one. Therefore, the loss or retention of guest accounts depends on whether the IDFV value used for guest login changes due to a version change.

The following table describes different impacts of app transfer on guest accounts:

Has an earlier version been uninstalledHow is a later version installedAre guest accounts lostRemark
UninstalledUninstalled and re-installLostIDFV will change
UninstalledApp Store upgradeLostIDFV will change
Not uninstalledApp Store upgradeRetainedIDFV will not change
note
  • This table makes no mention about how system upgrades or system recoveries may lead to the loss of guest accounts.
  • The table above does not consider whether other apps from the same vendor are installed on the device.