Skip to content

Commit

Permalink
fix: compile on visionOS
Browse files Browse the repository at this point in the history
  • Loading branch information
okwasniewski committed Dec 12, 2024
1 parent c30274b commit fb84a0c
Show file tree
Hide file tree
Showing 7 changed files with 334 additions and 256 deletions.
16 changes: 2 additions & 14 deletions apps/example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,7 @@ import {
useColorScheme,
Platform,
} from 'react-native';
import {
DarkTheme,
DefaultTheme,
NavigationContainer,
useNavigation,
} from '@react-navigation/native';
import { NavigationContainer, useNavigation } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import { SafeAreaProvider } from 'react-native-safe-area-context';
Expand All @@ -30,7 +25,6 @@ import SFSymbols from './Examples/SFSymbols';
import LabeledTabs from './Examples/Labeled';
import NativeBottomTabs from './Examples/NativeBottomTabs';
import TintColorsExample from './Examples/TintColors';
import NativeBottomTabsVectorIcons from './Examples/NativeBottomTabsVectorIcons';
import NativeBottomTabsEmbeddedStacks from './Examples/NativeBottomTabsEmbeddedStacks';
import NativeBottomTabsSVGs from './Examples/NativeBottomTabsSVGs';
import NativeBottomTabsRemoteIcons from './Examples/NativeBottomTabsRemoteIcons';
Expand Down Expand Up @@ -131,10 +125,6 @@ const examples = [
component: HiddenTab,
name: 'Four Tabs - With Hidden Tab',
},
{
component: NativeBottomTabsVectorIcons,
name: 'Native Bottom Tabs with Vector Icons',
},
{
component: NativeBottomTabsSVGs,
name: 'Native Bottom Tabs with SVG Icons',
Expand Down Expand Up @@ -189,12 +179,10 @@ export default function Navigation() {
const [mode, setMode] = React.useState<'native' | 'js'>(defaultStack);

const NavigationStack = mode === 'js' ? Stack : NativeStack;
const colorScheme = useColorScheme();
const theme = colorScheme === 'dark' ? DarkTheme : DefaultTheme;

return (
<SafeAreaProvider>
<NavigationContainer theme={theme}>
<NavigationContainer>
<NavigationStack.Navigator initialRouteName="BottomTabs Example">
<NavigationStack.Screen
name="BottomTabs Example"
Expand Down
78 changes: 0 additions & 78 deletions apps/example/src/Examples/NativeBottomTabsVectorIcons.tsx

This file was deleted.

7 changes: 7 additions & 0 deletions apps/example/visionos/Podfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
plugin 'cocoapods-swift-modular-headers'

ws_dir = Pathname.new(__dir__)
ws_dir = ws_dir.parent until
File.exist?("#{ws_dir}/node_modules/react-native-test-app/visionos/test_app.rb") ||
Expand All @@ -6,4 +8,9 @@ require "#{ws_dir}/node_modules/react-native-test-app/visionos/test_app.rb"

workspace 'ReactNativeBottomTabsExample.xcworkspace'

apply_modular_headers_for_swift_dependencies()

use_test_app!



Loading

0 comments on commit fb84a0c

Please sign in to comment.