Skip to content

Commit 98b4eee

Browse files
committed
feat: drop support for react-native 0.62, 0.63
BREAKING CHANGE: react-native >=0.64 is now required.
1 parent 4ab64e4 commit 98b4eee

File tree

18 files changed

+155
-612
lines changed

18 files changed

+155
-612
lines changed

android/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ android {
262262
debug.java.srcDirs += "src/flipper/java"
263263
}
264264

265-
// TODO: Remove this block when we drop support for 0.63.
265+
// TODO: Remove this block when we drop support for 0.67.
266266
if (project.ext.react.enableFabric) {
267267
main.java.srcDirs += "src/fabric/java"
268268
} else {

example/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
"windows": "react-native run-windows --no-packager"
1818
},
1919
"peerDependencies": {
20-
"react": "~16.11.0 || ~16.13.1 || ~17.0.1 || ~18.0.0 || ~18.1.0",
21-
"react-native": "^0.0.0-0 || 0.62 - 0.70 || 1000.0.0",
22-
"react-native-macos": "^0.0.0-0 || 0.62 - 0.64 || ^0.66 || ^0.68",
23-
"react-native-windows": "^0.0.0-0 || 0.62 - 0.70"
20+
"react": "~17.0.1 || ~18.0.0 || ~18.1.0",
21+
"react-native": "^0.0.0-0 || 0.64 - 0.70 || 1000.0.0",
22+
"react-native-macos": "^0.0.0-0 || 0.64 || 0.66 || 0.68",
23+
"react-native-windows": "^0.0.0-0 || 0.64 - 0.70"
2424
},
2525
"devDependencies": {
2626
"@babel/core": "^7.0.0",

ios/ReactTestApp.xcodeproj/project.pbxproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10-
1914199A234B2DD800D856AE /* RCTDevSupport+UIScene.m in Sources */ = {isa = PBXBuildFile; fileRef = 19141999234B2DD800D856AE /* RCTDevSupport+UIScene.m */; };
1110
192DD201240FCAF5004E9CEB /* Manifest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 192DD200240FCAF5004E9CEB /* Manifest.swift */; };
1211
193B614D27F5CD7D00080064 /* React+TurboModule.mm in Sources */ = {isa = PBXBuildFile; fileRef = 193B614B27F5CD7D00080064 /* React+TurboModule.mm */; };
1312
1963A06227C82E730013D276 /* React+Fabric.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1963A06127C82E730013D276 /* React+Fabric.mm */; };
@@ -44,7 +43,6 @@
4443
/* End PBXContainerItemProxy section */
4544

4645
/* Begin PBXFileReference section */
47-
19141999234B2DD800D856AE /* RCTDevSupport+UIScene.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "RCTDevSupport+UIScene.m"; sourceTree = "<group>"; };
4846
192DD200240FCAF5004E9CEB /* Manifest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Manifest.swift; sourceTree = "<group>"; };
4947
192F052624AD3CC500A48456 /* ReactTestApp.release.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = ReactTestApp.release.xcconfig; sourceTree = "<group>"; };
5048
192F052724AD3CC500A48456 /* ReactTestApp.common.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = ReactTestApp.common.xcconfig; sourceTree = "<group>"; };
@@ -135,7 +133,6 @@
135133
196C7214232F1788006556ED /* ReactInstance.swift */,
136134
19A624A3258C95F000032776 /* Session.swift */,
137135
196C7207232EF5DC006556ED /* ReactTestApp-Bridging-Header.h */,
138-
19141999234B2DD800D856AE /* RCTDevSupport+UIScene.m */,
139136
196C22612490CB7600449D3C /* React+Compatibility.h */,
140137
196C22602490CB7600449D3C /* React+Compatibility.m */,
141138
1963A06027C82E730013D276 /* React+Fabric.h */,
@@ -332,7 +329,6 @@
332329
192DD201240FCAF5004E9CEB /* Manifest.swift in Sources */,
333330
197827FA27710D3400AEC655 /* Manifest+Decoder.swift in Sources */,
334331
196C724123319A85006556ED /* QRCodeScannerViewController.swift in Sources */,
335-
1914199A234B2DD800D856AE /* RCTDevSupport+UIScene.m in Sources */,
336332
196C22622490CB7600449D3C /* React+Compatibility.m in Sources */,
337333
1963A06227C82E730013D276 /* React+Fabric.mm in Sources */,
338334
193B614D27F5CD7D00080064 /* React+TurboModule.mm in Sources */,

