Browse Source

migrated ios to RN41.2, bugs not included

Daniel Zlotin 7 years ago
parent
commit
cc94e023a1

+ 1
- 1
example/ios/example/AppDelegate.m View File

8
 // IMPORTANT: if you're getting an Xcode error that RCCManager.h isn't found, you've probably ran "npm install"
8
 // IMPORTANT: if you're getting an Xcode error that RCCManager.h isn't found, you've probably ran "npm install"
9
 // with npm ver 2. You'll need to "npm install" with npm 3 (see https://github.com/wix/react-native-navigation/issues/1)
9
 // with npm ver 2. You'll need to "npm install" with npm 3 (see https://github.com/wix/react-native-navigation/issues/1)
10
 
10
 
11
-#import "RCTRootView.h"
11
+#import <React/RCTRootView.h>
12
 
12
 
13
 @implementation AppDelegate
13
 @implementation AppDelegate
14
 
14
 

+ 2
- 2
example/ios/exampleTests/exampleTests.m View File

10
 #import <UIKit/UIKit.h>
10
 #import <UIKit/UIKit.h>
11
 #import <XCTest/XCTest.h>
11
 #import <XCTest/XCTest.h>
12
 
12
 
13
-#import "RCTLog.h"
14
-#import "RCTRootView.h"
13
+#import <React/RCTLog.h>
14
+#import <React/RCTRootView.h>
15
 
15
 
16
 #define TIMEOUT_SECONDS 240
16
 #define TIMEOUT_SECONDS 240
17
 #define TEXT_TO_LOOK_FOR @"Welcome to React Native!"
17
 #define TEXT_TO_LOOK_FOR @"Welcome to React Native!"

+ 1
- 1
ios/Helpers/RCCTitleViewHelper.m View File

7
 //
7
 //
8
 
8
 
9
 #import "RCCTitleViewHelper.h"
9
 #import "RCCTitleViewHelper.h"
10
-#import "RCTConvert.h"
10
+#import <React/RCTConvert.h>
11
 #import "RCTHelpers.h"
11
 #import "RCTHelpers.h"
12
 
12
 
13
 @implementation RCCTitleView
13
 @implementation RCCTitleView

+ 1
- 1
ios/Helpers/RCTHelpers.h View File

7
 //
7
 //
8
 
8
 
9
 #import <Foundation/Foundation.h>
9
 #import <Foundation/Foundation.h>
10
-#import "RCTRootView.h"
10
+#import <React/RCTRootView.h>
11
 
11
 
12
 @interface RCTHelpers : NSObject
12
 @interface RCTHelpers : NSObject
13
 +(BOOL)removeYellowBox:(RCTRootView*)reactRootView;
13
 +(BOOL)removeYellowBox:(RCTRootView*)reactRootView;

+ 3
- 3
ios/Helpers/RCTHelpers.m View File

7
 //
7
 //
8
 
8
 
9
 #import "RCTHelpers.h"
9
 #import "RCTHelpers.h"
10
-#import "RCTView.h"
11
-#import "RCTScrollView.h"
12
-#import "RCTFont.h"
10
+#import <React/RCTView.h>
11
+#import <React/RCTScrollView.h>
12
+#import <React/RCTFont.h>
13
 
13
 
14
 @implementation RCTHelpers
14
 @implementation RCTHelpers
15
 
15
 

+ 2
- 2
ios/RCCDrawerController/RCCDrawerController.h View File

1
 #import <UIKit/UIKit.h>
1
 #import <UIKit/UIKit.h>
2
-#import "RCTBridge.h"
2
+#import <React/RCTBridge.h>
3
 #import "MMDrawerController.h"
3
 #import "MMDrawerController.h"
4
 #import "RCCDrawerProtocol.h"
4
 #import "RCCDrawerProtocol.h"
5
 
5
 
7
 @interface RCCDrawerController : MMDrawerController <RCCDrawerDelegate>
