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-mtrackingio

v1.0.0

Published

React Native TrackingIO SDK 封装

Readme

react-native-mtrackingio

React Native TrackingIO SDK 封装。

安装

npm install react-native-mtrackingio

iOS 如已集成 CocoaPods,请再执行:

cd ios && pod install

当前结构

仓库保持最小源码直出结构:

  • src/index.ts:源码入口,直接作为 npm 包入口发布
  • android/:Android Kotlin 原生桥接与本地 jar
  • ios/:iOS 原生桥接与 TrackingIOSDK.xcframework
  • Mtrackingio.podspec:iOS pod 配置

这个包不再发布 lib/ 构建产物,而是由 React Native 宿主工程直接处理包内源码。

用法

import {
  preInit,
  initialize,
  setDebugLogging,
  register,
  login,
  getInstallParams,
  getStartupParams,
  getInitialDeepLink,
  addDeepLinkListener,
} from 'react-native-mtrackingio';

await preInit({ appKey: 'YOUR_APP_KEY' });
await setDebugLogging(true);

await initialize({
  appKey: 'YOUR_APP_KEY',
  channelId: '_default_',
  installParams: { plan: 'basic' },
  startupParams: { source: 'app' },
});

await register({ accountId: 'user_001' });
await login({ accountId: 'user_001' });

const installParams = await getInstallParams();
const startupParams = await getStartupParams();
const initialDeepLink = await getInitialDeepLink();

const subscription = addDeepLinkListener((event) => {
  console.log('deep link', event.url, event.params);
});

subscription.remove();

API

preInit({ appKey })

预初始化 TrackingIO SDK。

initialize(options)

初始化 TrackingIO SDK。

支持字段:

  • appKey
  • channelId
  • installParams
  • startupParams
  • caid
  • caid2
  • requestTrackingAuthorization

setDebugLogging(enabled)

打开或关闭调试日志。

setASAEnabled(enabled)

iOS 专用,控制 ASA 开关,建议在 initialize() 前调用。

register({ accountId, params? })

上报注册事件,需要在 initialize() 后调用。

login({ accountId, params? })

上报登录事件,需要在 initialize() 后调用。

setAttributionParameter({ gdtClickId })

Android 专用,设置归因补充参数,建议在 initialize() 前调用。

getInstallParams() / getStartupParams()

返回当前桥接层缓存的初始化参数,不是 SDK 的实时查询结果。

getInitialDeepLink()

返回当前进程内首次收到的 SDK deep link 回调缓存;如果回调尚未到达,则返回 null

addDeepLinkListener(listener)

监听运行时 deep link 回调。

平台说明

Android

仓库内已包含:

  • android/libs/tracking1.9.12.jar
  • android/libs/bcprov-jdk16-139.jar

并在 android/build.gradle 中接入华为 / 荣耀 OAID 依赖。

Android 当前实现说明:

  • preInit / initialize / setDebugLogging / register / login / setAttributionParameter 已接真实 SDK。
  • getInstallParams / getStartupParams 返回桥接层缓存值。
  • getInitialDeepLinkaddDeepLinkListener 基于 SDK deep link 回调实现。

iOS

仓库内已包含:

  • ios/TrackingIOSDK.xcframework

iOS 当前实现说明:

  • preInit / initialize / setDebugLogging / setASAEnabled / register / login 已接真实 SDK。
  • getInstallParams / getStartupParams 返回桥接层缓存值。
  • getInitialDeepLinkaddDeepLinkListener 基于 deferred deep link delegate 实现。
  • setAttributionParameter 当前仅支持 Android。
  • requestTrackingAuthorization 字段当前不会自动触发 ATT 授权请求。

状态说明

当前这次整理的重点是:

  • 改成源码直出发布模型
  • 删除 lib/ 构建产物依赖
  • 删除 bob / TypeScript 发布构建链
  • 接入 Android / iOS 原生 TrackingIO SDK
  • 保留最小 React Native 原生模块结构

当前包不再单独发布构建后的类型声明文件。

License

MIT