react-native-macos 0.74.22 → 0.74.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Network/RCTDataRequestHandler.mm +10 -3
- package/Libraries/Network/RCTFileRequestHandler.mm +11 -4
- package/React/Base/RCTVersion.m +1 -1
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTTextPrimitivesConversions.h +2 -2
- package/package.json +1 -1
|
@@ -40,6 +40,13 @@ RCT_EXPORT_MODULE()
|
|
|
40
40
|
|
|
41
41
|
__weak __block NSBlockOperation *weakOp;
|
|
42
42
|
__block NSBlockOperation *op = [NSBlockOperation blockOperationWithBlock:^{
|
|
43
|
+
// [macOS
|
|
44
|
+
NSBlockOperation *strongOp = weakOp; // Strong reference to avoid deallocation during execution
|
|
45
|
+
if (strongOp == nil || [strongOp isCancelled]) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
// macOS]
|
|
49
|
+
|
|
43
50
|
// Get mime type
|
|
44
51
|
NSRange firstSemicolon = [request.URL.resourceSpecifier rangeOfString:@";"];
|
|
45
52
|
NSString *mimeType =
|
|
@@ -51,15 +58,15 @@ RCT_EXPORT_MODULE()
|
|
|
51
58
|
expectedContentLength:-1
|
|
52
59
|
textEncodingName:nil];
|
|
53
60
|
|
|
54
|
-
[delegate URLRequest:
|
|
61
|
+
[delegate URLRequest:strongOp didReceiveResponse:response]; // [macOS]
|
|
55
62
|
|
|
56
63
|
// Load data
|
|
57
64
|
NSError *error;
|
|
58
65
|
NSData *data = [NSData dataWithContentsOfURL:request.URL options:NSDataReadingMappedIfSafe error:&error];
|
|
59
66
|
if (data) {
|
|
60
|
-
[delegate URLRequest:
|
|
67
|
+
[delegate URLRequest:strongOp didReceiveData:data]; // [macOS]
|
|
61
68
|
}
|
|
62
|
-
[delegate URLRequest:
|
|
69
|
+
[delegate URLRequest:strongOp didCompleteWithError:error]; // [macOS]
|
|
63
70
|
}];
|
|
64
71
|
|
|
65
72
|
weakOp = op;
|
|
@@ -48,12 +48,19 @@ RCT_EXPORT_MODULE()
|
|
|
48
48
|
|
|
49
49
|
__weak __block NSBlockOperation *weakOp;
|
|
50
50
|
__block NSBlockOperation *op = [NSBlockOperation blockOperationWithBlock:^{
|
|
51
|
+
// [macOS
|
|
52
|
+
NSBlockOperation *strongOp = weakOp; // Strong reference to avoid deallocation during execution
|
|
53
|
+
if (strongOp == nil || [strongOp isCancelled]) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
// macOS]
|
|
57
|
+
|
|
51
58
|
// Get content length
|
|
52
59
|
NSError *error = nil;
|
|
53
60
|
NSFileManager *fileManager = [NSFileManager new];
|
|
54
61
|
NSDictionary<NSString *, id> *fileAttributes = [fileManager attributesOfItemAtPath:request.URL.path error:&error];
|
|
55
62
|
if (!fileAttributes) {
|
|
56
|
-
[delegate URLRequest:
|
|
63
|
+
[delegate URLRequest:strongOp didCompleteWithError:error]; // [macOS]
|
|
57
64
|
return;
|
|
58
65
|
}
|
|
59
66
|
|
|
@@ -70,14 +77,14 @@ RCT_EXPORT_MODULE()
|
|
|
70
77
|
expectedContentLength:[fileAttributes[NSFileSize] ?: @-1 integerValue]
|
|
71
78
|
textEncodingName:nil];
|
|
72
79
|
|
|
73
|
-
[delegate URLRequest:
|
|
80
|
+
[delegate URLRequest:strongOp didReceiveResponse:response]; // [macOS]
|
|
74
81
|
|
|
75
82
|
// Load data
|
|
76
83
|
NSData *data = [NSData dataWithContentsOfURL:request.URL options:NSDataReadingMappedIfSafe error:&error];
|
|
77
84
|
if (data) {
|
|
78
|
-
[delegate URLRequest:
|
|
85
|
+
[delegate URLRequest:strongOp didReceiveData:data]; // [macOS]
|
|
79
86
|
}
|
|
80
|
-
[delegate URLRequest:
|
|
87
|
+
[delegate URLRequest:strongOp didCompleteWithError:error]; // [macOS]
|
|
81
88
|
}];
|
|
82
89
|
|
|
83
90
|
weakOp = op;
|
package/React/Base/RCTVersion.m
CHANGED
|
@@ -89,9 +89,9 @@ inline static NSUnderlineStyle RCTNSUnderlineStyleFromTextDecorationStyle(
|
|
|
89
89
|
case facebook::react::TextDecorationStyle::Double:
|
|
90
90
|
return NSUnderlineStyleDouble;
|
|
91
91
|
case facebook::react::TextDecorationStyle::Dashed:
|
|
92
|
-
return
|
|
92
|
+
return NSUnderlineStylePatternDash | NSUnderlineStyleSingle; // [macOS]
|
|
93
93
|
case facebook::react::TextDecorationStyle::Dotted:
|
|
94
|
-
return
|
|
94
|
+
return NSUnderlineStylePatternDot | NSUnderlineStyleSingle; // [macOS]
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
|