<?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 PushTokenManager.js</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>8285c032 - Rename unimodules imports to expo-modules-core</title>
        <link>http://172.16.0.5:8080/history/expo/packages/expo-notifications/build/PushTokenManager.js#8285c032</link>
        <description>Rename unimodules imports to expo-modules-core

            List of files:
            /expo/packages/expo-notifications/build/PushTokenManager.js</description>
        <pubDate>Fri, 13 Aug 2021 22:46:17 +0000</pubDate>
        <dc:creator>Tomasz Sapeta &lt;tsapeta@users.noreply.github.com&gt;</dc:creator>
    </item>
<item>
        <title>db1c4130 - [expo-notifications] Add preliminary &quot;support&quot; for Web (#8853)</title>
        <link>http://172.16.0.5:8080/history/expo/packages/expo-notifications/build/PushTokenManager.js#db1c4130</link>
        <description>[expo-notifications] Add preliminary &quot;support&quot; for Web (#8853)# WhyEven though we don&apos;t support Web in `expo-notifications`, we don&apos;t want to be a pain to the users and throw errors just because of running the code on Web.# HowAdded simple object fallbacks for missing modules on web so that they are queryable by```tsif (!Module.methodAsync) {  throw new Unavailability&#8230;}```Swapped `.ts` + `.web.ts` for `.native.ts` + `.ts` (or + `.web.ts` + `.ts` where it made sense, eg. if we would need to use `localStorage` inside the `.ts` file I renamed it to `.web.ts` and added an empty fallback in `.ts`).# Test Plan- [x] Ran NCL in `bare-expo` on Web, clicked buttons around, noticed the error is readable and makes sense.- [x] Ran `expo-notifications` test-suite on both iOS and Web. It seems iOS tests are a little bit flaky, unfortunately (the errors could also happen due to erroring Expo API, HTTP error 504 when fetching push token, but I was able to make all of the tests pass just refreshing).

            List of files:
            /expo/packages/expo-notifications/build/PushTokenManager.js</description>
        <pubDate>Fri, 19 Jun 2020 00:29:04 +0000</pubDate>
        <dc:creator>Stanis&#322;aw Chmiela &lt;sjchmiela@users.noreply.github.com&gt;</dc:creator>
    </item>
<item>
        <title>cee2253d - [expo-notifications] Device push token fetching module (#6577)</title>
        <link>http://172.16.0.5:8080/history/expo/packages/expo-notifications/build/PushTokenManager.js#cee2253d</link>
        <description>[expo-notifications] Device push token fetching module (#6577)# WhyTo eventually deprecate ExpoKit.# How- created a new unimodule, disabling autolinking in the root projects- implemented `getDevicePushTokenAsync` method in TS, then in native (on iOS we rely on system framework, on Android we&apos;re using Firebase Cloud Messaging)- implemented listening to token changes### Notable changes to TS implementation- I had to juggle around types a bit to achieve what I wanted &#8212; for TS to discriminate by `type: keyof Platform.OS` value what is the type of `data` field and at the same time to use `data: any` for unsupported platforms. Types are ready, but I needed to use [`@ts-ignore`](https://github.com/expo/expo/pull/6577/commits/0bd46874ad547f6a1f196adcfc15b6d98614d94f#diff-66b6995155cd1e190f53b012f5c2a857R43-R44) to get away with it.### Notable changes to native implementation- we use singleton module for listening to token changes [android](https://github.com/expo/expo/pull/6577/commits/69ee9efd42ba725703fd3f30073564ad3574f1d6#diff-5f9ef5ef7358f7a9c8cc386d42ee934f), [ios](https://github.com/expo/expo/pull/6577/commits/0aa2b66e1342c4de084fc329866752b53b4a6a76#diff-f8332f28b28ad9a24e0af0cb435876c7)- on Android there&apos;s a service subclassing `FirebaseMessagingService` to which the singleton above subscribes [link](https://github.com/expo/expo/pull/6577/commits/69ee9efd42ba725703fd3f30073564ad3574f1d6#diff-b6817886a179022070e2417712503fa9)### Notable changes to web implementation- eventually, I guess, developers would want to customize how their app responds to notifications &#8212; for this I added a `serviceWorkerPath` manifest field [commit](https://github.com/expo/expo/pull/6577/commits/82e54aeb892b30661e0f5059e64acba70e686f85)# Test Plan- tests in `test-suite` are passing on **all three platforms** (on web puppeteer has to be run in head&#8230;ful (?) mode, otherwise overriding permissions doesn&apos;t work, which is a [known issue](https://github.com/puppeteer/puppeteer/issues/3279))- push notifications sent to device push tokens are received on **all three platforms**

            List of files:
            /expo/packages/expo-notifications/build/PushTokenManager.js</description>
        <pubDate>Tue, 14 Jan 2020 11:47:22 +0000</pubDate>
        <dc:creator>Stanis&#322;aw Chmiela &lt;sjchmiela@users.noreply.github.com&gt;</dc:creator>
    </item>
</channel>
</rss>
