0

So I'm currently working on a data-transfer app. The approach that I have working right now is, I'm using sockets to transfer files and my question was specifically in regards to video files. So right now, I basically right the video that is being received to a temporary file in memory and I then save from there to the file system (the album using the UIImageWriteToSavedPhotosAlbum method). Now my question is, Is there a good way/approach to actually just save the video file as it is being received directly to photo album (streaming it in a sense)? I'd appreciate any insight and especially any links/example of something like this being done.

Thanks!

David West
  • 552
  • 2
  • 9
  • 21
  • You can't do so. iOS does not support partial content to be saved in Album. – Raptor Feb 02 '16 at 02:33
  • Can you please share a source specifying/confirming this? – David West Feb 02 '16 at 02:34
  • Hard to search for a source talking about a unsupported feature in iOS. However, my advice is to fetch the video (**not streaming**) within your app, using Background Transfer Service (BTS). Once complete, ask the user to save the video to Album. Most apps use this way to do so. – Raptor Feb 02 '16 at 02:36
  • Hmm, I see. So, the concept of the app doesn't really allow for something like that in the sense that the app is designed to allow users to switch between phones so the amount of data that they will be transferring will potentially be hundreds of videos, etc. So, in that sense, asking the user to save the video to the album for each video is not an option. What would you say the main difference is between using BTS and sockets? – David West Feb 02 '16 at 02:53
  • Nope. Apple respects their phone users. Therefore before saving anything to the album, the content must be complete (no corrupted data), and require asking the user. – Raptor Feb 02 '16 at 03:19
  • Could you explain a little further about the mechanics of BTS? Does it also first save the file temporarily in memory and then save it to the file system? – David West Feb 02 '16 at 05:02
  • Google "Apple BTS" . – Raptor Feb 02 '16 at 05:53
  • Hmm, this isn't an option for me, since I need to do the data transfer via TCP sockets, not HTTPS/URL SESSIONS. Any other suggestions? – David West Feb 02 '16 at 14:53

0 Answers0