
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
react-native-bc-mta
Advanced tools
yarn add react-native-bc-mta
or
npm install --save react-native-bc-mta
cd ios && pod install
在 Linked Frameworks and Libraries 添加 libsqlite3.tbd
在 android/settings.gradle 文件中添加
include ':react-native-mta'
project(':react-native-mta').projectDir = new File(rootProject.projectDir, '../node_modules/@yyyyu/react-native-mta/android')
在 android/app/build.gradle 文件中依赖部分添加
dependencies {
// other dependencies
compile project(':react-native-mta')
}
在 MainApplication.java 文件中添加
import com.rnlib.mta.RNMtaPackage;
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
// other packages
new RNMtaPackage()
);
}
在 android/app/build.gradle 文件默认配置部分添加如下参数,此部分可以通过代码动态覆盖,gradle 同步时不添加则会出错无法编译
android {
defaultConfig {
// add this
manifestPlaceholders = [
MTA_APPKEY: "",
MTA_CHANNEL: ""
]
}
}
import mta from 'react-native-mta'
mta.startWithAppkey({ appKey: 'appKey' })
.then(res => { console.log(res) })
.catch(err => { console.error(err) })
Boolean
Object
{ errCode: 0, errMsg: '' }
{ errCode: -1, errMsg: 'MTA初始化未成功' }
{ errCode: -2, errMsg: 'MTA传入参数错误' }
{ errCode: -3, errMsg: 'MTA传入参数过长' }
{ errCode: -9, errMsg: '未知错误' }
mta.startWithAppkey({
appKey: 'you app key', // mta 管理后台中拿到的 appKey(*ios android 不同*)
channel: 'channel', // androidOnly optional('')
isDebug: false, // androidOnly optional(false)
})
mta.trackPageBegin({
page: 'page_id', // 页面标识
appKey: 'you app key' // iosOnly optional(初始化 appKey)
})
mta.trackPageEnd({
page: 'page_id', // 跟踪页面标识
appKey: 'you app key', // iosOnly optional(初始化 appKey)
isRealTime: false // iosOnly optional(false) 是否实时上报数据
})
mta.trackCustomEvent({
event: 'event_id', // 事件标识
params: {}, // optional({}) 事件参数
appKey: 'you app key', // iosOnly optional(初始化 appKey)
isRealTime: false // iosOnly optional(false) 是否实时上报数据
})
mta.trackCustomEventBegin({
event: 'event_id', // 事件标识
params: {}, // optional({}) 事件参数
appKey: 'you app key', // iosOnly optional(初始化 appKey)
isRealTime: false // iosOnly optional(false) 是否实时上报数据
})
mta.trackCustomEventEnd({
event: 'event_id', // 事件标识
params: {}, // optional({}) 事件参数
appKey: 'you app key', // iosOnly optional(初始化 appKey)
isRealTime: false // iosOnly optional(false) 是否实时上报数据
})
mta.trackCustomEventDuration({
event: 'event_id', // 事件标识
duration: 1000, // 事件持续时间
params: {}, // optional({}) 事件参数
appKey: 'you app key', // iosOnly optional(初始化 appKey)
isRealTime: false // iosOnly optional(false) 是否实时上报数据
})
mta.trackActiveBegin() // iosOnly
mta.trackActiveEnd() // iosOnly
mta.setUserProperty({ customKey: 'customValue' })
FAQs
react native for tencent mta.
We found that react-native-bc-mta demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.