Implementation:0xranx OpenContext IOS App Entry
| Knowledge Sources | |
|---|---|
| Domains | React_Native, Navigation, iOS |
| Last Updated | 2026-10-24 00:00 GMT |
Overview
React Native app entry point that initializes i18n and SQLite, then renders a floating bottom-tab navigator with Ideas and Settings screens.
Description
The App.js component in src-ios/ bootstraps the OpenContext iOS app. It wraps the app in GestureHandlerRootView, SafeAreaProvider, NavigationContainer, and I18nextProvider. A custom FloatingTabBar renders a floating pill-shaped bottom navigation with Ideas and Settings tabs. The AppContainer shows a loading screen until initI18n() and initDb() complete, then renders RootTabs. The Ideas tab uses a native stack navigator wrapping IdeasScreen.
Usage
Import this component as the root of the Expo/React Native app. It is registered in src-ios/index.js and rendered by the Expo app registry.
Code Reference
Source Location
- Repository: 0xranx_OpenContext
- File: src-ios/App.js
- Lines: 1-256
Signature
function App() // Root component, wraps in I18nextProvider
function AppContainer() // Handles async init, renders RootTabs when ready
function RootTabs() // BottomTabNavigator with Ideas + Settings
function FloatingTabBar({ state, descriptors, navigation }) // Custom floating tab bar
function IdeasStack() // NativeStackNavigator for Ideas flow
function LoadingScreen() // Splash shown during init
Import
const App = require('./App');
module.exports = App;
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| (none) | — | — | Component reads no props; uses global i18n and DB |
Outputs
| Name | Type | Description |
|---|---|---|
| App | React.Component | Root JSX tree with navigation and providers |
Usage Examples
App Registration (Expo)
// src-ios/index.js
import { registerRootComponent } from 'expo';
import App from './App';
registerRootComponent(App);
Custom Floating Tab Bar
// The FloatingTabBar renders a floating pill bar:
// ┌─────────────────────────┐
// │ 💡 Ideas ⚙ Settings │
// └─────────────────────────┘
// positioned absolute at bottom with safe-area padding
<Tab.Navigator
screenOptions={{ headerShown: false, tabBarHideOnKeyboard: true }}
tabBar={(props) => <FloatingTabBar {...props} />}
>
<Tab.Screen name="Ideas" component={IdeasStack} />
<Tab.Screen name="Settings" component={SettingsScreen} />
</Tab.Navigator>