Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions CHANGELOG.md

This file was deleted.

131 changes: 63 additions & 68 deletions README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ class HybridInappbrowserNitro : HybridInappbrowserNitroSpec() {
}

private companion object {
// Probe URL to check if any browser can handle HTTP intents.
// Domain is irrelevant; example.com is RFC 2606-reserved.
private const val SCHEME_CHECK_URL = "https://example.com"
}
}
2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://biomejs.dev/schemas/2.4.12/schema.json",
"$schema": "https://biomejs.dev/schemas/2.5.1/schema.json",
"vcs": { "enabled": true, "clientKind": "git", "useIgnoreFile": true },
"files": {
"includes": [
Expand Down
65 changes: 15 additions & 50 deletions example/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import {
} from 'react-native-inappbrowser-nitro'

const REPO_URL = 'https://github.com/mCodex/react-native-inappbrowser-nitro'
const READER_URL =
'https://www.apple.com/newsroom/2025/06/apple-introduces-a-delightful-and-elegant-new-software-design/'
const AUTH_REDIRECT_URL = 'inappbrowsernitro://callback'
const AUTH_URL = `https://httpbin.org/redirect-to?url=${encodeURIComponent(AUTH_REDIRECT_URL)}`

Expand All @@ -30,20 +32,6 @@ const controlPalette = {
highContrast: '#FFD700',
}

const ios26ShowcasePalette = {
base: '#F97316',
light: '#FDBA74',
dark: '#7C3AED',
highContrast: '#DC2626',
}

const ios26ControlPalette = {
base: '#0F172A',
light: '#1E293B',
dark: '#F8FAFC',
highContrast: '#0EA5E9',
}

type ExampleButtonProps = {
label: string
onPress: () => Promise<void> | void
Expand Down Expand Up @@ -134,7 +122,7 @@ function App(): React.JSX.Element {

const handleOpenReader = useCallback(async () => {
try {
const result = await open(REPO_URL, {
const result = await open(READER_URL, {
readerMode: true,
enableBarCollapsing: true,
dismissButtonStyle: 'close',
Expand All @@ -149,24 +137,6 @@ function App(): React.JSX.Element {
}
}, [open, pushLog])

const handleOpenIos26Palette = useCallback(async () => {
try {
const result = await open(REPO_URL, {
preferredBarTintColor: ios26ShowcasePalette,
preferredControlTintColor: ios26ControlPalette,
preferredStatusBarStyle: 'darkContent',
overrideUserInterfaceStyle: 'light',
dismissButtonStyle: 'done',
enableEdgeDismiss: false,
formSheetPreferredContentSize: { width: 414, height: 720 },
})

pushLog(`iOS 26 palette • ${formatResult(result)}`)
} catch (err) {
pushLog(formatError(err))
}
}, [open, pushLog])

const handleAuth = useCallback(async () => {
try {
const result = await openAuth(AUTH_URL, AUTH_REDIRECT_URL, {
Expand Down Expand Up @@ -207,7 +177,7 @@ function App(): React.JSX.Element {
<ScrollView contentContainerStyle={styles.content}>
<Text style={styles.title}>react-native-inappbrowser-nitro</Text>
<Text style={styles.subtitle}>
Nitro-powered in-app browser with iOS 26 & Android 16 features.
Nitro-powered Safari and Custom Tabs integration.
</Text>

<View style={styles.card}>
Expand All @@ -226,21 +196,18 @@ function App(): React.JSX.Element {
<View style={styles.card}>
<Text style={styles.sectionTitle}>Try the Features</Text>
<ExampleButton
label="Open docs with dynamic palette"
label="Open repo with platform colors"
onPress={handleOpenDocs}
disabled={isSupported === false}
/>
<ExampleButton
label="Open repo in reader mode"
onPress={handleOpenReader}
disabled={isSupported === false}
tone="secondary"
/>
<ExampleButton
label="Showcase iOS 26 color overrides"
onPress={handleOpenIos26Palette}
disabled={isSupported === false || Platform.OS !== 'ios'}
/>
{Platform.OS === 'ios' && (
<ExampleButton
label="Open article in Reader Mode"
onPress={handleOpenReader}
disabled={isSupported === false}
tone="secondary"
/>
)}
<ExampleButton
label="Launch auth session (demo)"
onPress={handleAuth}
Expand All @@ -264,10 +231,8 @@ function App(): React.JSX.Element {
exit.
</Text>
<Text style={styles.paragraph}>
The showcase button demonstrates the new iOS 26 palette controls,
including high-contrast overrides, status bar tinting, and
form-sheet sizing. On older iOS versions the system gracefully
ignores unsupported keys.
iOS 26 Safari chrome uses system-controlled Liquid Glass rendering,
so toolbar colors are treated as hints instead of exact branding.
</Text>
</View>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,7 @@
"-DFOLLY_HAVE_CLOCK_GETTIME=1",
"-DRCT_REMOVE_LEGACY_ARCH=1",
);
PODFILE_DIR = "$(SRCROOT)";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../../node_modules/react-native";
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG";
Expand Down Expand Up @@ -460,6 +461,7 @@
"-DFOLLY_HAVE_CLOCK_GETTIME=1",
"-DRCT_REMOVE_LEGACY_ARCH=1",
);
PODFILE_DIR = "$(SRCROOT)";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../../node_modules/react-native";
SDKROOT = iphoneos;
SWIFT_ENABLE_EXPLICIT_MODULES = NO;
Expand Down
Loading
Loading