@legendapp/spark 0.0.2 → 0.0.3
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/package.json +2 -2
- package/patches/dependencies.json +252 -0
- package/patches/expo-application@55.0.19.patch +54 -0
- package/patches/expo-blur@55.0.18.patch +130 -0
- package/patches/expo-device@55.0.21.patch +149 -0
- package/patches/expo-font@55.0.8.patch +55 -0
- package/patches/expo-glass-effect@55.0.11.patch +304 -0
- package/patches/expo-haptics@55.0.18.patch +54 -0
- package/patches/expo-image-manipulator@55.0.21.patch +312 -0
- package/patches/expo-image-picker@55.0.24.patch +327 -0
- package/patches/expo-image@55.0.11.patch +158 -0
- package/patches/expo-keep-awake@55.0.8.patch +41 -0
- package/patches/expo-localization@55.0.19.patch +32 -0
- package/patches/expo-location@55.1.15.patch +190 -0
- package/patches/expo-symbols@55.0.9.patch +286 -0
- package/patches/expo-system-ui@55.0.22.patch +61 -0
- package/patches/expo-web-browser@55.0.20.patch +13 -0
- package/patches/react-native-app-logs@0.3.1.patch +20 -0
- package/patches/react-native-blurhash@2.1.3.patch +318 -0
- package/patches/react-native-community-blur@4.4.1.patch +415 -0
- package/patches/react-native-community-datetimepicker@9.2.2.patch +320 -0
- package/patches/react-native-fast-image@10.9.9.patch +131 -0
- package/patches/react-native-graph@1.4.0.patch +157 -0
- package/patches/react-native-keyboard-controller@1.22.9.patch +16 -0
- package/patches/react-native-masked-view-masked-view@0.3.2.patch +140 -0
- package/patches/react-native-mmkv@4.3.2.patch +40 -0
- package/patches/react-native-nitro-fetch@1.9.0.patch +130 -0
- package/patches/react-native-nitro-zxing@0.3.0.patch +13 -0
- package/patches/react-native-quick-base64@3.0.1.patch +13 -0
- package/patches/react-native-quick-crypto@1.1.9.patch +31 -0
- package/patches/react-native-release-profiler@0.4.5.patch +37 -0
- package/patches/react-native-screen-corner-radius@0.2.3.patch +13 -0
- package/patches/react-native-screens@4.23.0.patch +160 -0
- package/patches/react-native-svg@15.15.3.patch +31 -0
- package/patches/react-native-unistyles@3.6.0.patch +203 -0
- package/patches/react-native-worklets-core@1.6.3.patch +13 -0
- package/patches/react-navigation-native-stack@7.21.0.patch +16 -0
- package/patches/sentry-react-native@8.32.0.patch +76 -0
- package/skills/spark/UPGRADING.md +34 -0
- package/vendor/node_modules/@legendapp/spark-ai/package.json +3 -3
- package/vendor/node_modules/@legendapp/spark-audio/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-auth-session/package.json +3 -3
- package/vendor/node_modules/@legendapp/spark-cli/dist/build.js +6 -3
- package/vendor/node_modules/@legendapp/spark-cli/dist/dev.js +7 -2
- package/vendor/node_modules/@legendapp/spark-cli/dist/migrations.cjs +3 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/project.js +13 -1
- package/vendor/node_modules/@legendapp/spark-cli/dist/release.json +11 -11
- package/vendor/node_modules/@legendapp/spark-cli/dist/runtime-input-cache.js +140 -0
- package/vendor/node_modules/@legendapp/spark-cli/package.json +3 -3
- package/vendor/node_modules/@legendapp/spark-cli/templates/blank-typescript/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-cli/templates/universal/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-cli/templates/windows/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-clipboard/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-codex/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-commands/package.json +5 -5
- package/vendor/node_modules/@legendapp/spark-context-menu/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-desktop-app/macos/SparkTestDriver.mm +64 -2
- package/vendor/node_modules/@legendapp/spark-desktop-app/package.json +1 -1
- package/vendor/node_modules/@legendapp/spark-desktop-config/autolinking.cjs +3 -2
- package/vendor/node_modules/@legendapp/spark-desktop-config/native-patches.cjs +28 -10
- package/vendor/node_modules/@legendapp/spark-desktop-config/package.json +3 -3
- package/vendor/node_modules/@legendapp/spark-desktop-host/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-desktop-links/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-desktop-shortcuts/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-desktop-windows/package.json +3 -3
- package/vendor/node_modules/@legendapp/spark-documents/package.json +7 -7
- package/vendor/node_modules/@legendapp/spark-drag-drop/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-file-dialog/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-file-system/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-html/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-markdown/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-message-dialog/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-native-menu/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-notifications/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-processes/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-rich-text/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-secure-storage/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-settings/package.json +3 -3
- package/vendor/node_modules/@legendapp/spark-settings-ui/package.json +4 -4
- package/vendor/node_modules/@legendapp/spark-sqlite/package.json +3 -3
- package/vendor/node_modules/@legendapp/spark-system/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-tray/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-ui/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-updates/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-webview/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-window-options/package.json +1 -1
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
diff --git a/RNCMaskedView.podspec b/RNCMaskedView.podspec
|
|
2
|
+
index b29590c..6eefd94 100644
|
|
3
|
+
--- a/RNCMaskedView.podspec
|
|
4
|
+
+++ b/RNCMaskedView.podspec
|
|
5
|
+
@@ -10,7 +10,7 @@ Pod::Spec.new do |s|
|
|
6
|
+
|
|
7
|
+
s.authors = package['author']
|
|
8
|
+
s.homepage = package['homepage']
|
|
9
|
+
- s.platforms = { :ios => "9.0", :tvos => "9.0" }
|
|
10
|
+
+ s.platforms = { :ios => "9.0", :tvos => "9.0", :osx => "14.0" }
|
|
11
|
+
|
|
12
|
+
s.source = { :git => "https://github.com/react-native-masked-view/masked-view.git", :tag => "v#{s.version}" }
|
|
13
|
+
s.source_files = "ios/**/*.{h,m}"
|
|
14
|
+
diff --git a/ios/RNCMaskedView.h b/ios/RNCMaskedView.h
|
|
15
|
+
index afaa6c3..9f80599 100644
|
|
16
|
+
--- a/ios/RNCMaskedView.h
|
|
17
|
+
+++ b/ios/RNCMaskedView.h
|
|
18
|
+
@@ -5,7 +5,10 @@
|
|
19
|
+
* LICENSE file in the root directory of this source tree.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
+#include <TargetConditionals.h>
|
|
23
|
+
+#if !TARGET_OS_OSX
|
|
24
|
+
#import <UIKit/UIKit.h>
|
|
25
|
+
+#endif
|
|
26
|
+
|
|
27
|
+
#import <React/RCTView.h>
|
|
28
|
+
|
|
29
|
+
diff --git a/ios/RNCMaskedView.m b/ios/RNCMaskedView.m
|
|
30
|
+
index e8e51ac..dda4fa1 100644
|
|
31
|
+
--- a/ios/RNCMaskedView.m
|
|
32
|
+
+++ b/ios/RNCMaskedView.m
|
|
33
|
+
@@ -9,6 +9,86 @@
|
|
34
|
+
|
|
35
|
+
#import <React/UIView+React.h>
|
|
36
|
+
|
|
37
|
+
+#if TARGET_OS_OSX
|
|
38
|
+
+#import <QuartzCore/QuartzCore.h>
|
|
39
|
+
+
|
|
40
|
+
+// AppKit has no maskView. The mask stays a live view inside an invisible host so it keeps drawing;
|
|
41
|
+
+// each frame it is rendered into the layer mask of a container holding the other children.
|
|
42
|
+
+@implementation RNCMaskedView {
|
|
43
|
+
+ RCTUIView *_maskHost;
|
|
44
|
+
+ RCTUIView *_contentView;
|
|
45
|
+
+ CALayer *_maskLayer;
|
|
46
|
+
+ CADisplayLink *_displayLink;
|
|
47
|
+
+}
|
|
48
|
+
+
|
|
49
|
+
+- (instancetype)initWithFrame:(NSRect)frame
|
|
50
|
+
+{
|
|
51
|
+
+ if (self = [super initWithFrame:frame]) {
|
|
52
|
+
+ _maskHost = [[RCTUIView alloc] initWithFrame:self.bounds];
|
|
53
|
+
+ _maskHost.autoresizingMask = NSViewWidthSizable | NSViewHeightSizable;
|
|
54
|
+
+ _maskHost.alphaValue = 0;
|
|
55
|
+
+ _contentView = [[RCTUIView alloc] initWithFrame:self.bounds];
|
|
56
|
+
+ _contentView.autoresizingMask = NSViewWidthSizable | NSViewHeightSizable;
|
|
57
|
+
+ _contentView.wantsLayer = YES;
|
|
58
|
+
+ _maskLayer = [CALayer layer];
|
|
59
|
+
+ _contentView.layer.mask = _maskLayer;
|
|
60
|
+
+ [self addSubview:_maskHost];
|
|
61
|
+
+ [self addSubview:_contentView];
|
|
62
|
+
+ }
|
|
63
|
+
+ return self;
|
|
64
|
+
+}
|
|
65
|
+
+
|
|
66
|
+
+- (void)viewDidMoveToWindow
|
|
67
|
+
+{
|
|
68
|
+
+ [super viewDidMoveToWindow];
|
|
69
|
+
+ [_displayLink invalidate];
|
|
70
|
+
+ _displayLink = nil;
|
|
71
|
+
+ if (self.window) {
|
|
72
|
+
+ _displayLink = [self displayLinkWithTarget:self selector:@selector(updateMask)];
|
|
73
|
+
+ [_displayLink addToRunLoop:NSRunLoop.mainRunLoop forMode:NSRunLoopCommonModes];
|
|
74
|
+
+ }
|
|
75
|
+
+}
|
|
76
|
+
+
|
|
77
|
+
+- (void)updateMask
|
|
78
|
+
+{
|
|
79
|
+
+ NSView *maskView = _maskHost.subviews.firstObject;
|
|
80
|
+
+ CGSize size = _contentView.bounds.size;
|
|
81
|
+
+ CGFloat scale = self.window.backingScaleFactor ?: 1;
|
|
82
|
+
+ CGImageRef image = NULL;
|
|
83
|
+
+ if (maskView.layer && size.width > 0 && size.height > 0) {
|
|
84
|
+
+ CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
|
|
85
|
+
+ CGContextRef context = CGBitmapContextCreate(NULL, ceil(size.width * scale), ceil(size.height * scale), 8, 0, colorSpace, kCGImageAlphaPremultipliedLast);
|
|
86
|
+
+ CGColorSpaceRelease(colorSpace);
|
|
87
|
+
+ // The mask image is drawn unflipped; React's views are flipped.
|
|
88
|
+
+ CGContextTranslateCTM(context, 0, ceil(size.height * scale));
|
|
89
|
+
+ CGContextScaleCTM(context, scale, -scale);
|
|
90
|
+
+ [maskView.layer renderInContext:context];
|
|
91
|
+
+ image = CGBitmapContextCreateImage(context);
|
|
92
|
+
+ CGContextRelease(context);
|
|
93
|
+
+ }
|
|
94
|
+
+ [CATransaction begin];
|
|
95
|
+
+ [CATransaction setDisableActions:YES];
|
|
96
|
+
+ _maskLayer.frame = _contentView.layer.bounds;
|
|
97
|
+
+ _maskLayer.contents = (__bridge_transfer id)image;
|
|
98
|
+
+ [CATransaction commit];
|
|
99
|
+
+}
|
|
100
|
+
+
|
|
101
|
+
+- (void)didUpdateReactSubviews
|
|
102
|
+
+{
|
|
103
|
+
+ // RNCMaskedView expects that the first subview rendered is the mask.
|
|
104
|
+
+ NSArray<NSView *> *subviews = self.reactSubviews;
|
|
105
|
+
+ if (subviews.firstObject) {
|
|
106
|
+
+ [_maskHost addSubview:subviews.firstObject];
|
|
107
|
+
+ }
|
|
108
|
+
+ for (NSUInteger i = 1; i < subviews.count; i++) {
|
|
109
|
+
+ [_contentView addSubview:subviews[i]];
|
|
110
|
+
+ }
|
|
111
|
+
+ [self updateMask];
|
|
112
|
+
+}
|
|
113
|
+
+
|
|
114
|
+
+@end
|
|
115
|
+
+
|
|
116
|
+
+#else
|
|
117
|
+
@implementation RNCMaskedView
|
|
118
|
+
|
|
119
|
+
- (void)didUpdateReactSubviews
|
|
120
|
+
@@ -32,3 +112,4 @@ - (void)displayLayer:(CALayer *)layer
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
@end
|
|
124
|
+
+#endif
|
|
125
|
+
diff --git a/ios/RNCMaskedViewManager.m b/ios/RNCMaskedViewManager.m
|
|
126
|
+
index 339ca26..977cbbd 100644
|
|
127
|
+
--- a/ios/RNCMaskedViewManager.m
|
|
128
|
+
+++ b/ios/RNCMaskedViewManager.m
|
|
129
|
+
@@ -13,7 +13,11 @@ @implementation RNCMaskedViewManager
|
|
130
|
+
|
|
131
|
+
RCT_EXPORT_MODULE()
|
|
132
|
+
|
|
133
|
+
+#if TARGET_OS_OSX
|
|
134
|
+
+- (RCTPlatformView *)view
|
|
135
|
+
+#else
|
|
136
|
+
- (UIView *)view
|
|
137
|
+
+#endif
|
|
138
|
+
{
|
|
139
|
+
return [RNCMaskedView new];
|
|
140
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
diff --git a/ios/HybridMMKVPlatformContext.swift b/ios/HybridMMKVPlatformContext.swift
|
|
2
|
+
index 0d19d4a..0644cbc 100644
|
|
3
|
+
--- a/ios/HybridMMKVPlatformContext.swift
|
|
4
|
+
+++ b/ios/HybridMMKVPlatformContext.swift
|
|
5
|
+
@@ -12,6 +12,8 @@ class HybridMMKVPlatformContext: HybridMMKVPlatformContextSpec {
|
|
6
|
+
static var directory: FileManager.SearchPathDirectory {
|
|
7
|
+
#if os(tvOS)
|
|
8
|
+
return .cachesDirectory
|
|
9
|
+
+#elseif os(macOS)
|
|
10
|
+
+ return .applicationSupportDirectory
|
|
11
|
+
#else
|
|
12
|
+
return .documentDirectory
|
|
13
|
+
#endif
|
|
14
|
+
@@ -25,10 +27,26 @@ class HybridMMKVPlatformContext: HybridMMKVPlatformContextSpec {
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// append /mmkv to it
|
|
18
|
+
+#if os(macOS)
|
|
19
|
+
+ // Application Support is shared by every Mac app, so scope MMKV like Spark's other app data.
|
|
20
|
+
+ let basePath = documentsPath.appendingPathComponent(Self.namespace, isDirectory: true).appendingPathComponent("mmkv", conformingTo: .directory)
|
|
21
|
+
+#else
|
|
22
|
+
let basePath = documentsPath.appendingPathComponent("mmkv", conformingTo: .directory)
|
|
23
|
+
+#endif
|
|
24
|
+
return basePath.path
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
+#if os(macOS)
|
|
28
|
+
+ private static var namespace: String {
|
|
29
|
+
+ // Spark's host exports SparkNamespace(); look it up at runtime so MMKV keeps no link dependency on Spark.
|
|
30
|
+
+ typealias Namespace = @convention(c) () -> Unmanaged<NSString>
|
|
31
|
+
+ if let symbol = dlsym(UnsafeMutableRawPointer(bitPattern: -2), "SparkNamespace") {
|
|
32
|
+
+ return unsafeBitCast(symbol, to: Namespace.self)().takeUnretainedValue() as String
|
|
33
|
+
+ }
|
|
34
|
+
+ return Bundle.main.bundleIdentifier ?? ProcessInfo.processInfo.processName
|
|
35
|
+
+ }
|
|
36
|
+
+#endif
|
|
37
|
+
+
|
|
38
|
+
func getAppGroupDirectory() throws -> String? {
|
|
39
|
+
// Read `AppGroupIdentifier` from `Info.plist`
|
|
40
|
+
guard let appGroupID = Bundle.main.object(forInfoDictionaryKey: "AppGroupIdentifier") as? String else {
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
diff --git a/NitroFetch.podspec b/NitroFetch.podspec
|
|
2
|
+
index 8b08083..d08a41d 100644
|
|
3
|
+
--- a/NitroFetch.podspec
|
|
4
|
+
+++ b/NitroFetch.podspec
|
|
5
|
+
@@ -10,7 +10,7 @@ Pod::Spec.new do |s|
|
|
6
|
+
s.license = package["license"]
|
|
7
|
+
s.authors = package["author"]
|
|
8
|
+
|
|
9
|
+
- s.platforms = { :ios => min_ios_version_supported, :tvos => min_ios_version_supported }
|
|
10
|
+
+ s.platforms = { :ios => min_ios_version_supported, :tvos => min_ios_version_supported, :osx => "14.0" }
|
|
11
|
+
s.source = { :git => "https://github.com/margelo/react-native-nitro-fetch.git", :tag => "v#{s.version}" }
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
diff --git a/ios/HybridNativeStorage.swift b/ios/HybridNativeStorage.swift
|
|
15
|
+
index 68e5246..51bcf3b 100644
|
|
16
|
+
--- a/ios/HybridNativeStorage.swift
|
|
17
|
+
+++ b/ios/HybridNativeStorage.swift
|
|
18
|
+
@@ -10,7 +10,11 @@ import Security
|
|
19
|
+
/// Keep `keychainService` and `encPrefix` in sync with `NitroWSSecureAtRest.swift` in nitro-websockets.
|
|
20
|
+
internal enum NitroFetchSecureAtRest {
|
|
21
|
+
static let encPrefix = "nfc1:"
|
|
22
|
+
+#if os(macOS)
|
|
23
|
+
+ private static let keychainService = "com.margelo.nitrofetch.aesgcm.v1.\(AppNamespace.value)"
|
|
24
|
+
+#else
|
|
25
|
+
private static let keychainService = "com.margelo.nitrofetch.aesgcm.v1"
|
|
26
|
+
+#endif
|
|
27
|
+
private static let keychainAccount = "master"
|
|
28
|
+
|
|
29
|
+
private static func loadOrCreateSymmetricKey() throws -> SymmetricKey {
|
|
30
|
+
@@ -119,7 +123,11 @@ internal enum NitroFetchSecureAtRest {
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
final class HybridNativeStorage: HybridNativeStorageSpec {
|
|
34
|
+
+#if os(macOS)
|
|
35
|
+
+ private static let suiteName = "nitro_fetch_storage.\(AppNamespace.value)"
|
|
36
|
+
+#else
|
|
37
|
+
private static let suiteName = "nitro_fetch_storage"
|
|
38
|
+
+#endif
|
|
39
|
+
|
|
40
|
+
private let userDefaults: UserDefaults
|
|
41
|
+
|
|
42
|
+
diff --git a/ios/NitroAutoPrefetcher.swift b/ios/NitroAutoPrefetcher.swift
|
|
43
|
+
index 18ffea9..8b69d1f 100644
|
|
44
|
+
--- a/ios/NitroAutoPrefetcher.swift
|
|
45
|
+
+++ b/ios/NitroAutoPrefetcher.swift
|
|
46
|
+
@@ -6,7 +6,11 @@ public final class NitroAutoPrefetcher: NSObject {
|
|
47
|
+
// Serializes queue reads/writes and keeps Keychain work off the launch thread.
|
|
48
|
+
private static let workQueue = DispatchQueue(label: "com.margelo.nitrofetch.autoprefetch")
|
|
49
|
+
private static let queueKey = "nitrofetch_autoprefetch_queue"
|
|
50
|
+
+#if os(macOS)
|
|
51
|
+
+ private static let suiteName = "nitro_fetch_storage.\(AppNamespace.value)"
|
|
52
|
+
+#else
|
|
53
|
+
private static let suiteName = "nitro_fetch_storage"
|
|
54
|
+
+#endif
|
|
55
|
+
private static let tokenRefreshKey = "nitro_token_refresh_fetch"
|
|
56
|
+
private static let tokenCacheKey = "nitro_token_refresh_fetch_cache"
|
|
57
|
+
|
|
58
|
+
diff --git a/ios/NitroBootstrap.mm b/ios/NitroBootstrap.mm
|
|
59
|
+
index 8e23106..41ad6fc 100644
|
|
60
|
+
--- a/ios/NitroBootstrap.mm
|
|
61
|
+
+++ b/ios/NitroBootstrap.mm
|
|
62
|
+
@@ -1,6 +1,8 @@
|
|
63
|
+
#import <Foundation/Foundation.h>
|
|
64
|
+
#if __has_include(<UIKit/UIKit.h>)
|
|
65
|
+
#import <UIKit/UIKit.h>
|
|
66
|
+
+#elif __has_include(<AppKit/AppKit.h>)
|
|
67
|
+
+#import <AppKit/AppKit.h>
|
|
68
|
+
#endif
|
|
69
|
+
|
|
70
|
+
@interface NitroAutoPrefetcher : NSObject
|
|
71
|
+
@@ -22,6 +24,15 @@ + (void)load {
|
|
72
|
+
[NitroAutoPrefetcher prefetchOnStart];
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
+#elif __has_include(<AppKit/AppKit.h>)
|
|
76
|
+
+ [[NSNotificationCenter defaultCenter] addObserverForName:NSApplicationDidFinishLaunchingNotification
|
|
77
|
+
+ object:nil queue:nil
|
|
78
|
+
+ usingBlock:^(__unused NSNotification *note) {
|
|
79
|
+
+ [NitroAutoPrefetcher prefetchOnStart];
|
|
80
|
+
+ }];
|
|
81
|
+
+ dispatch_async(dispatch_get_main_queue(), ^{
|
|
82
|
+
+ [NitroAutoPrefetcher prefetchOnStart];
|
|
83
|
+
+ });
|
|
84
|
+
#endif
|
|
85
|
+
}
|
|
86
|
+
@end
|
|
87
|
+
diff --git a/ios/NitroURLSession.swift b/ios/NitroURLSession.swift
|
|
88
|
+
index 871df60..0505ac4 100644
|
|
89
|
+
--- a/ios/NitroURLSession.swift
|
|
90
|
+
+++ b/ios/NitroURLSession.swift
|
|
91
|
+
@@ -18,12 +18,39 @@ private final class NitroPinningURLSessionDelegate: NSObject, URLSessionDelegate
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
enum NitroURLCache {
|
|
95
|
+
+#if os(macOS)
|
|
96
|
+
+ // A relative diskPath resolves against the working directory on macOS, so keep the cache in
|
|
97
|
+
+ // the app's Caches folder, scoped like Spark's other app data.
|
|
98
|
+
+ static let shared = URLCache(
|
|
99
|
+
+ memoryCapacity: 32 * 1024 * 1024,
|
|
100
|
+
+ diskCapacity: 100 * 1024 * 1024,
|
|
101
|
+
+ directory: FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask)[0]
|
|
102
|
+
+ .appendingPathComponent(AppNamespace.value, isDirectory: true)
|
|
103
|
+
+ .appendingPathComponent("nitrofetch_urlcache", isDirectory: true)
|
|
104
|
+
+ )
|
|
105
|
+
+#else
|
|
106
|
+
static let shared = URLCache(
|
|
107
|
+
memoryCapacity: 32 * 1024 * 1024,
|
|
108
|
+
diskCapacity: 100 * 1024 * 1024,
|
|
109
|
+
diskPath: "nitrofetch_urlcache"
|
|
110
|
+
)
|
|
111
|
+
+#endif
|
|
112
|
+
+}
|
|
113
|
+
+
|
|
114
|
+
+#if os(macOS)
|
|
115
|
+
+/// Mac apps share ~/Library, user defaults suites and Keychain services, so Nitro Fetch's stores are
|
|
116
|
+
+/// scoped like Spark's other app data.
|
|
117
|
+
+enum AppNamespace {
|
|
118
|
+
+ static let value: String = {
|
|
119
|
+
+ // Spark's host exports SparkNamespace(); look it up at runtime so Nitro Fetch keeps no link dependency on Spark.
|
|
120
|
+
+ typealias Namespace = @convention(c) () -> Unmanaged<NSString>
|
|
121
|
+
+ if let symbol = dlsym(UnsafeMutableRawPointer(bitPattern: -2), "SparkNamespace") {
|
|
122
|
+
+ return unsafeBitCast(symbol, to: Namespace.self)().takeUnretainedValue() as String
|
|
123
|
+
+ }
|
|
124
|
+
+ return Bundle.main.bundleIdentifier ?? ProcessInfo.processInfo.processName
|
|
125
|
+
+ }()
|
|
126
|
+
}
|
|
127
|
+
+#endif
|
|
128
|
+
|
|
129
|
+
enum NitroURLSession {
|
|
130
|
+
static let shared = make(configuration: .default)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
diff --git a/VisionCameraZxing.podspec b/VisionCameraZxing.podspec
|
|
2
|
+
index 301b92f..c4fda73 100644
|
|
3
|
+
--- a/VisionCameraZxing.podspec
|
|
4
|
+
+++ b/VisionCameraZxing.podspec
|
|
5
|
+
@@ -20,7 +20,7 @@ Pod::Spec.new do |s|
|
|
6
|
+
s.license = package["license"]
|
|
7
|
+
s.authors = package["author"]
|
|
8
|
+
|
|
9
|
+
- s.platforms = { :ios => min_ios_version_supported, :visionos => 1.0 }
|
|
10
|
+
+ s.platforms = { :ios => min_ios_version_supported, :visionos => 1.0, :osx => "14.0" }
|
|
11
|
+
s.source = { :git => "https://github.com/margelo/react-native-vision-camera-zxing.git", :tag => "v#{s.version}" }
|
|
12
|
+
|
|
13
|
+
s.source_files = [
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
diff --git a/react-native-quick-base64.podspec b/react-native-quick-base64.podspec
|
|
2
|
+
index eb43697..f02ee48 100644
|
|
3
|
+
--- a/react-native-quick-base64.podspec
|
|
4
|
+
+++ b/react-native-quick-base64.podspec
|
|
5
|
+
@@ -10,7 +10,7 @@ Pod::Spec.new do |s|
|
|
6
|
+
s.license = package["license"]
|
|
7
|
+
s.authors = package["author"]
|
|
8
|
+
|
|
9
|
+
- s.platforms = { :ios => min_ios_version_supported }
|
|
10
|
+
+ s.platforms = { :ios => min_ios_version_supported, :osx => "14.0" }
|
|
11
|
+
s.source = { :git => "https://github.com/craftzdog/react-native-quick-base64.git", :tag => "#{s.version}" }
|
|
12
|
+
|
|
13
|
+
s.source_files = "ios/**/*.{h,m,mm}", "cpp/**/*.{hpp,cpp,c,h}", "ios/generated/*.{h,cpp,mm}"
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
diff --git a/QuickCrypto.podspec b/QuickCrypto.podspec
|
|
2
|
+
index 8e026e5..0c45a92 100644
|
|
3
|
+
--- a/QuickCrypto.podspec
|
|
4
|
+
+++ b/QuickCrypto.podspec
|
|
5
|
+
@@ -198,7 +198,10 @@ Pod::Spec.new do |s|
|
|
6
|
+
# Disable x86 SIMD intrinsics on iOS simulator — the .c implementation files are already
|
|
7
|
+
# excluded above, but blake3_dispatch.c still references the symbols unless these macros
|
|
8
|
+
# are defined. Mirrors the Android CMakeLists.txt approach (line 18-22).
|
|
9
|
+
- "GCC_PREPROCESSOR_DEFINITIONS[sdk=iphonesimulator*][arch=x86_64]" => "$(inherited) BLAKE3_NO_AVX512 BLAKE3_NO_AVX2 BLAKE3_NO_SSE41 BLAKE3_NO_SSE2 NCRYPTO_EVP_ONLY=1"
|
|
10
|
+
+ "GCC_PREPROCESSOR_DEFINITIONS[sdk=iphonesimulator*][arch=x86_64]" => "$(inherited) BLAKE3_NO_AVX512 BLAKE3_NO_AVX2 BLAKE3_NO_SSE41 BLAKE3_NO_SSE2 NCRYPTO_EVP_ONLY=1",
|
|
11
|
+
+ # Intel Macs need the same: no NEON source and no x86 SIMD symbols.
|
|
12
|
+
+ "EXCLUDED_SOURCE_FILE_NAMES[sdk=macosx*][arch=x86_64]" => "deps/blake3/c/blake3_neon.c",
|
|
13
|
+
+ "GCC_PREPROCESSOR_DEFINITIONS[sdk=macosx*][arch=x86_64]" => "$(inherited) BLAKE3_NO_AVX512 BLAKE3_NO_AVX2 BLAKE3_NO_SSE41 BLAKE3_NO_SSE2 NCRYPTO_EVP_ONLY=1"
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
# Every translation unit calls the renamed OpenSSL symbols. Missing a rename
|
|
17
|
+
diff --git a/deps/fastpbkdf2/fastpbkdf2.c b/deps/fastpbkdf2/fastpbkdf2.c
|
|
18
|
+
index ee2d2f0..b04ec59 100644
|
|
19
|
+
--- a/deps/fastpbkdf2/fastpbkdf2.c
|
|
20
|
+
+++ b/deps/fastpbkdf2/fastpbkdf2.c
|
|
21
|
+
@@ -17,8 +17,8 @@
|
|
22
|
+
#include <assert.h>
|
|
23
|
+
#include <string.h>
|
|
24
|
+
#if defined(__GNUC__)
|
|
25
|
+
- #if TARGET_OS_MACCATALYST
|
|
26
|
+
- #include <machine/endian.h> // Mac Catalyst
|
|
27
|
+
+ #if TARGET_OS_MACCATALYST || TARGET_OS_OSX
|
|
28
|
+
+ #include <machine/endian.h> // Mac Catalyst, macOS
|
|
29
|
+
#else
|
|
30
|
+
#include <endian.h> // iOS
|
|
31
|
+
#endif
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
diff --git a/ios/ReleaseProfiler.mm b/ios/ReleaseProfiler.mm
|
|
2
|
+
index b38beb6..50e668d 100644
|
|
3
|
+
--- a/ios/ReleaseProfiler.mm
|
|
4
|
+
+++ b/ios/ReleaseProfiler.mm
|
|
5
|
+
@@ -1,5 +1,6 @@
|
|
6
|
+
#import <React/RCTBridgeModule.h>
|
|
7
|
+
#import <hermes/hermes.h>
|
|
8
|
+
+#include <dlfcn.h>
|
|
9
|
+
|
|
10
|
+
#ifdef __has_include
|
|
11
|
+
#if __has_include(<cxxreact/ReactNativeVersion.h>)
|
|
12
|
+
@@ -51,6 +52,12 @@ + (BOOL)requiresMainQueueSetup
|
|
13
|
+
withRejecter:(RCTPromiseRejectBlock)reject) {
|
|
14
|
+
NSFileManager* sharedFM = [NSFileManager defaultManager];
|
|
15
|
+
NSURL *appDir=[[sharedFM URLsForDirectory:NSCachesDirectory inDomains:NSUserDomainMask] objectAtIndex:0];
|
|
16
|
+
+#if TARGET_OS_OSX
|
|
17
|
+
+ // ~/Library/Caches is shared by every Mac app; use the app's own folder, scoped like Spark's other app data.
|
|
18
|
+
+ NSString *(*sparkNamespace)(void) = (NSString *(*)(void))dlsym(RTLD_DEFAULT, "SparkNamespace");
|
|
19
|
+
+ appDir = [appDir URLByAppendingPathComponent:sparkNamespace ? sparkNamespace() : NSBundle.mainBundle.bundleIdentifier isDirectory:YES];
|
|
20
|
+
+ [sharedFM createDirectoryAtURL:appDir withIntermediateDirectories:YES attributes:nil error:nil];
|
|
21
|
+
+#endif
|
|
22
|
+
NSString * tempFilename = [NSString stringWithFormat:@"profile-%@%@", [[NSProcessInfo processInfo] globallyUniqueString], @".cpuprofile"];
|
|
23
|
+
NSURL *fileURL=[appDir URLByAppendingPathComponent:tempFilename];
|
|
24
|
+
std::string finalPath = std::string([fileURL.path UTF8String]);
|
|
25
|
+
diff --git a/react-native-release-profiler.podspec b/react-native-release-profiler.podspec
|
|
26
|
+
index 135d951..b5efe5e 100644
|
|
27
|
+
--- a/react-native-release-profiler.podspec
|
|
28
|
+
+++ b/react-native-release-profiler.podspec
|
|
29
|
+
@@ -11,7 +11,7 @@ Pod::Spec.new do |s|
|
|
30
|
+
s.license = package["license"]
|
|
31
|
+
s.authors = package["author"]
|
|
32
|
+
|
|
33
|
+
- s.platforms = { :ios => "11.0" }
|
|
34
|
+
+ s.platforms = { :ios => "11.0", :osx => "14.0" }
|
|
35
|
+
s.source = { :git => "https://github.com/Szymon20000/react-native-release-profiler.git", :tag => "#{s.version}" }
|
|
36
|
+
|
|
37
|
+
s.source_files = "ios/**/*.{h,m,mm,swift}"
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
diff --git a/src/index.ts b/src/index.ts
|
|
2
|
+
index 60f89f5..369c39a 100644
|
|
3
|
+
--- a/src/index.ts
|
|
4
|
+
+++ b/src/index.ts
|
|
5
|
+
@@ -4,7 +4,7 @@ import { NativeModules } from 'react-native';
|
|
6
|
+
* The current device's screen's corner radius. May also be `0` if the corner radius couldn't be detected.
|
|
7
|
+
*/
|
|
8
|
+
export const ScreenCornerRadius: number =
|
|
9
|
+
- NativeModules.ScreenCornerRadius.cornerRadius ?? 0;
|
|
10
|
+
+ NativeModules.ScreenCornerRadius?.cornerRadius ?? 0;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* `true` if the screen has rounded corners, `false` otherwise.
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
diff --git a/src/components/DebugContainer.macos.tsx b/src/components/DebugContainer.macos.tsx
|
|
2
|
+
new file mode 100644
|
|
3
|
+
index 0000000..7526909
|
|
4
|
+
--- /dev/null
|
|
5
|
+
+++ b/src/components/DebugContainer.macos.tsx
|
|
6
|
+
@@ -0,0 +1,3 @@
|
|
7
|
+
+// macOS has no native screens: use the web implementation's plain views.
|
|
8
|
+
+export * from './DebugContainer.web';
|
|
9
|
+
+export { default } from './DebugContainer.web';
|
|
10
|
+
diff --git a/src/components/FullWindowOverlay.macos.tsx b/src/components/FullWindowOverlay.macos.tsx
|
|
11
|
+
new file mode 100644
|
|
12
|
+
index 0000000..43c70ba
|
|
13
|
+
--- /dev/null
|
|
14
|
+
+++ b/src/components/FullWindowOverlay.macos.tsx
|
|
15
|
+
@@ -0,0 +1,3 @@
|
|
16
|
+
+// macOS has no native screens: use the web implementation's plain views.
|
|
17
|
+
+export * from './FullWindowOverlay.web';
|
|
18
|
+
+export { default } from './FullWindowOverlay.web';
|
|
19
|
+
diff --git a/src/components/Screen.macos.tsx b/src/components/Screen.macos.tsx
|
|
20
|
+
new file mode 100644
|
|
21
|
+
index 0000000..2cd1f2a
|
|
22
|
+
--- /dev/null
|
|
23
|
+
+++ b/src/components/Screen.macos.tsx
|
|
24
|
+
@@ -0,0 +1,3 @@
|
|
25
|
+
+// macOS has no native screens: use the web implementation's plain views.
|
|
26
|
+
+export * from './Screen.web';
|
|
27
|
+
+export { default } from './Screen.web';
|
|
28
|
+
diff --git a/src/components/ScreenContainer.macos.tsx b/src/components/ScreenContainer.macos.tsx
|
|
29
|
+
new file mode 100644
|
|
30
|
+
index 0000000..710309d
|
|
31
|
+
--- /dev/null
|
|
32
|
+
+++ b/src/components/ScreenContainer.macos.tsx
|
|
33
|
+
@@ -0,0 +1,3 @@
|
|
34
|
+
+// macOS has no native screens: use the web implementation's plain views.
|
|
35
|
+
+export * from './ScreenContainer.web';
|
|
36
|
+
+export { default } from './ScreenContainer.web';
|
|
37
|
+
diff --git a/src/components/ScreenContentWrapper.macos.tsx b/src/components/ScreenContentWrapper.macos.tsx
|
|
38
|
+
new file mode 100644
|
|
39
|
+
index 0000000..ff03c98
|
|
40
|
+
--- /dev/null
|
|
41
|
+
+++ b/src/components/ScreenContentWrapper.macos.tsx
|
|
42
|
+
@@ -0,0 +1,3 @@
|
|
43
|
+
+// macOS has no native screens: use the web implementation's plain views.
|
|
44
|
+
+export * from './ScreenContentWrapper.web';
|
|
45
|
+
+export { default } from './ScreenContentWrapper.web';
|
|
46
|
+
diff --git a/src/components/ScreenFooter.macos.tsx b/src/components/ScreenFooter.macos.tsx
|
|
47
|
+
new file mode 100644
|
|
48
|
+
index 0000000..8a6e94e
|
|
49
|
+
--- /dev/null
|
|
50
|
+
+++ b/src/components/ScreenFooter.macos.tsx
|
|
51
|
+
@@ -0,0 +1,3 @@
|
|
52
|
+
+// macOS has no native screens: use the web implementation's plain views.
|
|
53
|
+
+export * from './ScreenFooter.web';
|
|
54
|
+
+export { default } from './ScreenFooter.web';
|
|
55
|
+
diff --git a/src/components/ScreenStack.macos.tsx b/src/components/ScreenStack.macos.tsx
|
|
56
|
+
new file mode 100644
|
|
57
|
+
index 0000000..48b1e73
|
|
58
|
+
--- /dev/null
|
|
59
|
+
+++ b/src/components/ScreenStack.macos.tsx
|
|
60
|
+
@@ -0,0 +1,3 @@
|
|
61
|
+
+// macOS has no native screens: use the web implementation's plain views.
|
|
62
|
+
+export * from './ScreenStack.web';
|
|
63
|
+
+export { default } from './ScreenStack.web';
|
|
64
|
+
diff --git a/src/components/ScreenStackHeaderConfig.macos.tsx b/src/components/ScreenStackHeaderConfig.macos.tsx
|
|
65
|
+
new file mode 100644
|
|
66
|
+
index 0000000..b613332
|
|
67
|
+
--- /dev/null
|
|
68
|
+
+++ b/src/components/ScreenStackHeaderConfig.macos.tsx
|
|
69
|
+
@@ -0,0 +1,2 @@
|
|
70
|
+
+// macOS has no native screens: use the web implementation's plain views.
|
|
71
|
+
+export * from './ScreenStackHeaderConfig.web';
|
|
72
|
+
diff --git a/src/components/SearchBar.macos.tsx b/src/components/SearchBar.macos.tsx
|
|
73
|
+
new file mode 100644
|
|
74
|
+
index 0000000..939c989
|
|
75
|
+
--- /dev/null
|
|
76
|
+
+++ b/src/components/SearchBar.macos.tsx
|
|
77
|
+
@@ -0,0 +1,3 @@
|
|
78
|
+
+// macOS has no native screens: use the web implementation's plain views.
|
|
79
|
+
+export * from './SearchBar.web';
|
|
80
|
+
+export { default } from './SearchBar.web';
|
|
81
|
+
diff --git a/src/components/gamma/split/SplitHost.macos.tsx b/src/components/gamma/split/SplitHost.macos.tsx
|
|
82
|
+
new file mode 100644
|
|
83
|
+
index 0000000..7f7f91a
|
|
84
|
+
--- /dev/null
|
|
85
|
+
+++ b/src/components/gamma/split/SplitHost.macos.tsx
|
|
86
|
+
@@ -0,0 +1,3 @@
|
|
87
|
+
+// macOS has no native screens: use the web implementation's plain views.
|
|
88
|
+
+export * from './SplitHost.web';
|
|
89
|
+
+export { default } from './SplitHost.web';
|
|
90
|
+
diff --git a/src/components/gamma/split/SplitScreen.macos.tsx b/src/components/gamma/split/SplitScreen.macos.tsx
|
|
91
|
+
new file mode 100644
|
|
92
|
+
index 0000000..049aa9f
|
|
93
|
+
--- /dev/null
|
|
94
|
+
+++ b/src/components/gamma/split/SplitScreen.macos.tsx
|
|
95
|
+
@@ -0,0 +1,3 @@
|
|
96
|
+
+// macOS has no native screens: use the web implementation's plain views.
|
|
97
|
+
+export * from './SplitScreen.web';
|
|
98
|
+
+export { default } from './SplitScreen.web';
|
|
99
|
+
diff --git a/src/components/gamma/stack/StackHost.macos.tsx b/src/components/gamma/stack/StackHost.macos.tsx
|
|
100
|
+
new file mode 100644
|
|
101
|
+
index 0000000..ea6c2a9
|
|
102
|
+
--- /dev/null
|
|
103
|
+
+++ b/src/components/gamma/stack/StackHost.macos.tsx
|
|
104
|
+
@@ -0,0 +1,3 @@
|
|
105
|
+
+// macOS has no native screens: use the web implementation's plain views.
|
|
106
|
+
+export * from './StackHost.web';
|
|
107
|
+
+export { default } from './StackHost.web';
|
|
108
|
+
diff --git a/src/components/gamma/stack/StackScreen.macos.tsx b/src/components/gamma/stack/StackScreen.macos.tsx
|
|
109
|
+
new file mode 100644
|
|
110
|
+
index 0000000..f6b6910
|
|
111
|
+
--- /dev/null
|
|
112
|
+
+++ b/src/components/gamma/stack/StackScreen.macos.tsx
|
|
113
|
+
@@ -0,0 +1,3 @@
|
|
114
|
+
+// macOS has no native screens: use the web implementation's plain views.
|
|
115
|
+
+export * from './StackScreen.web';
|
|
116
|
+
+export { default } from './StackScreen.web';
|
|
117
|
+
diff --git a/src/components/safe-area/SafeAreaView.macos.tsx b/src/components/safe-area/SafeAreaView.macos.tsx
|
|
118
|
+
new file mode 100644
|
|
119
|
+
index 0000000..e96a644
|
|
120
|
+
--- /dev/null
|
|
121
|
+
+++ b/src/components/safe-area/SafeAreaView.macos.tsx
|
|
122
|
+
@@ -0,0 +1,3 @@
|
|
123
|
+
+// macOS has no native screens: use the web implementation's plain views.
|
|
124
|
+
+export * from './SafeAreaView.web';
|
|
125
|
+
+export { default } from './SafeAreaView.web';
|
|
126
|
+
diff --git a/src/components/tabs/TabsHost.macos.tsx b/src/components/tabs/TabsHost.macos.tsx
|
|
127
|
+
new file mode 100644
|
|
128
|
+
index 0000000..fa5d559
|
|
129
|
+
--- /dev/null
|
|
130
|
+
+++ b/src/components/tabs/TabsHost.macos.tsx
|
|
131
|
+
@@ -0,0 +1,3 @@
|
|
132
|
+
+// macOS has no native screens: use the web implementation's plain views.
|
|
133
|
+
+export * from './TabsHost.web';
|
|
134
|
+
+export { default } from './TabsHost.web';
|
|
135
|
+
diff --git a/src/components/tabs/TabsScreen.macos.tsx b/src/components/tabs/TabsScreen.macos.tsx
|
|
136
|
+
new file mode 100644
|
|
137
|
+
index 0000000..8d72134
|
|
138
|
+
--- /dev/null
|
|
139
|
+
+++ b/src/components/tabs/TabsScreen.macos.tsx
|
|
140
|
+
@@ -0,0 +1,3 @@
|
|
141
|
+
+// macOS has no native screens: use the web implementation's plain views.
|
|
142
|
+
+export * from './TabsScreen.web';
|
|
143
|
+
+export { default } from './TabsScreen.web';
|
|
144
|
+
diff --git a/src/fabric/NativeScreensModule.macos.ts b/src/fabric/NativeScreensModule.macos.ts
|
|
145
|
+
new file mode 100644
|
|
146
|
+
index 0000000..f242de2
|
|
147
|
+
--- /dev/null
|
|
148
|
+
+++ b/src/fabric/NativeScreensModule.macos.ts
|
|
149
|
+
@@ -0,0 +1,3 @@
|
|
150
|
+
+// macOS has no native screens: use the web implementation's plain views.
|
|
151
|
+
+export * from './NativeScreensModule.web';
|
|
152
|
+
+export { default } from './NativeScreensModule.web';
|
|
153
|
+
diff --git a/src/gesture-handler/fabricUtils.macos.ts b/src/gesture-handler/fabricUtils.macos.ts
|
|
154
|
+
new file mode 100644
|
|
155
|
+
index 0000000..56afb7a
|
|
156
|
+
--- /dev/null
|
|
157
|
+
+++ b/src/gesture-handler/fabricUtils.macos.ts
|
|
158
|
+
@@ -0,0 +1,2 @@
|
|
159
|
+
+// macOS has no native screens: use the web implementation's plain views.
|
|
160
|
+
+export * from './fabricUtils.web';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
diff --git a/apple/Elements/RNSVGSvgView.mm b/apple/Elements/RNSVGSvgView.mm
|
|
2
|
+
index d03d5c0..a3e679f 100644
|
|
3
|
+
--- a/apple/Elements/RNSVGSvgView.mm
|
|
4
|
+
+++ b/apple/Elements/RNSVGSvgView.mm
|
|
5
|
+
@@ -315,6 +315,15 @@ - (void)drawToContext:(CGContextRef)context withRect:(CGRect)rect
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
+#if TARGET_OS_OSX
|
|
10
|
+
+// React Native macOS component views draw through updateLayer, so AppKit never calls drawRect:,
|
|
11
|
+
+// which is where the SVG renders.
|
|
12
|
+
+- (BOOL)wantsUpdateLayer
|
|
13
|
+
+{
|
|
14
|
+
+ return NO;
|
|
15
|
+
+}
|
|
16
|
+
+#endif
|
|
17
|
+
+
|
|
18
|
+
- (void)drawRect:(CGRect)rect
|
|
19
|
+
{
|
|
20
|
+
RNSVGPlatformView *parent = self.superview;
|
|
21
|
+
diff --git a/apple/RNSVGUIKit.macos.mm b/apple/RNSVGUIKit.macos.mm
|
|
22
|
+
index aa9f94b..f3bbf76 100644
|
|
23
|
+
--- a/apple/RNSVGUIKit.macos.mm
|
|
24
|
+
+++ b/apple/RNSVGUIKit.macos.mm
|
|
25
|
+
@@ -1,5 +1,6 @@
|
|
26
|
+
#import "RNSVGUIKit.h"
|
|
27
|
+
#import <objc/runtime.h>
|
|
28
|
+
+#import <React/RCTAssert.h>
|
|
29
|
+
|
|
30
|
+
#if TARGET_OS_OSX
|
|
31
|
+
|