Repository navigation
Example apps: Phase Two branding and a configurable server - #42
Merged
Merged
Conversation
Branding: a launch screen with the Phase Two slash mark in all four example apps (iOS UILaunchScreen without a storyboard; core-splashscreen on the Android demo; dependency-free native launch files for React Native and Flutter), the mark and name on the first screen, the brand blue as accent (iOS AccentColor, Material 3 schemes seeded from #3B82F6), light and dark. Sources and the render script are in design/brand. Server settings: a Server screen in each app sets the server URL, realm and client IDs at runtime, persisted (UserDefaults, SharedPreferences, AsyncStorage, shared_preferences), validated (https except local development hosts) and with Reset to defaults. Saving clears the stored credentials and local push enrollment and rebuilds the SDK instances. Docs updated.
xgp
approved these changes
Nov 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Frames the four example apps (
ios/KeycloakNativeDemo,android/demo, the React Native example, the Flutter example) with light Phase Two branding, and lets each one point at any Keycloak at runtime instead of only the compose stack. No SDK library code changes; the SDK's default login screens are not restyled.Branding
Calm and mostly neutral: a launch screen with the slash mark on a neutral background (light and dark), the mark and "Phase Two" on the first screen, the brand blue as accent, and a "Made by Phase Two · phasetwo.io" line. Sources, tokens and the render script are in
design/brand(README explains how the PNGs and vector drawables were produced;mark.svgreuses the paths fromdesign/app-icons). Platform system fonts; Inter is not bundled.UILaunchScreenin Info.plist (UIColorName+UIImageName), no storyboard; set throughproject.ymland regenerated with XcodeGenAccentColor(#3B82F6light,#6EA8FEdark) viaASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAMEandroidx.core:core-splashscreen1.0.1 (Theme.Demo.Starting→Theme.Demo), vector icon sized for the 192 dp circle#3B82F6(fidelity variant),DemoTheme.kt; previously the app was light onlyLaunchScreen.storyboard(iOS); aLaunchThemewith the Android 12windowSplashScreen*attributes on API 31+, a layer-list before, andMainActivityswitching toAppThemeuseColorScheme; buttons use#2563EB, the module's own primary blueflutter_native_splash: hand-writtenvalues-v31splash attributes pluslaunch_background.xml(Android) and the template storyboard with aLaunchBackgroundcolor set (iOS). Four small resource files beat a generator dependency and its configColorScheme.fromSeed(#3B82F6, fidelity), light and dark (was indigo, light only)Where the SDK's screens read the host theme (Compose
MaterialTheme, FlutterTheme, SwiftUI tint) they take these colors, as they would an integrating app's. The React Native module's screens are light only, so the example keeps them on a white surface in dark mode.Configurable server
Each app has a Server screen reachable from its first screen: server URL, realm, client ID (iOS and Android also the other demo clients and the step-up demo API). The issuer is
<server>/realms/<realm>.@react-native-async-storage/async-storage2.2.0),shared_preferences(Flutter, new dependency). The build-time values stay the defaults, with Reset to defaults.localhost/127.0.0.1(and10.0.2.2on Android) in line with the existing exceptions. ATS stays atNSAllowsLocalNetworkingand the Android cleartext config is unchanged; nothing is broadened.DemoModel(cancelling the old one's scope).docs/sample-app.mdgets a "Server settings" section (with the ATS, cleartext, redirect URI and passkey notes); each example README describes the screen.Other changes:
android/gradle/libs.versions.tomlgainscore-splashscreen; the React Native Podfile raises pod targets below iOS 17 to 17.0 (AsyncStorage's resource bundle target is 13.4, which current Xcode refuses to build); the React Native example pads for the Android status bar, sinceSafeAreaViewinsets on iOS only and the new header ran under it.Verified
swift buildandxcodebuildfor the iOS 26.4 simulator; screenshots of the launch screen, Scenarios and the Server screen in light and dark; a throwaway XCUITest saved a new realm, relaunched (the setting persisted) and reset to defaults../gradlew :demo:assembleDebug(warnings as errors); on an API 36 emulator: splash, Login tab and Server screen in light and dark, the validation message, saving an https server (signed out, new issuer), persistence across a force-stop, Reset to defaults.tsc, eslint, prettier and jest (153 tests);assembleDebugand a simulatorxcodebuild(afterpod install); on the emulator: splash, home and Server screen in light and dark, validation, save and persistence across a restart.flutter analyze,flutter build apk --debug,flutter build ios --simulator --debug; screenshots of the Android splash and home (light and dark), the Server screen, and the iOS launch screen and home in dark mode.Not verified
integration_testand real logins after a server switch were not run.