Write a Swift 2.0 module that compares a local folder on your computer with the content of an AWS S3 bucket. The local-S3 comparison has to check for changes that has occurred remotely (e.g. uploads from a different computer not present locally) in the S3 bucket since lastSyncDate (a date) of the S3 object and changes that has occurred locally in the folder since lastSyncDate. You can assume that the lastSyncDate will be stored between syncs between S3 and local folder and can be used to avoid looping over all local folders and all remote (S3) files. We will also need to store the actual last modified date of the file using S3 meta data.
A requirement for the Swift code is that it is fast and reliable (with error checking), limits the calls to S3 to limit cost, makes sure all files in the local folder are synced regardless how many files are present in the folder, and that the code is well documented.
You will have to use the AWS SDK for iOS as the library for interacting with AWS S3 (no UI coding necessary - assume the user has provided IAM): [login to view URL]
A few test cases (XCTests) has to accompany the code.