Skip to content

Conversation

@thisislvca
Copy link
Contributor

@thisislvca thisislvca commented Feb 8, 2026

This PR updates picker presentation by introducing dedicated sheet components while keeping the existing customizable selection view path.

Main changes:

  • Keep existing customizable/fallback views:
    • DeviceActivitySelectionView
    • DeviceActivitySelectionViewPersisted
  • Add dedicated native sheet views:
    • DeviceActivitySelectionSheetView
    • DeviceActivitySelectionSheetViewPersisted
  • Keep iOS native sheet internals (.familyActivityPicker(isPresented:), Cancel/Done, parent/child VC wiring) behind the new sheet components.
  • Fix sheet bottom background to systemGroupedBackground so the presented sheet matches system visuals.
  • Update example app to expose both implementations clearly:
    • Sheet View (native iOS)
    • Selection View (custom wrapper)
  • Fix a pre-existing example bug where tapping “Select apps” inside Create Activity did not open picker flow.
  • Clarify README docs around:
    • sheet vs selection view choice
    • persisted vs non-persisted variants

Why

The native sheet UX is better for standard iOS behavior, but the customizable selection view path is still useful for custom presentation and fallback handling.
This keeps both paths first-class and explicit.

API impact

No breaking changes.

Added components:

  • DeviceActivitySelectionSheetView
  • DeviceActivitySelectionSheetViewPersisted

Notes:

  • DeviceActivitySelectionView* remain the customizable inline/custom-wrapper components.
  • onDismissRequest is available on the new sheet components.

Screenshots

Selection View (custom wrapper) Sheet View (native iOS)
old new
Updated example app UI

Validation

  • Ran bun run pre-push (typecheck/lint/SwiftLint strict).
  • Manually verified:
    • sheet view opens native iOS Cancel/Done flow
    • dismiss callback fires correctly
    • sheet background fix is applied
    • selection view custom-wrapper path still works
    • Create Activity “Select apps” now opens picker flow
    • example “Picker Views” labels reflect actual component model

@thisislvca
Copy link
Contributor Author

@robertherber lmk if you need me to make any changes, it'd be smart to add the table in this PR to the README.md too in my opinion, happy to do so if you agree :)

I'm also working on the reporting feature, will PR tomorrow once I'm happy with the code quality.

@robertherber
Copy link
Member

Awesome, thanks for digging into this! We had this initially as the only option in the library. The reason I switched it was to make it easy to create your own UI around the system view. Both for customizability and being able to provide a fallback view when the native view crashes.

Could you add it as a separate view here to keep the flexibility, and preferably keep both implementations in the example? I'd be happy to merge that! :)

Fix a pre-existing bug in the example app where tapping "Select apps" inside the Create Activity modal did not open the picker flow.
Align example UI wording with the split component model (Sheet View vs Selection View) to avoid implying the custom path is deprecated.
@thisislvca
Copy link
Contributor Author

Should be good now. I also fixed a small bug in the example app where the Create Activity picker didn't work, which was introduced back in 2024 :)

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 9, 2026

Open in StackBlitz

npm i https://pkg.pr.new/kingstinct/react-native-device-activity@84

commit: c242d61

Copy link
Member

@robertherber robertherber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great - thanks! 👍 Only thing is I think we need to keep isUserInteractionEnabled to allow interactions with the fallback error view

@thisislvca
Copy link
Contributor Author

shoot my bad, totally missed that part

@robertherber robertherber merged commit 5dee761 into kingstinct:main Feb 9, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants