Customizations
Native customizations
In this page we'll dive deeper into several aspects of our Android and iOS libraries that can be customized to match your needs. Most of the options in iOS are set through NotificareServices.plist
file, make sure to set its location in your app.json
:
{
"expo": {
// more code...
"plugins": [
[
"react-native-notificare",
{
"ios": {
"optionsFile": "./configuration/NotificareOptions.plist"
}
}
]
]
}
}
An empty NotificareServices.plist
will look like the following:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
</dict>
</plist>
Notification Icon Settings
This customization is only available for Android. Notificare will use the application icon as the icon for notifications. You can change this behaviour by specifying the following in your app.json
:
{
"expo": {
// more code...
"plugins": [
[
"react-native-notificare-push",
{
"android": {
"notification": {
// Local path to an image used as the icon for push notifications. The image should be a 96x96 all-white PNG with transparency.
"smallIcon": "./assets/notification-icon.png",
// Tint applied to notifications small icon when it appears in the notification drawer. (Ex: "#ffffff")
"smallIconAccentColor": "#fc0366"
}
}
}
]
]
}
}