🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

react-native-alive-push

Package Overview
Dependencies
Maintainers
3
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-alive-push

<!-- badge -->

npmnpm
Version
0.1.1
Version published
Weekly downloads
12
-33.33%
Maintainers
3
Weekly downloads
 
Created
Source

react-native-alive-push

npm version npm license npm download npm download

Getting started

$ npm install react-native-alive-push --save

alive-push安装好之后默认会进行link,如果link失败请手动link

Mostly automatic installation

$ react-native link react-native-alive-push

Usage

重写ReactNativeHostgetJSBundleFilegetBundleAssetName

Android

@Nullable
@Override
protected String getJSBundleFile() {
    return RNAlivePushModule.getJSBundleFile(MainApplication.this);
}

IOS

在AppDelegate.m中添加

#import "RNAlivePush.h"

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{
    ...
    NSURL *jsCodeLocation = [RNAlivePush getJSBundleFile];
    ...
} 

Change

0.0.3 ~ 0.0.8

  • 更新包的目录结构调整.APPLICATION_DATA_DIR/INNER_VERSION调整为APPLICATION_DATA_DIR/VERSION_NAME/INNER_VERSION
  • 更新了android的package name并修改了android的部分bug
  • checkupdate的时候不使用缓存(url添加随机数)
  • 添加了debug模式
  • 修复了IOS安装的问题
  • 修改IOS奔溃问题

0.0.2

  • android/ios alivepush配置文件添加了versionName后缀
  • android支持asset-dest bundle
  • 修改了下载完成后feedback失败的bug
  • 修改了覆盖安装时访问老版本的bug
  • 优化了alive-push代码

API

alivePush

Parameters

Returns Function

Returns AlivePushComponent

AlivePushStatus

Properties

  • beforeCheck Number 检查更新前
  • checking Number 检查中
  • afterCheck Number 检查更新后
  • beforeDownload Number 下载前
  • downloading Number 下载中
  • afterDownload Number 下载后
  • install Number 安装成功

AlivePushOption

Type: {deploymentKey: String, host: String?, debug: Boolean?}

Properties

Keywords

react-native

FAQs

Package last updated on 19 Dec 2018

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