Skip to content
This repository was archived by the owner on Mar 16, 2019. It is now read-only.

Commit 279add4

Browse files
committed
#223 RN 0.40 compatible IOS changes
1 parent ea8da40 commit 279add4

8 files changed

+71
-16
lines changed

src/ios/RNFetchBlob/RNFetchBlob.h

+7
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,16 @@
44
// Created by wkh237 on 2016/4/28.
55
//
66

7+
#define OLD_IMPORT
8+
79
#ifndef RNFetchBlob_h
810
#define RNFetchBlob_h
11+
12+
#ifdef OLD_IMPORT
913
#import "RCTBridgeModule.h"
14+
#else
15+
#import "<React/RCTBridgeModule.h>"
16+
#endif
1017
#import <UIKit/UIKit.h>
1118

1219

src/ios/RNFetchBlob/RNFetchBlob.m

+17-4
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,30 @@
55
//
66

77
#import "RNFetchBlob.h"
8-
#import "RCTLog.h"
9-
#import "RCTRootView.h"
10-
#import "RCTBridge.h"
11-
#import "RCTEventDispatcher.h"
128
#import "RNFetchBlobFS.h"
139
#import "RNFetchBlobNetwork.h"
1410
#import "RNFetchBlobConst.h"
1511
#import "RNFetchBlobReqBuilder.h"
1612
#import "RNFetchBlobProgress.h"
1713

1814

15+
#ifdef OLD_IMPORT
16+
17+
#import "RCTLog.h"
18+
#import "RCTRootView.h"
19+
#import "RCTBridge.h"
20+
#import "RCTEventDispatcher.h"
21+
22+
#else
23+
24+
#import "<React/RCTLog.h>"
25+
#import "<React/RCTRootView.h>"
26+
#import "<React/RCTBridge.h>"
27+
#import "<React/RCTEventDispatcher.h>"
28+
29+
#endif
30+
31+
1932
__strong RCTBridge * bridgeRef;
2033
dispatch_queue_t commonTaskQueue;
2134
dispatch_queue_t fsQueue;

src/ios/RNFetchBlobConst.h

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
// Copyright © 2016年 suzuri04x2. All rights reserved.
77
//
88

9+
#define OLD_IMPORT
10+
911
#ifndef RNFetchBlobConst_h
1012
#define RNFetchBlobConst_h
1113

src/ios/RNFetchBlobFS.h

+7
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,15 @@
99
#ifndef RNFetchBlobFS_h
1010
#define RNFetchBlobFS_h
1111

12+
#import "RNFetchBlob.h"
13+
1214
#import <Foundation/Foundation.h>
15+
#ifdef OLD_IMPORT
1316
#import "RCTBridgeModule.h"
17+
#else
18+
#import "<React/RCTBridgeModule.h>"
19+
#endif
20+
1421
@import AssetsLibrary;
1522

1623
@interface RNFetchBlobFS : NSObject <NSStreamDelegate> {

src/ios/RNFetchBlobFS.m

+8-3
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,21 @@
66
// Copyright © 2016年 suzuri04x2. All rights reserved.
77
//
88

9-
109
#import <Foundation/Foundation.h>
11-
#import "RCTBridge.h"
1210
#import "RNFetchBlob.h"
13-
#import "RCTEventDispatcher.h"
1411
#import "RNFetchBlobFS.h"
1512
#import "RNFetchBlobConst.h"
1613
#import "IOS7Polyfill.h"
1714
@import AssetsLibrary;
1815

16+
#ifdef OLD_IMPORT
17+
#import "RCTBridge.h"
18+
#import "RCTEventDispatcher.h"
19+
#else
20+
#import "<React/RCTBridge.h>"
21+
#import "<React/RCTEventDispatcher.h>"
22+
#endif
23+
1924

2025
NSMutableDictionary *fileStreams = nil;
2126

src/ios/RNFetchBlobNetwork.h

+11-4
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,21 @@
66
// Copyright © 2016 wkh237. All rights reserved.
77
//
88

9-
#ifndef RNFetchBlobNetwork_h
10-
#define RNFetchBlobNetwork_h
11-
129
#import <Foundation/Foundation.h>
13-
#import "RCTBridgeModule.h"
1410
#import "RNFetchBlobProgress.h"
1511
#import "RNFetchBlobFS.h"
1612

13+
#ifdef OLD_IMPORT
14+
#import "RCTBridgeModule.h"
15+
#else
16+
#import "<React/RCTBridgeModule.h>"
17+
#endif
18+
19+
#ifndef RNFetchBlobNetwork_h
20+
#define RNFetchBlobNetwork_h
21+
22+
23+
1724
typedef void(^CompletionHander)(NSURL * _Nullable location, NSURLResponse * _Nullable response, NSError * _Nullable error);
1825
typedef void(^DataTaskCompletionHander) (NSData * _Nullable resp, NSURLResponse * _Nullable response, NSError * _Nullable error);
1926

src/ios/RNFetchBlobNetwork.m

+13-4
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,29 @@
66
// Copyright © 2016 wkh237. All rights reserved.
77
//
88

9-
#import "RCTLog.h"
9+
1010
#import <Foundation/Foundation.h>
11-
#import "RCTBridge.h"
1211
#import "RNFetchBlob.h"
13-
#import "RCTEventDispatcher.h"
1412
#import "RNFetchBlobFS.h"
15-
#import "RCTRootView.h"
1613
#import "RNFetchBlobNetwork.h"
1714
#import "RNFetchBlobConst.h"
1815
#import "RNFetchBlobReqBuilder.h"
1916
#import "IOS7Polyfill.h"
2017
#import <CommonCrypto/CommonDigest.h>
2118
#import "RNFetchBlobProgress.h"
2219

20+
#ifdef OLD_IMPORT
21+
#import "RCTRootView.h"
22+
#import "RCTLog.h"
23+
#import "RCTEventDispatcher.h"
24+
#import "RCTBridge.h"
25+
#else
26+
#import "<React/RCTRootView.h>"
27+
#import "<React/RCTLog.h>"
28+
#import "<React/RCTEventDispatcher.h>"
29+
#import "<React/RCTBridge.h>"
30+
#endif
31+
2332
////////////////////////////////////////
2433
//
2534
// HTTP request handler

src/ios/RNFetchBlobReqBuilder.m

+6-1
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,14 @@
1111
#import "RNFetchBlobNetwork.h"
1212
#import "RNFetchBlobConst.h"
1313
#import "RNFetchBlobFS.h"
14-
#import "RCTLog.h"
1514
#import "IOS7Polyfill.h"
1615

16+
#ifdef OLD_IMPORT
17+
#import "RCTLog.h"
18+
#else
19+
#import "<React/RCTLog.h>"
20+
#endif
21+
1722
@interface RNFetchBlobReqBuilder()
1823
{
1924

0 commit comments

Comments
 (0)