7
 @interface RCCDrawerController : MMDrawerController <RCCDrawerDelegate>
8
 
8
 
9
 
9
 
10
-@end
10
+@end

+ 1
- 1
ios/RCCDrawerController/RCCDrawerController.m View File

2
 #import "RCCViewController.h"
2
 #import "RCCViewController.h"
3
 #import "MMExampleDrawerVisualStateManager.h"
3
 #import "MMExampleDrawerVisualStateManager.h"
4
 #import "RCCDrawerHelper.h"
4
 #import "RCCDrawerHelper.h"
5
-#import "RCTConvert.h"
5
+#import <React/RCTConvert.h>
6
 #import "RCCManagerModule.h"
6
 #import "RCCManagerModule.h"
7
 
7
 
8
 #define RCCDRAWERCONTROLLER_ANIMATION_DURATION 0.33f
8
 #define RCCDRAWERCONTROLLER_ANIMATION_DURATION 0.33f

+ 1
- 1
ios/RCCDrawerController/RCCTheSideBarManagerViewController.m View File

9
 #import "RCCTheSideBarManagerViewController.h"
9
 #import "RCCTheSideBarManagerViewController.h"
10
 #import "RCCViewController.h"
10
 #import "RCCViewController.h"
11
 #import "RCCDrawerHelper.h"
11
 #import "RCCDrawerHelper.h"
12
-#import "RCTConvert.h"
12
+#import <React/RCTConvert.h>
13
 
13
 
14
 
14
 
15
 @interface RCCTheSideBarManagerViewController () <TheSidebarControllerDelegate>
15
 @interface RCCTheSideBarManagerViewController () <TheSidebarControllerDelegate>

+ 4
- 4
ios/RCCLightBox.m View File

1
 #import "RCCLightBox.h"
1
 #import "RCCLightBox.h"
2
 #import "RCCManager.h"
2
 #import "RCCManager.h"
3
-#import "RCTRootView.h"
4
-#import "RCTRootViewDelegate.h"
5
-#import "RCTConvert.h"
3
+#import <React/RCTRootView.h>
4
+#import <React/RCTRootViewDelegate.h>
5
+#import <React/RCTConvert.h>
6
 #import "RCTHelpers.h"
6
 #import "RCTHelpers.h"
7
 #import <objc/runtime.h>
7
 #import <objc/runtime.h>
8
 
8
 
65
         [self.reactView.contentView.layer addObserver:self forKeyPath:@"frame" options:0 context:nil];
65
         [self.reactView.contentView.layer addObserver:self forKeyPath:@"frame" options:0 context:nil];
66
         [self.reactView.contentView.layer addObserver:self forKeyPath:@"bounds" options:0 context:NULL];
66
         [self.reactView.contentView.layer addObserver:self forKeyPath:@"bounds" options:0 context:NULL];
67
         
67
         
68
-        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onRNReload) name:RCTReloadNotification object:nil];
68
+//        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onRNReload) name:RCTReloadNotification object:nil];
69
     }
69
     }
70
     return self;
70
     return self;
71
 }
71
 }

+ 1
- 1
ios/RCCManager.h View File

1
 #import <Foundation/Foundation.h>
1
 #import <Foundation/Foundation.h>
2
-#import "RCTBridgeModule.h"
2
+#import <React/RCTBridgeModule.h>
3
 #import <UIKit/UIKit.h>
3
 #import <UIKit/UIKit.h>
4
 
4
 
5
 @interface RCCManager : NSObject
5
 @interface RCCManager : NSObject

+ 3
- 3
ios/RCCManager.m View File

1
 #import "RCCManager.h"
1
 #import "RCCManager.h"
2
-#import "RCTBridge.h"
3
-#import "RCTRedBox.h"
2
+#import <React/RCTBridge.h>
3
+#import <React/RCTRedBox.h>
4
 #import <Foundation/Foundation.h>
4
 #import <Foundation/Foundation.h>