ios/ReactTestApp/RCTDevSupport+UIScene.m

Lines changed: 0 additions & 181 deletions
This file was deleted.

ios/ReactTestApp/React+Compatibility.m

Lines changed: 0 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
#import <objc/runtime.h>
66

7-
#import <React/RCTBridge.h>
8-
97
IMP RTASwizzleSelector(Class class, SEL originalSelector, SEL swizzledSelector)
108
{
119
Method originalMethod = class_getInstanceMethod(class, originalSelector);
@@ -27,70 +25,6 @@ IMP RTASwizzleSelector(Class class, SEL originalSelector, SEL swizzledSelector)
2725
return originalImpl;
2826
}
2927

30-
// MARK: - [0.63.2] Images do not render on iOS 14
31-
// See https://github.com/facebook/react-native/pull/29420
32-
33-
#if !TARGET_OS_OSX && REACT_NATIVE_VERSION < 6302
34-
35-
#pragma clang diagnostic push
36-
#pragma clang diagnostic ignored "-Wnullability-completeness"
37-
#import <React/RCTUIImageViewAnimated.h>
38-
#pragma clang diagnostic pop
39-
40-
@implementation RCTUIImageViewAnimated (ReactTestApp)
41-
42-
static void (*orig_displayLayer)(id, SEL, CALayer *);
43-
44-
+ (void)initialize
45-
{
46-
if ([self class] != [RCTUIImageViewAnimated class]) {
47-
return;
48-
}
49-
50-
if (@available(iOS 14.0, *)) {
51-
static dispatch_once_t onceToken;
52-
dispatch_once(&onceToken, ^{
53-
IMP impl = RTASwizzleSelector(
54-
[self class], @selector(displayLayer:), @selector(rta_displayLayer:));
55-
orig_displayLayer = (void (*)(id, SEL, CALayer *))impl;
56-
});
57-
}
58-
}
59-
60-
- (void)rta_displayLayer:(CALayer *)layer
61-
{
62-
/* The fix for images not rendering is to let UIImageView handle it when we
63-
* are not animating. The following change was made in react-native#29420:
64-
*
65-
* diff --git a/Libraries/Image/RCTUIImageViewAnimated.m b/Libraries/Image/RCTUIImageViewAnimated.m
66-
* index 93c6a2f02f5..f6fb5bc60cc 100644
67-
* --- a/Libraries/Image/RCTUIImageViewAnimated.m
68-
* +++ b/Libraries/Image/RCTUIImageViewAnimated.m
69-
* @@ -285,6 +285,8 @@ static NSUInteger RCTDeviceFreeMemory() {
70-
* if (_currentFrame) {
71-
* layer.contentsScale = self.animatedImageScale;
72-
* layer.contents = (__bridge id)_currentFrame.CGImage;
73-
* + } else {
74-
* + [super displayLayer:layer];
75-
* }
76-
* }
77-
*
78-
* The patch calls `super` when `_currentFrame` is `nil`. For our monkey
79-
* patch, we'll invert the logic to let the original method handle the case
80-
* where `_currentFrame` is missing.
81-
*/
82-
if ([self respondsToSelector:@selector(currentFrame)] &&
83-
[self performSelector:@selector(currentFrame)] == nil) {
84-
[super displayLayer:layer];
85-
} else {
86-
orig_displayLayer(self, @selector(displayLayer:), layer);
87-
}
88-
}
89-
90-
@end
91-
92-
#endif // !TARGET_OS_OSX && REACT_NATIVE_VERSION < 6302
93-
9428
// MARK: - [0.70.0] Alerts don't show when using UIScene
9529
// See https://github.com/facebook/react-native/pull/34562
9630

ios/test_app.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,6 @@ def react_native_pods(version)
128128
'use_react_native-0.68'
129129
elsif v >= Gem::Version.new('0.64')
130130
'use_react_native-0.64'
131-
elsif v >= Gem::Version.new('0.63')
132-
'use_react_native-0.63'
133-
elsif v >= Gem::Version.new('0.62')
134-
'use_react_native-0.62'
135131
else
136132
raise "Unsupported React Native version: #{version}"
137133
end

0 commit comments

Comments
 (0)