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 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-native-nitro-advertising-id

v0.1.1

Published

React Native nitro module for getting advertising ID

Readme

📱 React Native Nitro Advertising ID npm version

🔹 React Native Nitro Advertising ID provides seamless access to the device's advertising identifier (IDFA on iOS, GAID on Android) in your React Native applications. Built with the power of Nitro Modules for high performance.


🚀 Features

  • 📲 Cross-Platform Support: Works on both iOS (IDFA) and Android (GAID).
  • ⚡ Optimized Performance: Built with Nitro for low-latency native calls.
  • 🔒 Privacy Compliant: Handles permission requests via App Tracking Transparency (iOS) and Google Play Services (Android).
  • 🔄 Simple API: Just two methods — request permission and get the advertising ID.

🛠️ Prerequisites

Before getting started, ensure you have:


📦 Installation

Run the following command to install the package:

npm install react-native-nitro-advertising-id react-native-nitro-modules

# or

yarn add react-native-nitro-advertising-id react-native-nitro-modules

iOS Setup

cd ios && pod install

Edit Info.plist. Add the following item (Set Value as desired):

| Key | Type | Value | | --- | ---- | ----- | | Privacy - NSUserTrackingUsageDescription | String | CHANGEME: This app needs access to your advertising identifier to provide personalized ads. |

Android Setup

No additional setup required. The library uses Google Play Services Ads Identifier which is automatically linked.

Expo Setup

Install the required packages:

npx expo install react-native-nitro-advertising-id react-native-nitro-modules expo-build-properties

Add the following to your app.json (or app.config.js):

{
  "expo": {
    "newArchEnabled": true,
    "ios": {
      "infoPlist": {
        "NSUserTrackingUsageDescription": "CHANGEME: This app needs access to your advertising identifier to provide personalized ads."
      }
    },
  }
}

Then create a development build:

npx expo prebuild
npx expo run:ios
# or
npx expo run:android

🎯 API Reference

📜 Permission Statuses

Permission checks and requests resolve into one of the following statuses:

| Return Value | Description | | --- | --- | | "authorized" | The user has granted tracking permission. | | "denied" | The user has denied tracking permission. | | "restricted" | Tracking is restricted (e.g., parental controls). | | "notDetermined" | The user has not been asked for permission yet (iOS). | | "granted" | Permission has been granted (Android). | | "undetermined" | Permission status has not been determined yet (Android). | | "unknown" | The permission status could not be determined. |


📌 Example Usage

🔄 Requesting Permission

Request tracking permission from the user before accessing the advertising ID:

import { NitroAdvertisingIdHybridObject } from 'react-native-nitro-advertising-id';

const requestPermission = async () => {
  try {
    const status = await NitroAdvertisingIdHybridObject.requestPermission();
    console.log('Permission status:', status);
  } catch (error) {
    console.error('Error requesting permission:', error);
  }
};

📲 Getting the Advertising ID

Retrieve the device's advertising identifier:

import { NitroAdvertisingIdHybridObject } from 'react-native-nitro-advertising-id';

const getAdId = () => {
  try {
    const advertisingId = NitroAdvertisingIdHybridObject.getAdvertisingId();
    console.log('Advertising ID:', advertisingId);
  } catch (error) {
    console.error('Error getting advertising ID:', error);
  }
};

🤝 Contributing

📄 License

MIT


Made with create-react-native-library