Implementation:0xranx OpenContext IOS Settings Screen
| Knowledge Sources | |
|---|---|
| Domains | Settings, iOS |
| Last Updated | 2026-10-24 00:00 GMT |
Overview
React Native settings screen for the iOS app, providing language selection and AI configuration editing with save state feedback.
Description
The SettingsScreen.js component in src-ios/screens/ renders a scrollable settings page with two cards: language selection (Chinese/English) and AI configuration (model, API base, API key, system prompt). AI config fields toggle between readonly and edit modes. Saving calls saveAIConfig with a visual "saved" state indicator. Uses useFocusEffect to dismiss keyboard on focus.
Usage
Registered as the "Settings" tab in the bottom tab navigator within App.js.
Code Reference
Source Location
- Repository: 0xranx_OpenContext
- File: src-ios/screens/SettingsScreen.js
- Lines: 1-343
Signature
function SettingsScreen()
module.exports = SettingsScreen;
Import
const SettingsScreen = require('./screens/SettingsScreen');
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| (none) | — | — | Uses no props; reads AI config via service |
Outputs
| Name | Type | Description |
|---|---|---|
| JSX | React.Element | Settings screen with language + AI config cards |
Usage Examples
Tab Registration
// In App.js RootTabs
<Tab.Screen name="Settings" component={SettingsScreen} />