You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

react-native-nitro-background-timer

Package Overview
Dependencies
Maintainers
0
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-nitro-background-timer

react-native-nitro-background-timer

0.0.17
latest
Source
npmnpm
Version published
Weekly downloads
94
-58.22%
Maintainers
0
Weekly downloads
 
Created
Source

react-native-nitro-template

This is a template for Nitro Modules.

Usage

Clone this repo, and change all $$*$$ names according to your nitro.json file.

Contributing

Contribute a change to this template to update it for newer React Native versions.

Structure

  • android/: All your android-specific implementations.
    • build.gradle: The gradle build file. This contains four important pieces:
      • Standard react-native library boilerplate code
      • Configures Kotlin (apply plugin: 'org.jetbrains.kotlin.android')
      • Adds all Nitrogen files (apply from: '.../NitroBackgroundTimer+autolinking.gradle')
      • Triggers the native C++ build (via CMake/externalNativeBuild)
    • CMakeLists.txt: The CMake build file to build C++ code. This contains four important pieces:
      • Creates a library called NitroBackgroundTimer (same as in nitro.json)
      • Adds all Nitrogen files (include(.../NitroBackgroundTimer+autolinking.cmake))
      • Adds all custom C++ files (only HybridTestObjectCpp.cpp)
      • Adds a cpp-adapter.cpp file, which autolinks all C++ HybridObjects (only HybridTestObjectCpp)
    • src/main/java/com/margelo/nitro/nitrobackgroundtimer/: All Kotlin implementations.
      • NitroBackgroundTimerPackage.java: The react-native package. You need this because the react-native CLI only adds libraries if they have a *Package.java file. In here, you can autolink all Kotlin HybridObjects.
  • cpp/: All your cross-platform implementations. (only HybridTestObjectCpp.cpp)
  • ios/: All your iOS-specific implementations.
  • nitrogen/: All files generated by nitrogen. You should commit this folder to git.
  • src/: The TypeScript codebase. This defines all HybridObjects and loads them at runtime.
    • specs/: All HybridObject types. Nitrogen will run on all *.nitro.ts files.
  • nitro.json: The configuration file for nitrogen. This will define all native namespaces, as well as the library name.
  • NitroBackgroundTimer.podspec: The iOS podspec build file to build the iOS code. This contains three important pieces:
    • Specifies the Pod's name. This must be identical to the name specified in nitro.json.
    • Adds all of your .swift or .cpp files (implementations).
    • Adds all Nitrogen files (add_nitrogen_files(s))
  • package.json: The npm package.json file. react-native-nitro-modules should be a peerDependency.

Keywords

react-native

FAQs

Package last updated on 05 Aug 2025

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.