CocoaPods trunk is moving to be read-only. Read more on the blog, there are 12 months to go.

FFile 0.1.10

FFile 0.1.10

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Sep 2016

Maintained by Muqq.



 
Depends on:
AWSCore= 2.4.7
AWSS3= 2.4.7
SPTPersistentCache>= 0
 

FFile 0.1.10

  • By
  • Muqq

Requirements

iOS >= 8.0

Installation

FFile is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "FFile"

Getting Started

FFile.setup("<Your AWS identity pool Id>",
 s3URL: "<AWS Region URL>",
 s3Bucket: "<AWS bucket>", 
 s3Region: "<Your AWS bucket region>" 

Description

Save file

  • Save to S3
let file = FFile(name: "example", data: data, fileExtension: "png")
file.saveInBackgroundWithBlock { success, error in
    if success {
        //Do something if success
    } else {
        // handle error
    }
}
  • After saved to S3, upload the file reference with your data to firebase
//get your objectId and save it to anywhere
file.objectId

Get data

//use objectId to get your file
let file = FFile(objectId: objectId)
file.getDataInBackgroundWithBlock { data, error in
    if error {
        // handle error
    } else {
        // use your data
    }
}

Author

muqq, [email protected]

License

FFile is available under the MIT license. See the LICENSE file for more info.