-
Notifications
You must be signed in to change notification settings - Fork 0
/
RNBundleLoader.h
45 lines (36 loc) · 1006 Bytes
/
RNBundleLoader.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//
// RNBundleLoader.h
// split_bundler_demo
//
// Created by linjb on 2020/9/14.
//
#import <Foundation/Foundation.h>
@class RCTRootView;
NS_ASSUME_NONNULL_BEGIN
typedef void(^LoadBundleCompletion)(NSError * _Nullable error);
@interface RNBundleLoader : NSObject
/**
远程调试 bundle URL
*/
@property (nonatomic, strong, readonly) NSURL *remoteBundleURL;
/**
基础 bundle URL
*/
@property (nonatomic, strong, readonly) NSURL *commonBundleURL;
/**
预加载的bundle
*/
@property (nonatomic, copy) NSArray *preloadBundles;
/**
加载业务bundle
@param bundleName 业务模块名称
@param launchOptions 初始化参数,可在此添加page名称
@param sync 是否同步
@param complete bundle加载结束回调
*/
- (void)loadBusinessBundleWithName:(NSString *)bundleName
sync:(BOOL)sync
complete:(nullable LoadBundleCompletion)complete;
- (void)updateRemoteBundleURL:(NSString *)bundleURL;
@end
NS_ASSUME_NONNULL_END