<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in EXDeviceInstallationUUIDService.m</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>42300cfb - [ios] Migrate installation identifier to non-backed-up storage (#11019)</title>
        <link>http://172.16.0.5:8080/history/expo/apps/eas-expo-go/ios/Exponent/Kernel/Services/EXDeviceInstallationUUIDService.m#42300cfb</link>
        <description>[ios] Migrate installation identifier to non-backed-up storage (#11019)# Why- iOS companion for https://github.com/expo/expo/pull/11005.- https://github.com/expo/expo/pull/11019/commits/1e22e08195b1b4c49650f8243eeb89b5f938b9a5 fixes https://github.com/expo/expo/issues/11008#issuecomment-726370187 ensuring future versioned `EXInstallationIdProvider`s use the common installation ID# HowImplemented https://github.com/expo/expo/pull/10261#issuecomment-725396140.- As in https://github.com/expo/expo/pull/11005, the migration code is present in ~3~2 places:  - ~in `ExpoKit` for managed apps relying on legacy notifications~  - in `expo-constants` for bare workflow apps and for managed workflow apps (`EXKernel` now uses `expo-constants` directly to fetch installation ID)  - in `expo-notifications` for bare workflow apps that for some reason do not get UUID migrated by `expo-constants` (eg. because they do not have `expo-constants` installed or have installed in older version).- To expose common, migrated `deviceInstallUUID` to versioned `expo-constants` code I&apos;ve added a simple kernel service plugged into already versioned `EXConstantsBinding`s.# Test PlanI have verified (previously) that:- `Constants.installationId` from running Expo client on `master` is the same as `.installationId` returned when running Expo client on this branch- `expo-notifications`&apos;s installation ID from running Expo client on `master` is the same as `installationId` returned when running Expo client on this branch- removing and reinstalling Expo client **does not** generate a different installationId (as we know keychain isn&apos;t removed!)- if we fetch an invalid UUID from the Keychain, new UUID is generated- I experienced an app freeze once on `__ulock_wait`, when waiting for return from `SecItemCopyMatching` which isn&apos;t a common issue and were only a few reports online of# Test approach #2Test scenarios for installation identifiers:- **on an experience running on SDK39 when Expo client upgrades**  - SDK39 `EXConstantsService` used `NSUserDefaults.EXDeviceInstallUUIDKey` which is now cleared by migration. Patched `EXConstantsService` uses `EXDeviceInstallUUIDManager` kernel service which provides it with the &quot;common&quot; ID, migrated from the `NSUserDefaults.EXDeviceInstallUUIDKey`, so the value doesn&apos;t change. &#9989;   - SDK39 `EXInstallationIdProvider` used `NSUserDefaults.ABI39_0_0EXDeviceInstallUUIDKey` which is not cleared by any migration. **Identifier keeps being backed-up** but it doesn&apos;t change. &#9888;&#65039; - **when an experience using SDK39 upgrades to SDK40 in Expo client**  - SDK39 `EXConstantsService` used `NSUserDefaults.EXDeviceInstallUUIDKey` which got migrated to keychain. SDK40 `EXConstantsService` uses the same keychain entry as the migrator, so they&apos;re using the same value. &#9989;   - SDK39 `EXInstallationIdProvider` used `NSUserDefaults.ABI39_0_0EXDeviceInstallUUIDKey` while SDK40 uses common device UUID the sources are obviously different. Token changes. &#10060;  This is a bug introduced with `expo-notifications` Expo client integration, we can&apos;t do anything about it apart from fixing it in SDK40, IDs for old SDKs are already created and will be used in corresponding SDKs and if we didn&apos;t do anything about it in SDK40, the ID per experience would change nonetheless, so let&apos;s change it this time for the last time.- when standalone app using SDK39 upgrades to SDK40  - Unversioned SDK39 `EXConstantsService` used `NSUserDefaults.EXDeviceInstallUUIDKey` which gets migrated to keychain, unversioned SDK40 `EXConstantsService` uses the same keychain entry as common UUID, no changes. &#9989;   - Unversioned SDK39 `EXInstallationIdProvider` used `NSUserDefaults.EXDeviceInstallUUIDKey` which gets migrated to keychain, unversioned SDK40 `EXInstallationIdProvider` uses the same keychain entry as common UUID, no changes. &#9989; - when an SDK39 project ejects to bare  - SDK39 `EXConstantsService` used `NSUserDefaults.EXDeviceInstallUUIDKey`, the same which is used in bare, &#9989;   - SDK39 `EXInstallationIdProvider` used `NSUserDefaults.EXDeviceInstallUUIDKey` in standalone apps, but `NSUserDefaults.ABI39_0_0EXDeviceInstallUUIDKey` in Expo client. Token changes on developers&apos; devices. &#9888;&#65039; - when an SDK40 project ejects to bare  - SDK40 `EXConstantsService` used `EXDeviceInstallUUIDKey` keychain entry, the same which is used in bare, &#9989;   - SDK40 `EXInstallationIdProvider` used `EXDeviceInstallUUIDKey` keychain entry, the same which is used in bare (`EXDeviceInstallUUIDKey`), &#9989; - when a bare project upgrades `expo-notifications` or `expo-constants`  - both projects have migrators that move `EXDeviceInstallUUIDKey` value from `NSUserDefaults` to keychain, token doesn&apos;t change. &#9989;

            List of files:
            /expo/apps/eas-expo-go/ios/Exponent/Kernel/Services/EXDeviceInstallationUUIDService.m</description>
        <pubDate>Thu, 19 Nov 2020 12:52:49 +0000</pubDate>
        <dc:creator>Stanis&#322;aw Chmiela &lt;sjchmiela@users.noreply.github.com&gt;</dc:creator>
    </item>
</channel>
</rss>
