Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rn-boiler-template

Package Overview
Dependencies
Maintainers
1
Versions
302
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rn-boiler-template

Clean and minimalist React Native template for a quick start with TypeScript and components

  • 1.70.11
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
297
increased by165.18%
Maintainers
1
Weekly downloads
 
Created
Source

Welcome to the Boilerplate React Native

:fireworks: Clean and minimalist React Native template for a quick start with TypeScript and so much more components.

Current version: 0.70.3

:star: Features

  • Elegant usage directly within the RN-Boiler Cli
  • Fastlane (App center included)
  • Boot Splash
  • Blur Hash
  • Consistent with the default React Native template
  • Minimal additional dependencies
  • Lots of built-in components
  • Native modules
  • Multiple schema ios(Dev/Prod as default)
  • Multiple productFlavors android (dev/prod as default)

Base config (Now u can config on env)

  • Change App name APP_DISPLAY_NAME on env/(.dev/.prod)
  • Change App id BUNDLE_IDENTIFIER on env/(.dev/.prod)
  • Change App version VERSION_NAME on env/(.dev/.prod)
  • Change App build number VERSION_CODE on env/(.dev/.prod)
  • Change App URL API_URL on env/(.dev/.prod)

Gen app icon and Change app icon by env

Build with: rn-ml

  • Update app icon file from appicon folder
  • Run: yarn app-icon or yarn app-icon:dev
    • Android: auto change flavor script
    • IOS: Change ASSETCATALOG_COMPILER_APPICON_NAME to your respective App Icon Assets (in respective env file)

:arrow_forward: Usage

npx rn-boiler MyApp

Args command:

  • skip install deps:
--skipInstall
  • skip init git:
--skipGit

Preview

## Native module
import {<function_name>} from "@common" 
  • getVersion : Get app version

    const version = getVersion(); 
    
  • getAppName : Get app name

    const appName = getAppName(); 
    
  • getDeviceId : Get device id

    const deviceId = getDeviceId(); 
    
  • getBuildNumber : Get build number

    const buildNumber = getBuildNumber(); 
    
  • setAppBadges : Set app badges (IOS)

    const countBadges = 10; // 0 to clear
    setAppBadges(countBadges); 
    
  • clearNotification : Clear notification on notification center

    clearNotification(); 
    
  • clearCache : Clear cache folder

    clearCache(); 
    
  • checkChannelExist : Check channel Exist (Android)

    const exist: boolean = await checkChannelExist(channelId); 
    
  • deleteChannel : Delete channel (Android)

    deleteChannel(); 
    
  • createChannel : Create channel (Android)

    type Channel = {
    channelId: string;
    channelName: string;
    channelDescription?: string;
    playSound?: boolean;
    soundName?: string; // "default"
    importance?: "DEFAULT" | "HIGH" | "MAX" | "LOW" | "MIN" | "NONE" | "UNSPECIFIED" | undefined; // default HIGH
    vibrate?: boolean;
    };
    createChannel(channel: Channel); 
    
  • fixRotation : Fix image rotate when upload

    type Image = {
    uri: string;
    width?: number;// default 600
    height?: number;// default 800
    };
    type ImageResponse = {
    uri: string;
    name: string;
    };
    const fixedImage = await fixRotation(image: Image); 
    
  • registerPhotosChanges : Register photos changes (IOS) (1)

    registerPhotosChanges(); 
    
  • usePhotosPermissionChange : Hook to check photos permission changes (IOS). ex: Photo selected changes when ask permission (1)

    usePhotosPermissionChange(() => {
    console.log("Changed");
    });
    

(1): Open AppModule.swift, uncomment code to use 2 function

Library

:bookmark: License

This project is MIT licensed.

Keywords

FAQs

Package last updated on 18 Oct 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc