camera-roll

How to save a Picture to a specific folder from React Native Camera Roll

独自空忆成欢 提交于 2019-12-06 11:45:18
So I'm using Expo's Camera API to take a picture, like so: takePicture = async function() { if(this.camera) { this.camera.takePictureAsync().then(data => { CameraRoll.saveToCameraRoll(data.uri); }).then(() => { this.setState({ photoId: this.state.photoId + 1, }); }); } }; Now, I'd like to specifically retrieve the pictures I take with this app to work with later. I figure an easy way to do this would be if the app saved its pictures to a separate folder in the camera roll, much like how Instagram makes its own folder in there. How would I go about having the app create its own folder in the

UIVideoAtPathIsCompatibleWithSavedPhotosAlbum returns false when deploying on the iPhone

▼魔方 西西 提交于 2019-12-05 10:06:46
One of my app's features is to download a mp4 file and store it to the local phone album. I have tried several approaches since and the result is always the same, it worked on the simulator but not on the actual iPhone. Xcode is version 5.0.1, iPhone 4. Below is the code I applied on the last attempt before posted here using ASIHttpRequest library and the result is still the same, it worked on the simulator but not the phone itself. download: ASIHTTPRequest* request = [ASIHTTPRequest requestWithURL:url]; // url is the address to the mp4 file NSString* filePath = [NSString stringWithFormat:@"%@

ios 8, how to get all photos using ALAssetLibrary to replace the missing camera roll album

邮差的信 提交于 2019-12-04 10:21:13
问题 I have an app that has a custom Image Picker that uses the ALAssetLibrary to create an Album picker and image picker. We've implemented a custom picker in order for our customers to select multiple images. This image picker works great under iOS 7 and shows the "Camera Roll" album with ALL the user's photos. However, when running the same app under iOS 8, it seems that Apple has removed the "Camera Roll" album from the Albums view and only shows "Recent Photos". From what I can see, the only

How to delete the last photo in Swift iOS8?

末鹿安然 提交于 2019-12-04 05:22:33
问题 I try to get the last photo from camera roll and delete it.Now I get the last photo but have problems in deleting the last photo. I tried this way but I delete all photos,so I plan to build a new PHFetchResult which only include the last photo but I don't know how to do that. PHPhotoLibrary.sharedPhotoLibrary().performChanges( { PHAssetChangeRequest.deleteAssets(fetchResult)}, completionHandler: { success, error in NSLog("Finished deleting asset. %@", (success ? "Success" : error)) }) Thank

ios 8, how to get all photos using ALAssetLibrary to replace the missing camera roll album

倾然丶 夕夏残阳落幕 提交于 2019-12-03 05:42:49
I have an app that has a custom Image Picker that uses the ALAssetLibrary to create an Album picker and image picker. We've implemented a custom picker in order for our customers to select multiple images. This image picker works great under iOS 7 and shows the "Camera Roll" album with ALL the user's photos. However, when running the same app under iOS 8, it seems that Apple has removed the "Camera Roll" album from the Albums view and only shows "Recent Photos". From what I can see, the only way to access all photos in iOS 8 is through the Collection view (in the Photos app or the new built-in

How to delete the last photo in Swift iOS8?

你离开我真会死。 提交于 2019-12-02 07:15:21
I try to get the last photo from camera roll and delete it.Now I get the last photo but have problems in deleting the last photo. I tried this way but I delete all photos,so I plan to build a new PHFetchResult which only include the last photo but I don't know how to do that. PHPhotoLibrary.sharedPhotoLibrary().performChanges( { PHAssetChangeRequest.deleteAssets(fetchResult)}, completionHandler: { success, error in NSLog("Finished deleting asset. %@", (success ? "Success" : error)) }) Thank all of you to answer my question! I guess the problem lies in your fetchResult . You will have to pass

iOS - open photo from photo album in my app

浪尽此生 提交于 2019-12-02 03:32:43
问题 I would like to let users browse photos in their photo albums, tap the action button, and share/open selected photos in my app. Some apps (like Viber and WeChat) provide a custom view to handle this. This is the WeChat screen: What is the name of this feature and which class do I have to use to achieve this behavior? 回答1: You need to do check for share option in the ioS extensions app extensions extension programming guide Share extension Example from Tumbler developer team 回答2: You can use