Issue
When an iOS user has granted limited photo library access to an app, they are given the option to change the visible photos when opening the photo picker, however if this resulting dialog is then dismissed, there is no way to change the visible photos in-app again until the app is re-opened.
Steps to reproduce
Steps to reproduce the behavior:
- Provide limited library access to an app using
stream-chat-react-native
- the resulting screen in Settings.app > Privacy & Security > Photos >
APP_NAME will look like this:
- Open a channel in your app
- Click on the attachment icon
- observe the following popup allowing you to select which photos should be visible:
- Press "Keep Current Selection"
- Observe that there is now no way to change the selected photos from the photo library, until the app is re-opened and the popup from (4.) is shown again:
Expected behavior
Instead of always showing the popup when opening the attachment picker for the first time, I believe that the attachment picker should instead allow the user to trigger photo selection, which is what is done in other apps.
For example, Facebook Messenger:
Or Slack:
Project Related Information
Customization
Click To Expand
Offline support
Environment
Click To Expand
package.json:
"expo-media-library": "15.4.1",
"@react-native-community/netinfo": "9.3.10",
"expo-file-system": "15.4.3",
"react-native-gesture-handler": "2.12.1",
"expo-image-picker": "14.3.2",
"expo-image-manipulator": "11.3.0",
"react-native-reanimated": "3.3.0",
"react-native-svg": "13.9.0",
"stream-chat-expo": "5.16.0",
react-native info output:
System:
OS: macOS 13.5.2
CPU: (10) arm64 Apple M1 Max
Memory: 75.44 MB / 32.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 18.16.0
path: /private/var/folders/9y/jsk3j2317c7bpdl61ldr05rc0000gp/T/xfs-6a747772/node
Yarn:
version: 3.6.3
path: /private/var/folders/9y/jsk3j2317c7bpdl61ldr05rc0000gp/T/xfs-6a747772/yarn
npm:
version: 9.5.1
path: ~/.nvm/versions/node/v18.16.0/bin/npm
Watchman:
version: 2023.09.04.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.12.1
path: /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 23.0
- iOS 17.0
- macOS 14.0
- tvOS 17.0
- watchOS 10.0
Android SDK: Not Found
IDEs:
Android Studio: 2022.2 AI-222.4459.24.2221.9787799
Xcode:
version: 15.0/15A240d
path: /usr/bin/xcodebuild
Languages:
Java: Not Found
Ruby:
version: 2.6.10
path: /usr/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react: Not Found
react-native: Not Found
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: Not found
newArchEnabled: Not found
iOS:
hermesEnabled: Not found
newArchEnabled: Not found
- Platform that you're experiencing the issue on:
stream-chat-react-native version you're using that has this issue:
- Device/Emulator info:
Additional context
I believe the underlying code that triggers the initial access prompt is here:
|
useEffect(() => { |
|
if ( |
|
!attemptedToLoadPhotosOnOpenRef.current && |
|
selectedPicker === 'images' && |
|
endCursorRef.current === undefined && |
|
currentIndex > -1 && |
|
!loadingPhotos |
|
) { |
|
getMorePhotos(); |
Screenshots
Click To Expand
Added above.
Issue
When an iOS user has granted limited photo library access to an app, they are given the option to change the visible photos when opening the photo picker, however if this resulting dialog is then dismissed, there is no way to change the visible photos in-app again until the app is re-opened.
Steps to reproduce
Steps to reproduce the behavior:
stream-chat-react-nativeAPP_NAMEwill look like this:Expected behavior
Instead of always showing the popup when opening the attachment picker for the first time, I believe that the attachment picker should instead allow the user to trigger photo selection, which is what is done in other apps.
For example, Facebook Messenger:
Or Slack:
Project Related Information
Customization
Click To Expand
Offline support
Environment
Click To Expand
package.json:react-native infooutput:stream-chat-react-nativeversion you're using that has this issue:5.16.0iOS 17e.g. iPhone 13 ProAdditional context
I believe the underlying code that triggers the initial access prompt is here:
stream-chat-react-native/package/src/components/AttachmentPicker/AttachmentPicker.tsx
Lines 192 to 200 in b55d561
Screenshots
Click To Expand
Added above.