@rrebase/config-plugin-react-native-dynamic-app-icon
TypeScript icon, indicating that this package has built-in type declarations

5.0.1 • Public • Published

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

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

Install

Tested against Expo SDK 48

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.

/@rrebase/config-plugin-react-native-dynamic-app-icon/

    Package Sidebar

    Install

    npm i @rrebase/config-plugin-react-native-dynamic-app-icon

    Weekly Downloads

    0

    Version

    5.0.1

    License

    none

    Unpacked Size

    32.3 kB

    Total Files

    9

    Last publish

    Collaborators

    • rrebase