iOS SDK
Appearance
Pass an AppNorthTheme to the native views. The default primary color is SwiftUI's .accentColor; optional color pairs follow the screen's current light or dark appearance.
Use your app colors
Leave optional colors unset to keep the native defaults. For explicit light/dark values, use AppNorthColorPair(light:dark:). A single-color pair uses that color in both appearances.
import SwiftUI
import AppNorth
struct ThemedCommunity: View {
let client: AppNorthClient
private var theme: AppNorthTheme {
AppNorthTheme(
primary: .accentColor,
secondary: AppNorthColorPair(
light: Color(white: 0.95),
dark: Color(white: 0.12)
),
tertiary: AppNorthColorPair(light: .white, dark: .black),
text: AppNorthColorPair(.primary)
)
}
var body: some View {
AppNorthView(client: client, theme: theme)
}
}primary supplies tint and action accents. secondary supplies surfaces such as community rows and chat input backgrounds; tertiary supplies chat background. text overrides text where the views consume it. Status badges use the server's status color. Theme fields are not a global replacement for every system color.
Pass the same theme to AppNorthChatView or AppNorthIdeaDetailView when presenting them separately. Use your existing SwiftUI .preferredColorScheme if your app has an appearance override; there is no separate SDK theme-mode setting.
Choose controls
Use AppNorthUIConfiguration for showsOpenClosedFilter, upvoteIcon, translateButton, and showsChatButton. Icon choices are .arrowUp (default), .thumbsUp, .chevronUp, or .systemName("...") with a valid SF Symbol name. See language for translation controls.
The watermark is determined by the project's widgetConfig() response. It is not a local theme flag. The SDK has no remote font or remote color configuration API.
Verify
Open community, idea detail, and chat in light and dark appearances.
Check text, status badges, buttons, focus, and disabled states with your chosen colors. Aim for at least 4.5 text contrast.
Increase Dynamic Type and turn on VoiceOver; confirm labels remain usable and text does not disappear into overridden surfaces.
If your app changes appearance at runtime, switch it while an SDK screen is open.