NIPRnManager Class Reference

Inherits from NSObject
Conforms to RCTBridgeModule
Declared in NIPRnManager.h

+ sharedManager

获取单例

+ (instancetype)sharedManager

Return Value

obj

Declared In

NIPRnManager.h

+ managerWithBundleUrl:noHotUpdate:noJsServer:

获取Manager

+ (instancetype)managerWithBundleUrl:(NSString *)bundleUrl noHotUpdate:(BOOL)noHotUpdate noJsServer:(BOOL)noJsServer

Parameters

bundleUrl

服务器存放bundle的地址

noHotUpdate

用来标记只使用工程自带的rn包,不支持热更新 default:NO

noJsServer

不通过本地启动的server来获取bundle,直接使用离线包 default:NO

Return Value

obj

Declared In

NIPRnManager.h

– getBridgeByBundleName:

oc与js联通的桥,在manager初始化的时候就生成

- (RCTBridge *)getBridgeByBundleName:(NSString *)bundleName

Parameters

bundleName

bundleName

Return Value

RCTBridge

Declared In

NIPRnManager.h

– loadBundleUnderDocument

热更新完成后,加载存放在Document目录下的被更新的bundle文件

- (void)loadBundleUnderDocument

Declared In

NIPRnManager.h

– initBridgeBundle

首次启动后根据当前app 存放在Document目录和App自带的jsbundle文件初始化所有业务的bundle

- (void)initBridgeBundle

Declared In

NIPRnManager.h

– loadControllerWithModel:

加载默认main bundle的指定模块

- (NIPRnController *)loadControllerWithModel:(NSString *)moduleName

Parameters

moduleName

moduleName

Return Value

NIPRnController

Declared In

NIPRnManager.h

– loadWithBundleName:moduleName:

通过bundle和module加载

- (NIPRnController *)loadWithBundleName:(NSString *)bundleName moduleName:(NSString *)moduleName

Parameters

bundleName

bundleName

moduleName

moduleName

Return Value

NIPRnController

Declared In

NIPRnManager.h

– requestRCTAssetsBehind

后台静默下载rn资源包

- (void)requestRCTAssetsBehind

Declared In

NIPRnManager.h

  noHotUpdate

是否支持热更新

@property (nonatomic, assign) BOOL noHotUpdate

Declared In

NIPRnManager.h

  noJsServer

是否不使用jsServer

@property (nonatomic, assign) BOOL noJsServer

Declared In

NIPRnManager.h

  bundleUrl

bundle的url

@property (nonatomic, copy) NSString *bundleUrl

Declared In

NIPRnManager.h

  fontNames

字体名字

@property (nonatomic, copy) NSArray *fontNames

Declared In

NIPRnManager.h