email a video in iOS - ios

I have an app that records a video and saves it straight to the photo library on the iPhone. I want to, as soon as the user finishes recording, have the app open up in mail, with the video attached. How should I go about doing this?
I am using this basic idea: http://blog.mugunthkumar.com/coding/iphone-tutorial-in-app-email/
How do I get the file path for the video?

You could either store the video in your app and then attach that into the email before copying it to the photo library or show the user their photo library in the app via UIImagePicker - This may help or just google it ...
http://developer.apple.com/library/ios/#samplecode/MyImagePicker/Introduction/Intro.html#//apple_ref/doc/uid/DTS40010135

Related

How to handle file upload in WKWebview?

I am displaying a html page using WKWebview in Swift 5. I have an option to upload image using input file tag. When I run the app and click on upload, it prompts to select Photo library or Camera. If I select camera, app crashes since the app doesn't have permission.
How to remove camera option or properly request the permission when the user select camera?
I am not sure but you can just set key Privacy - Camera Usage Description in info.plist file with description. Web view will manage for permission and it will work. Please check and let me know if work for you.

Is there a possibility to save a video to the gallery when the camera is called with a <input type="file">?

I'm trying to build a hybrid iPhone app that makes use of the html-tag for video uploads.
Camera opens when the input is clicked, users can record video and upload works fine.
I'm quite new into swift and iOS-development, therefore my question:
How can I address the video inside the native app part, to additionally store it on the phone inside the gallery? Is this possible?
You should use accept="video/mp4,video/x-m4v,video/*"
MIMEType webkit

GameCenter get GKPlayer photo URL

How can I access the GameCenter player's photo URL? I know about loadPhotoForSize but it seems to return UIImage. I need the URL as I would like to send this URL to my backend and show this photo for users from non-iOS devices.
There is no available GameCenter player's photo URL. It may exist right now, but Apple can change it any moment. And it is not in open access.
Correct way to show player's photo on another non-iOS platforms is to upload this photo to your game servers. Use loadPhotoForSize to obtain UIImage and than upload it to your server. For example you can use answers from here: ios Upload Image and Text using HTTP POST

How to open album list like photos native application?

As i saw this in "Viber" application. There is media sharing button which opens all the albums as shown in photos native application. Can we do this ? I found UIImagePickerController cannot shows both simultaneously. How show both photo gallery and video gallery simultaneously ?
You're right about UIImagePickerController here great guide, and github project for picking media.
If you want to share your media here's some cool examples:
Check this tutorial on how to share pictures via email.
If you want to share via mail -
First of all you have to Create NSData object from your PNG/JPEG image data and then implement the method: Send addAttachmentData:mimeType:filename: to your MFMailComposeViewController instance.
Also i think the best thing to use in your case to share stuff like text, pictures etc is Sharekit.

How can I show last saved photo in Photos app iOS via "photos-redirect:" URL scheme?

When I use photos-redirect:// URL scheme it just starts Photos app.
How can I start Photos app with showing custom photo, for example, last saved?
I can't find any examples, where used photos-redirect:// URL scheme.
photos-redirect:// is the URL Scheme for Photo App. However, it is undocumented, thus you shouldn't use it.
To view / select a photo, use UIImagePickerController .

Resources