This commit is contained in:
wushenghua
2017-04-10 17:56:27 +08:00
parent ab87ffadbe
commit 9159b73d76
914 changed files with 146352 additions and 0 deletions
@@ -0,0 +1,23 @@
//
// ASHRNBridgeManagerProtocol.h
// ASHReactNative
//
// Created by xmfish on 17/4/7.
// Copyright © 2017年 ash. All rights reserved.
//
#import <Foundation/Foundation.h>
@class RCTBridge;
@protocol ASHRNBridgeManagerProtocol <NSObject>
/**
获取RCTBridge
@param bundleUrl 包地址
@param initialProperties 初始化参数
@return RCTBridge
*/
- (RCTBridge* _Nullable)bridgeWithBundleUrl:(NSURL* _Nonnull)bundleUrl launchOptions:(NSDictionary* _Nullable)initialProperties;
@end
@@ -0,0 +1,15 @@
//
// ASHRNBundleManagerProtocol.h
// ASHReactNative
//
// Created by xmfish on 17/4/7.
// Copyright © 2017年 ash. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@protocol ASHRNBundleManagerProtocol <NSObject>
- (BOOL)containBundleURL:(NSURL *)bundleURL;
- (void)downloadWithBundleURL:(NSURL *)bundleURL completedBlock:(nullable void(^)(NSString *indexPath, NSString *bundlePath,NSError * _Nullable error))completedBlock;
@end
NS_ASSUME_NONNULL_END
@@ -0,0 +1,33 @@
//
// ASHRNViewFactoryProtocol.h
// ASHReactNative
//
// Created by xmfish on 17/4/7.
// Copyright © 2017年 ash. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@protocol ASHRNViewFactoryProtocol <NSObject>
/**
加载网络地址的包
@param bundleURL 包地址
@param modelName 页面名称
@return 返回页面VC
*/
- (UIViewController*)rnViewControllerWithBundleURL:(NSString *)bundleURL modelName:(NSString *)modelName;
/**
加载本地包
@param bundleName 包名称
@param modelName 页面名称
@return 返回页面VC
*/
- (UIViewController *)rnViewControllerWithBundleName:(NSString *)bundleName modelName:(nullable NSString *)modelName;
@end
NS_ASSUME_NONNULL_END