-
Notifications
You must be signed in to change notification settings - Fork 24.9k
Closed
Labels
API: CameraRollBugResolution: LockedThis issue was locked by the bot.This issue was locked by the bot.
Description
- Review the documentation: https://facebook.github.io/react-native
- Search for existing issues: https://github.com/facebook/react-native/issues
- Use the latest React Native release: https://github.com/facebook/react-native/releases
Environment
Environment:
OS: macOS High Sierra 10.13.5
Node: 8.12.0
Yarn: 1.7.0
npm: 6.4.1
Watchman: 4.9.0
Xcode: Xcode 9.4.1 Build version 9F2000
Android Studio: 3.1 AI-173.4720617
Packages: (wanted => installed)
react: 16.3.1 => 16.3.1
react-native: https://github.com/expo/react-native/archive/sdk-30.0.0.tar.gz => 0.55.4
Description
Currently RN is using ALAsset which is deprecated from iOS 8. RN should use the Photos framework instead, which in iOS 8.0 and later provides more features and better performance for working with a user’s photo library. I am currently experiencing issues with retrieving iCloud photos from CameraRoll
.
Photos App - All Photos
CameraRoll.getPhotos
Reproducible Demo
Have iCloud integrated and "Optimize iPhone Storage" enabled. Then in your emulator Trigger iCloud Sync via the Debug menu. Then run the snippet below. You would expect to see all of your images you can view in the iPhone Photos app under All Photos rendered, however, it only shows some of your images.
import React from 'react';
import { Image, CameraRoll, FlatList } from 'react-native';
export default class CameraRollTest extends React.Component {
state = {
photos: []
};
componentDidMount = async () => {
const result = await CameraRoll.getPhotos({
first: 1000,
groupTypes: 'All'
});
this.setState({
photos: result.edges
});
};
render() {
return (
<FlatList
numColumns={3}
data={this.state.photos}
keyExtractor={item => item.node.image.uri}
renderItem={({ item }) => (
<Image
style={{ width: 100, height: 100 }}
source={{
uri: item.node.image.uri
}}
/>
)}
/>
);
}
}
carlosalmonte04, pdkn, freakyfriday, arizzitano, matthew-gordon and 5 more
Metadata
Metadata
Assignees
Labels
API: CameraRollBugResolution: LockedThis issue was locked by the bot.This issue was locked by the bot.