Files
config-plugins/packages/react-native-dynamic-app-icon
Evan Bacon 5de4ae3e61 ci: fix versions [skip ci] (#53)
* chore(android-jsc-intl): fix version

* chore(detox): fix version

* chore(ffmpeg-kit-react-native): fix version

* chore(ios-stickers): fix version

* chore(react-native-adjust): fix version

* chore(react-native-ble-plx): fix version

* chore(react-native-blob-util): fix version

* chore(react-native-branch): fix version

* chore(react-native-callkeep): fix version

* chore(react-native-dynamic-app-icon): fix version

* chore(react-native-google-cast): fix version

* chore(react-native-pdf): fix version

* chore(react-native-quick-actions): fix version

* chore(react-native-webrtc): fix version
2022-03-15 18:57:32 -05:00
..
2021-11-23 14:22:55 -07:00
2021-11-23 14:22:55 -07:00
wip
2021-06-24 17:58:51 -06:00
2022-03-15 22:45:37 +00:00
2022-03-15 18:57:32 -05:00

@config-plugins/react-native-dynamic-app-icon

Config plugin to auto configure react-native-dynamic-app-icon

Install

Tested against Expo SDK 44

yarn add react-native-dynamic-app-icon @config-plugins/react-native-dynamic-app-icon

After installing this npm package, add the config plugin to the plugins array of your app.json or app.config.js. Then rebuild your app as described in the "Adding custom native code" guide.

Example

In your app.json plugins array:

{
  "plugins": [
    "@config-plugins/react-native-dynamic-app-icon",
    ["./path/to/image.png", "https://mywebsite.com/my-icon.png"]
  ]
}

Or as objects:

{
  "plugins": [
    "@config-plugins/react-native-dynamic-app-icon",
    {
      "AppIcon1": {
        "image": "./path/to/image.png",
        "prerendered": true
      }
    }
  ]
}

Note: Icon URLs will be downloaded and embedded at build time, you cannot push new icons OTA.

Usage

In list format, icons are named after the item index ('0', '1', '2'), they can be changed like AppIcon.setAppIcon('2') (from the package react-native-dynamic-app-icon).

This isn't tied to react-native-dynamic-app-icon in any way, so any method of swapping icons works.