question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CameraRoll returns photos if assetType is equal to "Videos"

See original GitHub issue

Environment

React Native Environment Info: System: OS: macOS High Sierra 10.13.6 CPU: (4) x64 Intel® Core™ i5-4288U CPU @ 2.60GHz Memory: 29.58 MB / 8.00 GB Shell: 5.3 - /bin/zsh Binaries: Node: 8.12.0 - ~/.nvm/versions/node/v8.12.0/bin/node Yarn: 1.12.3 - /usr/local/bin/yarn npm: 6.4.1 - ~/.nvm/versions/node/v8.12.0/bin/npm SDKs: iOS SDK: Platforms: iOS 11.4, macOS 10.13, tvOS 11.4, watchOS 4.3 Android SDK: API Levels: 23, 25, 26, 27, 28 Build Tools: 27.0.3, 28.0.3 System Images: android-27 | Google Play Intel x86 Atom IDEs: Android Studio: 3.2 AI-181.5540.7.32.5056338 Xcode: 9.4.1/9F2000 - /usr/bin/xcodebuild npmPackages: react: 16.6.1 => 16.6.1 react-native: 0.57.5 => 0.57.5 npmGlobalPackages: react-native-cli: 2.0.1

Description

I receive photos in iOS app, despite the fact that I set assetType: ‘Videos’

Reproducible Demo

const defaultParams: GetPhotosParamType = {
    first: 6,
    groupTypes: 'All',
    after: undefined,
};
Promise.all([
    CameraRoll.getPhotos({
    ...defaultParams,
    assetType: 'Photos',
    }),
    CameraRoll.getPhotos({
    ...defaultParams,
    assetType: 'Videos',
    })
]).then(results => {
    console.warn(results[0]);
    console.warn(results[1]);
    console.warn(results[0].edges[0].node.image.uri === results[1].edges[0].node.image.uri);
});

screen shot 2018-11-19 at 16 36 08

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
indapubliccommented, Feb 19, 2019
0reactions
cpojercommented, Mar 19, 2019

This issue has been moved to react-native-community/react-native-cameraroll#15.

Read more comments on GitHub >

github_iconTop Results From Across the Web

CameraRoll returns photos if assetType is equal to "Videos" #15
CameraRoll returns photos if assetType is equal to "Videos " #15 ... photos in iOS app, despite the fact that I set assetType:...
Read more >
React native camera roll not returning any images in ...
I tried with a lot of combinations and the one below worked for the ios device - CameraRoll.getPhotos({ first: 5000, assetType: 'Photos' })...
Read more >
react-native-photo-gallery-api - NPM Package Overview - Socket
Returns a Promise with photo identifier objects from the local camera roll of the device matching shape defined by getPhotosReturnChecker .
Read more >
react-native-camera-roll-gallery - Lue Hang
An easy and simple to use React Native component to render a custom layout for CameraRoll photos (next update will have videos) and ......
Read more >
CameraRoll - React Native Archive
Returns a Promise with photo identifier objects from the local camera roll of the device matching shape defined by getPhotosReturnChecker . Parameters: Name ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found