Expo notification icon changed to expo icon after build

See original GitHub issue

Summary

Hello! 😃

I rebuild my app (managed workflow) and I noticed that the notification icon was changed to the expo icon (was working before, I didn’t touch that part of the code. so I think it’s something with the build)

My notification icon is transparent, white color, 96x96 .

One change that I did was add the adaptative icon for android (That is why I rebuild) But Idk how it would affect.

Managed or bare workflow? If you have ios/ or android/ directories in your project, the answer is bare!

managed

What platform(s) does this occur on?

Android

SDK Version (managed workflow only)

40

Environment

Expo CLI 4.1.6 environment info: System: OS: macOS 11.0.1 Shell: 5.8 - /bin/zsh Binaries: Node: 12.13.0 - /var/folders/8x/7l7_wyss71nd6k7c457vy4fw0000gn/T/yarn–1613245695845-0.0698875867472597/node Yarn: 1.22.10 - /var/folders/8x/7l7_wyss71nd6k7c457vy4fw0000gn/T/yarn–1613245695845-0.0698875867472597/yarn npm: 6.14.8 - ~/.nvm/versions/node/v12.13.0/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman Managers: CocoaPods: 1.9.3 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2 IDEs: Xcode: 12.4/12D4e - /usr/bin/xcodebuild npmPackages: expo: ^40.0.0 => 40.0.0 react: 16.13.1 => 16.13.1 react-native: https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz => 0.63.2 Expo Workflow: managed

Reproducible demo or steps to reproduce from a blank project

I can’t share a snack since the issue is the notification icon.

Notification app.json:

"notification": {
      "color": "#F3933F",
      "icon": "./assets/images/notification-icon.png"
    },

I ran expo doctor to ensure that the notification image is found, even in the build logs it finds the icon and upload it to cloudfront correctly.

UPDATED: the info of the icon file assets/images/notification-icon.png: PNG image data, 96 x 96, 8-bit gray+alpha, non-interlaced

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
lHerseycommented, Feb 14, 2021

I fixed my problem but I think there is an issue, the problem was that on adaptive icon I was using

"adaptiveIcon": {
        "backgroundImage": "./assets/adaptive-icon.png",
        "backgroundColor": "#fff"
 },

and I changed it to:

"adaptiveIcon": {
        "foregroundImage": "./assets/adaptive-icon.png",
        "backgroundColor": "#fff"
  },

And is working! ❤️

Was my mistake but my question is: should this affect the notification icon?

0reactions
cruzachcommented, Feb 15, 2021

thanks! was able to reproduce it. My guess is this issue lies somewhere here

Read more comments on GitHub >

github_iconTop Results From Across the Web

Notifications - Expo Documentation
Handle notifications when the app is in foreground,; Imperatively dismiss notifications from Notification Center/tray,; Create, update, delete Android ...
Read more >
How to change icon and the app name of the expo push ...
Try in standalone build. It will be changed to the app's name and icon in standalone build. If you are running your app...
Read more >
Feature request: IOS dynamic app icons | Voters - Expo
The app icon is bundled into the native assets, and set in such a way that it wouldn't be changeable from JS without...
Read more >
Android: Notification Icons - OneSignal Documentation
If you've very recently added an icon resource to your app, you may want to wait a few days before sending notifications using...
Read more >
Notification icon not displaying on my expo app - Reddit
I'm using expo sdk 42 and my notification icon is not showing. This is my app json and the paths for all icons:...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found