Skip to content

Commit 5030e28

Browse files
committed
chore: update SFSymbol example and dependencies
Simplify example to focus on basic sizing demonstration
1 parent c063646 commit 5030e28

File tree

3 files changed

+17
-26
lines changed

3 files changed

+17
-26
lines changed

example/ios/Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2528,7 +2528,7 @@ PODS:
25282528
- RNWorklets
25292529
- SocketRocket
25302530
- Yoga
2531-
- RNSwiftUI (0.9.1):
2531+
- RNSwiftUI (0.11.0):
25322532
- boost
25332533
- DoubleConversion
25342534
- fast_float
@@ -2969,7 +2969,7 @@ SPEC CHECKSUMS:
29692969
ReactCommon: 25c7f94aee74ddd93a8287756a8ac0830a309544
29702970
RNGestureHandler: f1dd7f92a0faa2868a919ab53bb9d66eb4ebfcf5
29712971
RNReanimated: d331374033e3c3de0e339126660451b22a6e4f24
2972-
RNSwiftUI: 16ba8b443e9bb6c5624909d3831aacddd8fad761
2972+
RNSwiftUI: 72f4374758b8e446013f060cf121e5a4d1092d79
29732973
RNWorklets: f1f3b3e66fe5003ea71d8d8ac1e1d6f9da56cedd
29742974
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
29752975
Yoga: edeb9900b9e5bb5b27b9a6a2d5914e4fe4033c1b

example/ios/RNSwiftUIExample.xcodeproj/project.pbxproj

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -191,14 +191,10 @@
191191
inputFileListPaths = (
192192
"${PODS_ROOT}/Target Support Files/Pods-RNSwiftUIExample/Pods-RNSwiftUIExample-frameworks-${CONFIGURATION}-input-files.xcfilelist",
193193
);
194-
inputPaths = (
195-
);
196194
name = "[CP] Embed Pods Frameworks";
197195
outputFileListPaths = (
198196
"${PODS_ROOT}/Target Support Files/Pods-RNSwiftUIExample/Pods-RNSwiftUIExample-frameworks-${CONFIGURATION}-output-files.xcfilelist",
199197
);
200-
outputPaths = (
201-
);
202198
runOnlyForDeploymentPostprocessing = 0;
203199
shellPath = /bin/sh;
204200
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RNSwiftUIExample/Pods-RNSwiftUIExample-frameworks.sh\"\n";
@@ -234,14 +230,10 @@
234230
inputFileListPaths = (
235231
"${PODS_ROOT}/Target Support Files/Pods-RNSwiftUIExample/Pods-RNSwiftUIExample-resources-${CONFIGURATION}-input-files.xcfilelist",
236232
);
237-
inputPaths = (
238-
);
239233
name = "[CP] Copy Pods Resources";
240234
outputFileListPaths = (
241235
"${PODS_ROOT}/Target Support Files/Pods-RNSwiftUIExample/Pods-RNSwiftUIExample-resources-${CONFIGURATION}-output-files.xcfilelist",
242236
);
243-
outputPaths = (
244-
);
245237
runOnlyForDeploymentPostprocessing = 0;
246238
shellPath = /bin/sh;
247239
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RNSwiftUIExample/Pods-RNSwiftUIExample-resources.sh\"\n";
@@ -386,7 +378,10 @@
386378
"-DFOLLY_CFG_NO_COROUTINES=1",
387379
"-DFOLLY_HAVE_CLOCK_GETTIME=1",
388380
);
389-
OTHER_LDFLAGS = "$(inherited) ";
381+
OTHER_LDFLAGS = (
382+
"$(inherited)",
383+
" ",
384+
);
390385
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
391386
SDKROOT = iphoneos;
392387
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG";
@@ -455,7 +450,10 @@
455450
"-DFOLLY_CFG_NO_COROUTINES=1",
456451
"-DFOLLY_HAVE_CLOCK_GETTIME=1",
457452
);
458-
OTHER_LDFLAGS = "$(inherited) ";
453+
OTHER_LDFLAGS = (
454+
"$(inherited)",
455+
" ",
456+
);
459457
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
460458
SDKROOT = iphoneos;
461459
USE_HERMES = true;

example/src/views/SFSymbolExample.tsx

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
import {
2-
SFSymbol,
3-
type SFSymbolProps,
4-
} from '@mgcrea/react-native-swiftui/src';
1+
import { SFSymbol, type SFSymbolProps } from '@mgcrea/react-native-swiftui/src';
52
import { useState, type FunctionComponent } from 'react';
63
import { ScrollView, StyleSheet, Text, View } from 'react-native';
74
import { SafeAreaView } from 'react-native-safe-area-context';
@@ -133,9 +130,7 @@ export const SFSymbolExample: FunctionComponent = () => {
133130
/>
134131
))}
135132
</View>
136-
<Text style={styles.caption}>
137-
ultraLight → black
138-
</Text>
133+
<Text style={styles.caption}>ultraLight → black</Text>
139134
</View>
140135

141136
{/* Scales */}
@@ -322,11 +317,7 @@ export const SFSymbolExample: FunctionComponent = () => {
322317
<Text style={styles.caption}>Tab bar icons</Text>
323318

324319
<View style={styles.listItem}>
325-
<SFSymbol
326-
name="checkmark.circle.fill"
327-
size={22}
328-
color="#34C759"
329-
/>
320+
<SFSymbol name="checkmark.circle.fill" size={22} color="#34C759" />
330321
<Text style={styles.listItemText}>Completed task</Text>
331322
</View>
332323
<View style={styles.listItem}>
@@ -394,8 +385,10 @@ const styles = StyleSheet.create({
394385
marginTop: 8,
395386
},
396387
symbol: {
397-
width: 32,
398-
height: 32,
388+
// backgroundColor: 'red',
389+
// height: 50,
390+
// width: 50,
391+
// No fixed width/height so intrinsic sizing from native can take effect
399392
},
400393
symbolRow: {
401394
flexDirection: 'row',

0 commit comments

Comments
 (0)