I have the same problem and I test my own CameraRoll API, it provides a static function
static saveImageWithTag(tag, successCallback, errorCallback)
Help save the image to the camera roll / gallery.
1. , / node_modules/react-native/Libraries/CameraRoll/RCTCameraRoll.xcodeproj . , , . (https://facebook.imtqy.com/react-native/docs/linking-libraries-ios.html#content)
2., . .
3. , . DidMount.
( : https://thebhwgroup.com/blog/accessing-iphone-camera-roll-images-react-native)
'use strict';
var React = require('react-native');
var {
CameraRoll,
View,
} = React;
var CameraRollTest = React.createClass({
componentDidMount() {
CameraRoll.saveImageWithTag('YOUR_IMAGE_TAG/URI', function(data) {
console.log(data);
}, function(err) {
console.log(err);
});
},
render: function() {
return (
<View>
</View>
);
}
});
module.exports = CameraRollTest;
Hide result