npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-native-app-update-helper

v1.0.5

Published

This packages provides a customizable update overlay.

Downloads

8

Readme

React Native App Update Helper

Build Test MIT License Version

A customizable package designed to efficiently manage app update notifications across iOS and Android platforms. It automates app version fetching from PlayStore/AppStore to prompt users for optional and mandatory updates. Plus, you can add an optional "What's New" overlay to keep users informed about the latest features and changes.

Motivation

🚀 Getting users to updated apps across multiple platforms can be tricky. That’s why we built React Native App Update Helper package.

Our goal is simple: happy users, happy developers!

Inspired by the need for a seamless, cross-platform solution, this package helps you manage updates effortlessly while keeping everyone in the loop with the latest features and improvements.

Key Features

🎯 Auto Update Overlay

  • Instant Results: Just provide the PlayStore/AppStore links and current version, and the package will automatically fetch the latest version and prompt users to update when needed.

🛠️ Go Manual

  • Full Control: Take charge of the update overlay logic, so you decide exactly when and how users are prompted to update.

🔍 What's New

  • Feature Highlights: Easily showcase the latest features, improvements, and bug fixes with a dedicated "What's New" section.

📱 Platform Support

  • iOS & Android: Ensure a consistent and smooth update experience across all devices.

🚀 Easy Setup

  • Get Started Quickly: Simple installation and setup instructions to have you up and running in no time.
  • Smooth Integration: Seamlessly integrate with your existing React Native app.

🎨 Highly Customizable

  • Branding: Tailor the overlays to match your app's look and feel.
  • Flexibility: Adjust colors, fonts, and layout to suit your style.

Installation

Install the package.

npm install react-native-app-update-helper

Install the dependences.

npm i @react-native-async-storage/async-storage

Requires React Native 0.60+

Remember to install the pod with:

npm pod install

✨ Note: The package supports only semantic type of versioning.

Usage

Begin by importing the package into your screen to start using it.

import {AutoUpdateOverlay, ManualUpdateOverlay} from 'react-native-app-update-helper';

Automated Update

Start with the simplest setup: this configuration provides automated logic for running the update overlay with a clean, default style.

 <AutoUpdateOverlay
    currentVersion={APP_VERSION}
    iosStoreLink={iosLink}
    androidStoreLink={androidLink}
/>

Add Your Flavor: Customize your overlay by tweaking the main title, description, colors, button title, and icon to perfectly match your app’s style.

 <AutoUpdateOverlay
    icon={custom_icon}
    mainTitle="CUSTOM NOTE"
    description="Custom description!"
    buttonTitle="CUSTOM BUTTON"
    primaryColor="#ABC123"
    backgroundColor="#EEE777"
    titleFontFamily="Mulish-Bold"
    descriptionFontFamily="Mulish-Regular"
    buttonTitleFontFamily="Mulish-SemiBold"
    titleFontSize={18}
    descriptionFontSize={14}
    buttonTitleFontSize={16}
    currentVersion={APP_VERSION}
    iosStoreLink={iosLink}
    androidStoreLink={androidLink}
/>

What's New Section: Choose whether to display the "What's New" section and personalize its content to fit your app’s updates.

✨ Note: If you don’t provide a custom description, it will be automatically pulled from the store’s "What's New" section.

 <AutoUpdateOverlay
    currentVersion={APP_VERSION}
    iosStoreLink={iosLink}
    androidStoreLink={androidLink}
    isWhatsNewRequired //true by default
    whatsNewDescription={'We have updated Our App!'}
/>

Manual Update

For complete control over the update process, switch to the Manual Update Overlay and manage the setup yourself.

 <ManualUpdateOverlay
    updateAvailable={true}
    isMandatoryUpdate={true}
    onDismissButtonPress={() => dismissUpdateOverlay(false)}
    iosStoreLink={iosLink}
    androidStoreLink={androidLink}
  />

Add Your Flavor: Customize your overlay by tweaking the main title, description, colors, button title, and icon to perfectly match your app’s vibe.

 <ManualUpdateOverlay
    icon={custom_icon}
    mainTitle="CUSTOM NOTE"
    description="Custom description!"
    buttonTitle="CUSTOM BUTTON"
    primaryColor="#ABC123"
    backgroundColor="#EEE777"
    titleFontFamily="Mulish-Bold"
    descriptionFontFamily="Mulish-Regular"
    buttonTitleFontFamily="Mulish-SemiBold"
    titleFontSize={18}
    descriptionFontSize={14}
    buttonTitleFontSize={16}
    updateAvailable={true}
    isMandatoryUpdate={true}
    onDismissButtonPress={() => dismissUpdateOverlay(false)}
    iosStoreLink={iosLink}
    androidStoreLink={androidLink}
  />

What's New Section: Choose whether to display the "What's New" section and personalize its content to fit your app’s updates.

✨ Note: To automatically fetch the description from the store’s "What's New" section, make sure to provide the current version. If not, you can manually set the content yourself.

 <ManualUpdateOverlay
    updateAvailable={true}
    isMandatoryUpdate={true}
    onDismissButtonPress={() => dismissUpdateOverlay(false)}
    isWhatsNewRequired //true by default
    whatsNewDescription={'We have updated Our App!'} // not required if fetching content automatically
    currentVersion={APP_VERSION} //required if isWhatsNewRequired is set to true
    iosStoreLink={iosLink}
    androidStoreLink={androidLink}
  />

Properties

Common properties (optional)

| Prop | Description | Type | | --------------------------- | ------------------------------------------------------------------------------------------- | --------- | | icon | Top icon. | Image | | mainTitle | Main overlay title. | String | | description | Main overlay description. | String | | buttonTitle | Allows to customize the 'Update' button title. | String | | isWhatsNewRequired | Indicates whether the What's New section is shown. | Boolean | | whatsNewDescription | Sets custom content for the What's New section (overwrites automated fetch of the content). | String | | primaryColor | Sets custom background color for the buttons. | String | | backgroundColor | Sets custom background color. | String | | titleFontFamily | Sets custom font family for the main title. | String | | descriptionFontFamily | Sets custom font family for the description. | String | | buttonTitleFontFamily | Sets custom font family for the button titles. | String | | titleFontSize | Sets custom font size for the main title. | Number | | descriptionFontSize | Sets custom font size for the description. | Number | | buttonTitleFontSize | Sets custom font size for the button titles. | Number |

Automated version update properties (required)

| Prop | Description | Type | | ---------------------- | ------------------------------------------------------------------------ | -------- | | currentVersion | Requires the application's current version. | String | | iosStoreLink | Requires a link to the currently published application in the App Store. | String | | androidStoreLink | Requires a link to the currently published application in Google Play. | String |

Manual version update properties

| Prop | Description | Type | | -------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------- | | updateAvailable | Indicates whether the overlay should be shown or hidden. Required | Boolean | | isMandatoryUpdate | Defines whether the update is mandatory or non-mandatory. Required | Boolean | | whatsNewDescription | Manually ets the content for what is new in the update. Available only if isWhatsNewRequired = true. | String | | onDismissButtonPress | Dismisses the overlay. Required | Function | | currentVersion | Requires the application's current version. Required only if isWhatsNewRequired = true and fetching automatically. | String | | iosStoreLink | Requires a link to the currently published application in the App Store. Required | String | | androidStoreLink | Requires a link to the currently published application in Google Play. Required | String |

License

This project is licensed under the MIT License - see the LICENSE file for details.