richhomiekwam richhomiekwam - 1 year ago 68
Swift Question

I need advice on creating an app for uploading training videos

I just got myself into iOS mobile development. I am creating an iOS app that allows athletes to access in-depth training videos for most sports and network with each other. I've already created the login and register UI for the product. What functionalities do you think I need to consider in order for me to create the video based and the social networking part of the app. What backend do you think is best for this project and how long do you think it would take to get it up and running?

Thanks in advance.

Answer Source

Backend Php will be better to use To post a video you need simple UI having browse or capture video features func createRequest (videoname : String!) -> NSURLRequest {

    print("Path of video upload is:\(videoname)")

    let param = [
        "key" : "\(self.key)",
        "secret" : "\( self.secret)",
        "package_name" : p_name,
        "video" :"\(videoname)"
    let boundary = generateBoundaryString()
    let url = NSURL(string: Constants.URL_AppFileUpload)!
    let request = NSMutableURLRequest(URL: url)
    request.HTTPMethod = "POST"
    request.setValue("multipart/form-data; boundary=\(boundary)", forHTTPHeaderField: "Content-Type")

    //request.HTTPBody = createBodyWithParameters(param, filePathKey:"video",paths:[videoname], boundary: boundary)
    request.HTTPBody = createBodyWithBoundary(boundary, parameters: param, paths: [videoname], fieldName: "video")
    request.timeoutInterval = 120.0

    return request

You can post video using multipart form data format as given in above example

you can use this packages to use video features in iOS: import Foundation import AVKit import AssetsLibrary import AVFoundation

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download