5
 
5
 
6
 @interface RCCManager() <RCTBridgeDelegate>
6
 @interface RCCManager() <RCTBridgeDelegate>
38
   {
38
   {
39
     self.modulesRegistry = [@{} mutableCopy];
39
     self.modulesRegistry = [@{} mutableCopy];
40
     
40
     
41
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onRNReload) name:RCTReloadNotification object:nil];
41
+//    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onRNReload) name:RCTReloadNotification object:nil];
42
   }
42
   }
43
   return self;
43
   return self;
44
 }
44
 }

+ 1
- 1
ios/RCCManagerModule.h View File

1
 #import <Foundation/Foundation.h>
1
 #import <Foundation/Foundation.h>
2
-#import "RCTBridgeModule.h"
2
+#import <React/RCTBridgeModule.h>
3
 #import <UIKit/UIKit.h>
3
 #import <UIKit/UIKit.h>
4
 
4
 
5
 
5
 

+ 1
- 1
ios/RCCManagerModule.m View File

5
 #import "RCCViewController.h"
5
 #import "RCCViewController.h"
6
 #import "RCCDrawerController.h"
6
 #import "RCCDrawerController.h"
7
 #import "RCCLightBox.h"
7
 #import "RCCLightBox.h"
8
-#import "RCTConvert.h"
8
+#import <React/RCTConvert.h>
9
 #import "RCCTabBarController.h"
9
 #import "RCCTabBarController.h"
10
 #import "RCCTheSideBarManagerViewController.h"
10
 #import "RCCTheSideBarManagerViewController.h"
11
 #import "RCCNotification.h"
11
 #import "RCCNotification.h"

+ 1
- 1
ios/RCCNavigationController.h View File

1
 #import <UIKit/UIKit.h>
1
 #import <UIKit/UIKit.h>
2
-#import "RCTBridge.h"
2
+#import <React/RCTBridge.h>
3
 
3
 
4
 @interface RCCNavigationController : UINavigationController <UINavigationControllerDelegate>
4
 @interface RCCNavigationController : UINavigationController <UINavigationControllerDelegate>
5
 
5
 

+ 2
- 2
ios/RCCNavigationController.m View File

1
 #import "RCCNavigationController.h"
1
 #import "RCCNavigationController.h"
2
 #import "RCCViewController.h"
2
 #import "RCCViewController.h"
3
 #import "RCCManager.h"
3
 #import "RCCManager.h"
4
-#import "RCTEventDispatcher.h"
5
-#import "RCTConvert.h"
4
+#import <React/RCTEventDispatcher.h>
5
+#import <React/RCTConvert.h>
6
 #import <objc/runtime.h>
6
 #import <objc/runtime.h>
7
 #import "RCCTitleViewHelper.h"
7
 #import "RCCTitleViewHelper.h"
8
 
8
 

+ 2
- 2
ios/RCCNotification.m View File

1
 
1
 
2
 #import "RCCNotification.h"
2
 #import "RCCNotification.h"
3
-#import "RCTRootView.h"
3
+#import <React/RCTRootView.h>
4
 #import "RCTHelpers.h"
4
 #import "RCTHelpers.h"
5
 
5
 
6
 @interface NotificationView : UIView
6
 @interface NotificationView : UIView
32
         [self.reactView.contentView.layer addObserver:self forKeyPath:@"frame" options:0 context:nil];
32
         [self.reactView.contentView.layer addObserver:self forKeyPath:@"frame" options:0 context:nil];
33
         [self.reactView.contentView.layer addObserver:self forKeyPath:@"bounds" options:0 context:NULL];
33
         [self.reactView.contentView.layer addObserver:self forKeyPath:@"bounds" options:0 context:NULL];
34
         
34
         
35
-        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onRNReload) name:RCTReloadNotification object:nil];
35
+//        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onRNReload) name:RCTReloadNotification object:nil];
36
         
36
         
