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
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@ export default function BottomSheetScreen() {
</Host>

<Text>isOpened: {isOpened ? 'yes' : 'no'}</Text>
<Host matchContents>
<BottomSheet isOpened={isOpened} onIsOpenedChange={(e) => setIsOpened(e)}>
<View style={{ padding: 20 }}>
<Text>Hello world</Text>
</View>
</BottomSheet>
</Host>
{isOpened && (
<Host matchContents>
<BottomSheet onDismissRequest={() => setIsOpened(false)}>
<View style={{ padding: 20 }}>
<Text>Hello world</Text>
</View>
</BottomSheet>
</Host>
)}
</ScrollView>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default function JetpackComposePrimitivesScreen() {
horizontalArrangement="spaceBetween"
verticalAlignment="center"
modifiers={[testID('leftTextRow')]}>
<Text fontSize={18} fontWeight="bold" color="#ff0000">
<Text color="#ff0000" style={{ fontSize: 18, fontWeight: 'bold' }}>
Left Text
</Text>
</Row>
Expand All @@ -33,7 +33,7 @@ export default function JetpackComposePrimitivesScreen() {
horizontalArrangement="spaceBetween"
verticalAlignment="center"
modifiers={[testID('interpolatedTextRow')]}>
<Text fontSize={18} fontWeight="bold" color="#ff0000">
<Text color="#ff0000" style={{ fontSize: 18, fontWeight: 'bold' }}>
{/* eslint-disable-next-line */}
Hello {'world'} {123}
</Text>
Expand All @@ -42,23 +42,20 @@ export default function JetpackComposePrimitivesScreen() {
{/* Example 2: Column with different Text styles */}
<Column verticalArrangement="spaceEvenly" horizontalAlignment="center">
<Text
fontSize={24}
fontWeight="bold"
color="#ff0000"
style={{ fontSize: 24, fontWeight: 'bold' }}
modifiers={[testID('largeBoldText')]}>
Large Bold Text
</Text>
<Text
fontSize={16}
fontWeight="normal"
color="#00ff00"
style={{ fontSize: 16, fontWeight: 'normal' }}
modifiers={[testID('mediumNormalText')]}>
Medium Normal Text
</Text>
<Text
fontSize={12}
fontWeight="300"
color="#666666"
style={{ fontSize: 12, fontWeight: '300' }}
modifiers={[testID('smallLightText')]}>
Small Light Text
</Text>
Expand All @@ -77,43 +74,51 @@ export default function JetpackComposePrimitivesScreen() {
modifiers={[background('#ff0000'), weight(2), testID('nestedColumn1')]}
verticalArrangement="center"
horizontalAlignment="center">
<Text fontSize={16} fontWeight="500" modifiers={[testID('nestedColumn1Text')]}>
<Text
style={{ fontSize: 16, fontWeight: '500' }}
modifiers={[testID('nestedColumn1Text')]}>
Nested
</Text>
<Text fontSize={14} color="#333333">
<Text color="#333333" style={{ fontSize: 14 }}>
Column 1
</Text>
</Column>
<Column
verticalArrangement="center"
horizontalAlignment="center"
modifiers={[testID('nestedColumn2')]}>
<Text fontSize={16} fontWeight="500" modifiers={[testID('nestedColumn2Text')]}>
<Text
style={{ fontSize: 16, fontWeight: '500' }}
modifiers={[testID('nestedColumn2Text')]}>
Nested
</Text>
<Text fontSize={14} color="#333333">
<Text color="#333333" style={{ fontSize: 14 }}>
Column 2
</Text>
</Column>
<Column
modifiers={[background('#ff0000'), weight(4), testID('nestedColumn3')]}
verticalArrangement="center"
horizontalAlignment="center">
<Text fontSize={16} fontWeight="500" modifiers={[testID('nestedColumn2Text')]}>
<Text
style={{ fontSize: 16, fontWeight: '500' }}
modifiers={[testID('nestedColumn2Text')]}>
Nested
</Text>
<Text fontSize={14} color="#333333">
<Text color="#333333" style={{ fontSize: 14 }}>
Column 3
</Text>
</Column>
<Column
verticalArrangement="center"
horizontalAlignment="center"
modifiers={[testID('nestedColumn4')]}>
<Text fontSize={16} fontWeight="500" modifiers={[testID('nestedColumn4text')]}>
<Text
style={{ fontSize: 16, fontWeight: '500' }}
modifiers={[testID('nestedColumn4text')]}>
Nested
</Text>
<Text fontSize={14} color="#333333">
<Text color="#333333" style={{ fontSize: 14 }}>
Column 4
</Text>
</Column>
Expand Down
2 changes: 1 addition & 1 deletion apps/notification-tester/scripts/prebuild-android.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

RELEASE=1 MICROFOAM_GOOGLE_SERVICES_JSON=~/google-services-microfoam-vonovak.json EXPO_NO_GIT_STATUS=1 EXPO_DEBUG=1 npx expo prebuild --clean -p android --template expo-template-bare-minimum@canary
RELEASE=1 MICROFOAM_GOOGLE_SERVICES_JSON=~/google-services-microfoam-vonovak.json EXPO_NO_GIT_STATUS=1 EXPO_DEBUG=1 npx expo prebuild --clean -p android --template expo-template-bare-minimum@55


echo 'include(":expo-modules-test-core")' >> ./android/settings.gradle
Expand Down
2 changes: 1 addition & 1 deletion apps/notification-tester/scripts/prebuild-ios.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash

EXPO_NO_GIT_STATUS=1 EXPO_DEBUG=1 npx expo prebuild --clean -p ios --template expo-template-bare-minimum@canary && xed ios
EXPO_NO_GIT_STATUS=1 EXPO_DEBUG=1 npx expo prebuild --clean -p ios --template expo-template-bare-minimum@55 && xed ios
28 changes: 28 additions & 0 deletions apps/notification-tester/src/app/scenarios.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,34 @@ import { ScrollView } from '../misc/Themed';
export default function ScenariosPage() {
return (
<ScrollView contentContainerStyle={{ rowGap: 10, padding: 10 }}>
<HeadingText>Local notification with custom sound</HeadingText>
<ListButton
title="Schedule notification with bells_sound.wav"
onPress={async () => {
await Notifications.scheduleNotificationAsync({
content: {
title: 'Custom sound test',
body: 'This should play bells_sound.wav',
sound: 'bells_sound.wav',
},
trigger: null,
});
}}
/>
<ListButton
title="Schedule notification with nonexistent sound"
onPress={async () => {
await Notifications.scheduleNotificationAsync({
content: {
title: 'Missing sound test',
body: 'This should warn about missing sound',
sound: 'does_not_exist.wav',
},
trigger: null,
});
}}
/>

<HeadingText>Send push notification with deep link</HeadingText>
<ListButton
title="Subscribe to Topic, Send Notification manually from firebase console"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,6 @@ export default function HeaderItemsScreen() {
{/* Xcasset icon buttons */}
<Stack.Toolbar.Button
hidden={!showXcassetButton1}
tintColor={Color.ios.systemTeal}
onPress={() => Alert.alert('Xcasset Button', 'expo-logo pressed')}>
<Stack.Toolbar.Icon xcasset="expo-logo" />
</Stack.Toolbar.Button>
Expand All @@ -333,10 +332,7 @@ export default function HeaderItemsScreen() {
</Stack.Toolbar.Button>

{/* Xcasset icon menus */}
<Stack.Toolbar.Menu
hidden={!showXcassetMenu1}
title="Xcasset Menu 1"
tintColor={Color.ios.systemTeal}>
<Stack.Toolbar.Menu hidden={!showXcassetMenu1} title="Xcasset Menu 1">
<Stack.Toolbar.Icon xcasset="expo-logo" />
<Stack.Toolbar.Label>Expo Logo</Stack.Toolbar.Label>
<Stack.Toolbar.MenuAction
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/router/advanced/native-tabs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ export default function TabLayout() {

> **important** Icon rendering mode is available in SDK 55 and later.

When using the `src` prop for custom images on iOS, you can control how the icon is rendered with the `renderingMode` prop:
When using the `src` or `xcasset` prop for custom images on iOS, you can control how the icon is rendered with the `renderingMode` prop:

- **`template` (default)**: The icon is rendered as a template image, allowing iOS to apply the tint color. This is ideal for single-color icons that should match your app's color scheme.
- **`original`**: The icon is rendered with its original colors preserved. This is useful for icons with gradients or multiple colors.
Expand Down Expand Up @@ -391,7 +391,7 @@ export default function TabLayout() {
}
```

> **info** The rendering mode for asset catalog icons is controlled in Xcode's asset catalog using the **Render As** setting on the image set, not via props.
> **info** Asset catalog icons support the `renderingMode` prop, just like `src` icons. When `iconColor` is set, icons default to `template` rendering. Otherwise, they default to `original`.

### Label

Expand Down
79 changes: 79 additions & 0 deletions docs/pages/versions/unversioned/sdk/dev-menu.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
---
title: DevMenu
description: A library that provides a developer menu for debug builds.
sourceCodeUrl: 'https://github.com/expo/expo/tree/main/packages/expo-dev-menu'
packageName: 'expo-dev-menu'
platforms: ['android', 'ios', 'tvos']
---

import APISection from '~/components/plugins/APISection';
import { APIInstallSection } from '~/components/plugins/InstallSection';
import { ContentSpotlight } from '~/ui/components/ContentSpotlight';
import { Terminal } from '~/ui/components/Snippet';

The `expo-dev-menu` can be used as a **standalone library** in any Expo project. It is especially useful in [brownfield apps](/versions/unversioned/sdk/brownfield/) that don't need the full [`expo-dev-client`](/versions/unversioned/sdk/dev-client/) launcher interface.

`expo-dev-menu` provides a developer menu UI for React Native apps that includes:

- A powerful and extensible menu UI accessible via shake gesture or three-finger long press
- Quick access to common development actions
- Support for custom menu items to extend functionality

## Installation

<APIInstallSection />

## Usage

Once installed, the developer menu is available in your debug builds. You can open it by:

- **Shake gesture**: Shake your device
- **Three-finger long press**: Long press with three fingers on the screen
- **Programmatically**: Call `DevMenu.openMenu()` from your code

## Extending the dev menu

The dev menu can be extended to include extra buttons by using the `registerDevMenuItems` API:

```tsx
import { registerDevMenuItems } from 'expo-dev-menu';

const devMenuItems = [
{
name: 'My Custom Button',
callback: () => console.log('Hello world!'),
},
];

registerDevMenuItems(devMenuItems);
```

This will create a new section in the dev menu that includes the buttons you have registered:

<ContentSpotlight
alt="An example of a custom menu button in expo-dev-menu"
src="/static/images/dev-client/custom-menu-button.png"
className="max-w-[400px]"
/>

> **Note:** Subsequent calls of `registerDevMenuItems` will override all previous entries.
## Using with expo-dev-client

If you are using [development builds](/develop/development-builds/introduction/), install `expo-dev-client` instead. It includes `expo-dev-menu` along with additional development tools:

- A configurable launcher UI for switching between development servers
- Improved debugging tools
- Support for loading updates from [EAS Update](/eas-update/introduction/)

<Terminal cmd={['$ npx expo install expo-dev-client']} />

For more information, check the [`expo-dev-client` reference](/versions/latest/sdk/dev-client/).

## API

```js
import * as DevMenu from 'expo-dev-menu';
```

<APISection packageName={['expo-dev-menu']} apiName="DevMenu" />
80 changes: 80 additions & 0 deletions docs/pages/versions/v55.0.0/sdk/dev-menu.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
---
title: DevMenu
description: A library that provides a developer menu for debug builds.
sourceCodeUrl: 'https://github.com/expo/expo/tree/main/packages/expo-dev-menu'
packageName: 'expo-dev-menu'
platforms: ['android', 'ios', 'tvos']
isNew: true
---

import APISection from '~/components/plugins/APISection';
import { APIInstallSection } from '~/components/plugins/InstallSection';
import { ContentSpotlight } from '~/ui/components/ContentSpotlight';
import { Terminal } from '~/ui/components/Snippet';

The `expo-dev-menu` can be used as a **standalone library** in any Expo project. It is especially useful in [brownfield apps](/versions/v55.0.0/sdk/brownfield/) that don't need the full [`expo-dev-client`](/versions/v55.0.0/sdk/dev-client/) launcher interface.

`expo-dev-menu` provides a developer menu UI for React Native apps that includes:

- A powerful and extensible menu UI accessible via shake gesture or three-finger long press
- Quick access to common development actions
- Support for custom menu items to extend functionality

## Installation

<APIInstallSection />

## Usage

Once installed, the developer menu is available in your debug builds. You can open it by:

- **Shake gesture**: Shake your device
- **Three-finger long press**: Long press with three fingers on the screen
- **Programmatically**: Call `DevMenu.openMenu()` from your code

## Extending the dev menu

The dev menu can be extended to include extra buttons by using the `registerDevMenuItems` API:

```tsx
import { registerDevMenuItems } from 'expo-dev-menu';

const devMenuItems = [
{
name: 'My Custom Button',
callback: () => console.log('Hello world!'),
},
];

registerDevMenuItems(devMenuItems);
```

This will create a new section in the dev menu that includes the buttons you have registered:

<ContentSpotlight
alt="An example of a custom menu button in expo-dev-menu"
src="/static/images/dev-client/custom-menu-button.png"
className="max-w-[400px]"
/>

> **Note:** Subsequent calls of `registerDevMenuItems` will override all previous entries.

## Using with expo-dev-client

If you are using [development builds](/develop/development-builds/introduction/), install `expo-dev-client` instead. It includes `expo-dev-menu` along with additional development tools:

- A configurable launcher UI for switching between development servers
- Improved debugging tools
- Support for loading updates from [EAS Update](/eas-update/introduction/)

<Terminal cmd={['$ npx expo install expo-dev-client']} />

For more information, check the [`expo-dev-client` reference](/versions/latest/sdk/dev-client/).

## API

```js
import * as DevMenu from 'expo-dev-menu';
```

<APISection packageName={['expo-dev-menu']} apiName="DevMenu" />
1 change: 1 addition & 0 deletions docs/public/static/data/unversioned/expo-dev-menu.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"schemaVersion":"2.0","name":"expo-dev-menu","variant":"project","kind":1,"children":[{"name":"ExpoDevMenuItem","variant":"declaration","kind":2097152,"comment":{"summary":[{"kind":"text","text":"An object representing the custom development client menu entry."}]},"children":[{"name":"callback","variant":"declaration","kind":1024,"comment":{"summary":[{"kind":"text","text":"Callback to fire, when user selects an item."}]},"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"signatures":[{"name":"__type","variant":"signature","kind":4096,"type":{"type":"intrinsic","name":"void"}}]}}},{"name":"name","variant":"declaration","kind":1024,"comment":{"summary":[{"kind":"text","text":"Name of the entry, will be used as label."}]},"type":{"type":"intrinsic","name":"string"}},{"name":"shouldCollapse","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"A boolean specifying if the menu should close after the user interaction."}],"blockTags":[{"tag":"@default","content":[{"kind":"text","text":"false"}]}]},"type":{"type":"intrinsic","name":"boolean"}}]},{"name":"closeMenu","variant":"declaration","kind":64,"signatures":[{"name":"closeMenu","variant":"signature","kind":4096,"comment":{"summary":[{"kind":"text","text":"A method that closes development client menu when called."}]},"type":{"type":"intrinsic","name":"void"}}]},{"name":"hideMenu","variant":"declaration","kind":64,"signatures":[{"name":"hideMenu","variant":"signature","kind":4096,"comment":{"summary":[{"kind":"text","text":"A method that hides development client menu when called."}]},"type":{"type":"intrinsic","name":"void"}}]},{"name":"openMenu","variant":"declaration","kind":64,"signatures":[{"name":"openMenu","variant":"signature","kind":4096,"comment":{"summary":[{"kind":"text","text":"A method that opens development client menu when called."}]},"type":{"type":"intrinsic","name":"void"}}]},{"name":"registerDevMenuItems","variant":"declaration","kind":64,"signatures":[{"name":"registerDevMenuItems","variant":"signature","kind":4096,"comment":{"summary":[{"kind":"text","text":"A method that allows to specify custom entries in the development client menu."}]},"parameters":[{"name":"items","variant":"param","kind":32768,"type":{"type":"array","elementType":{"type":"reference","name":"ExpoDevMenuItem","package":"expo-dev-menu"}}}],"type":{"type":"reference","target":{"packageName":"typescript","packagePath":"lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript"}}]}],"packageName":"expo-dev-menu"}

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/public/static/data/unversioned/expo-router.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/public/static/data/v55.0.0/expo-dev-menu.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"schemaVersion":"2.0","name":"expo-dev-menu","variant":"project","kind":1,"children":[{"name":"ExpoDevMenuItem","variant":"declaration","kind":2097152,"comment":{"summary":[{"kind":"text","text":"An object representing the custom development client menu entry."}]},"children":[{"name":"callback","variant":"declaration","kind":1024,"comment":{"summary":[{"kind":"text","text":"Callback to fire, when user selects an item."}]},"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"signatures":[{"name":"__type","variant":"signature","kind":4096,"type":{"type":"intrinsic","name":"void"}}]}}},{"name":"name","variant":"declaration","kind":1024,"comment":{"summary":[{"kind":"text","text":"Name of the entry, will be used as label."}]},"type":{"type":"intrinsic","name":"string"}},{"name":"shouldCollapse","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"A boolean specifying if the menu should close after the user interaction."}],"blockTags":[{"tag":"@default","content":[{"kind":"text","text":"false"}]}]},"type":{"type":"intrinsic","name":"boolean"}}]},{"name":"closeMenu","variant":"declaration","kind":64,"signatures":[{"name":"closeMenu","variant":"signature","kind":4096,"comment":{"summary":[{"kind":"text","text":"A method that closes development client menu when called."}]},"type":{"type":"intrinsic","name":"void"}}]},{"name":"hideMenu","variant":"declaration","kind":64,"signatures":[{"name":"hideMenu","variant":"signature","kind":4096,"comment":{"summary":[{"kind":"text","text":"A method that hides development client menu when called."}]},"type":{"type":"intrinsic","name":"void"}}]},{"name":"openMenu","variant":"declaration","kind":64,"signatures":[{"name":"openMenu","variant":"signature","kind":4096,"comment":{"summary":[{"kind":"text","text":"A method that opens development client menu when called."}]},"type":{"type":"intrinsic","name":"void"}}]},{"name":"registerDevMenuItems","variant":"declaration","kind":64,"signatures":[{"name":"registerDevMenuItems","variant":"signature","kind":4096,"comment":{"summary":[{"kind":"text","text":"A method that allows to specify custom entries in the development client menu."}]},"parameters":[{"name":"items","variant":"param","kind":32768,"type":{"type":"array","elementType":{"type":"reference","name":"ExpoDevMenuItem","package":"expo-dev-menu"}}}],"type":{"type":"reference","target":{"packageName":"typescript","packagePath":"lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript"}}]}],"packageName":"expo-dev-menu"}

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/public/static/data/v55.0.0/expo-router.json

Large diffs are not rendered by default.

Loading
Loading