New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

react-native-adhoc

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-adhoc

AdhocSDK for react native application

latest
Source
npmnpm
Version
3.1.2
Version published
Maintainers
1
Created
Source

tag

react-native-adhoc

安装

npm install react-native-adhoc --save

注意

  • 安装完后,需要执行 react-native link。如果出错了,手动配置一下即可,具体可参考手动配置

配置

链接原生库

react-native link react-native-adhoc

iOS SDK 初始化

找到 AppDelegate.m 文件, 引用头文件:

#import <AdhocSDK/AdhocSDK.h>

在 @selector(application:didFinishLaunchingWithOptions:) 中:

AdhocSDKConfig *config = [AdhocSDKConfig defaultConfig];
config.appKey = @"ADHOC_XXX";
[AdhocSDK startWithConfigure:config options:launchOptions];

Android SDK 初始化

在 Application的onCreate 方法中初始化原生 SDK

AdhocConfig adhocConfig = new AdhocConfig.Builder()
        //设置App上下文(必要参数)
        .context(this)
        //设置Appkey(必要参数)
        .appKey("ADHOC_XXX")
        //全部配置参考官网
        .build();

AdhocTracker.init(adhocConfig);

示例代码

请运行 example 里面示例代码,查看 API 调用示例。

API

iOS API

Android API

Keywords

react-native

FAQs

Package last updated on 13 Apr 2020

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