37
         if ([params[@"dismissWithSwipe"] boolValue])
37
         if ([params[@"dismissWithSwipe"] boolValue])
38
         {
38
         {

+ 1
- 1
ios/RCCTabBarController.h View File

1
 #import <UIKit/UIKit.h>
1
 #import <UIKit/UIKit.h>
2
-#import "RCTBridge.h"
2
+#import <React/RCTBridge.h>
3
 
3
 
4
 @interface RCCTabBarController : UITabBarController <UITabBarDelegate>
4
 @interface RCCTabBarController : UITabBarController <UITabBarDelegate>
5
 
5
 

+ 2
- 2
ios/RCCTabBarController.m View File

1
 #import "RCCTabBarController.h"
1
 #import "RCCTabBarController.h"
2
 #import "RCCViewController.h"
2
 #import "RCCViewController.h"
3
-#import "RCTConvert.h"
3
+#import <React/RCTConvert.h>
4
 #import "RCCManager.h"
4
 #import "RCCManager.h"
5
 #import "RCTHelpers.h"
5
 #import "RCTHelpers.h"
6
-#import "RCTUIManager.h"
6
+#import <React/RCTUIManager.h>
7
 
7
 
8
 @interface RCTUIManager ()
8
 @interface RCTUIManager ()
9
 
9
 

+ 2
- 2
ios/RCCToolBar/RCCToolBar.h View File

7
 //
7
 //
8
 
8
 
9
 #import <UIKit/UIKit.h>
9
 #import <UIKit/UIKit.h>
10
-#import "RCTViewManager.h"
10
+#import <React/RCTViewManager.h>
11
 
11
 
12
 @interface RCCToolBar : RCTViewManager
12
 @interface RCCToolBar : RCTViewManager
13
 
13
 
14
-@end
14
+@end

+ 1
- 1
ios/RCCViewController.h View File

1
 #import <UIKit/UIKit.h>
1
 #import <UIKit/UIKit.h>
2
-#import "RCTBridge.h"
2
+#import <React/RCTBridge.h>
3
 
3
 
4
 extern NSString* const RCCViewControllerCancelReactTouchesNotification;
4
 extern NSString* const RCCViewControllerCancelReactTouchesNotification;
5
 
5
 

+ 3
- 3
ios/RCCViewController.m View File

3
 #import "RCCTabBarController.h"
3
 #import "RCCTabBarController.h"
4
 #import "RCCDrawerController.h"
4
 #import "RCCDrawerController.h"
5
 #import "RCCTheSideBarManagerViewController.h"
5
 #import "RCCTheSideBarManagerViewController.h"
6
-#import "RCTRootView.h"
6
+#import <React/RCTRootView.h>
7
 #import "RCCManager.h"
7
 #import "RCCManager.h"
8
-#import "RCTConvert.h"
8
+#import <React/RCTConvert.h>
9
 #import "RCCExternalViewControllerProtocol.h"
9
 #import "RCCExternalViewControllerProtocol.h"
10
 #import "RCTHelpers.h"
10
 #import "RCTHelpers.h"
11
 #import "RCCTitleViewHelper.h"
11
 #import "RCCTitleViewHelper.h"
145
     
145
     
146
     [self setStyleOnInit];
146
     [self setStyleOnInit];
147
     
147
     
148
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onRNReload) name:RCTReloadNotification object:nil];
148
+//    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onRNReload) name:RCTReloadNotification object:nil];
149
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onCancelReactTouches) name:RCCViewControllerCancelReactTouchesNotification object:nil];
149
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onCancelReactTouches) name:RCCViewControllerCancelReactTouchesNotification object:nil];
150
     
150
     
151
     // In order to support 3rd party native ViewControllers, we support passing a class name as a prop mamed `ExternalNativeScreenClass`
151
     // In order to support 3rd party native ViewControllers, we support passing a class name as a prop mamed `ExternalNativeScreenClass`