fix: macOS new architecture build (#2341)

# Summary
Based on recommendations from this
[proposition](https://github.com/software-mansion/react-native-svg/issues/2192#issuecomment-2177330499)
and added some changes now we can build macOS using the new
architecture.

## Compatibility

| OS      | Implemented |
| ------- | :---------: |
| macOS     |         |

---------

Co-authored-by: Maciej Stosio <maciekstosio@users.noreply.github.com>
This commit is contained in:
Bohdan Artiukhov
2024-07-23 15:34:32 +02:00
committed by GitHub
parent 0d97399d06
commit 67620f5b6a
21 changed files with 459 additions and 260 deletions
+1 -1
View File
@@ -311,7 +311,7 @@ RNSVGTopAlignedLabel *label;
NSString *str = self.content;
if (!str) {
for (RNSVGView *node in self.subviews) {
for (RNSVGPlatformView *node in self.subviews) {
if ([node isKindOfClass:[RNSVGText class]]) {
RNSVGText *text = (RNSVGText *)node;
advance += [text getSubtreeTextChunksTotalAdvance];
+1 -1
View File
@@ -345,7 +345,7 @@ using namespace facebook::react;
return cachedAdvance;
}
CGFloat advance = 0;
for (RNSVGView *node in self.subviews) {
for (RNSVGPlatformView *node in self.subviews) {
if ([node isKindOfClass:[RNSVGText class]]) {
RNSVGText *text = (RNSVGText *)node;
advance += [text getSubtreeTextChunksTotalAdvance];