Inspiration

Transferring files from a computer to a mobile device wirelessly is a fairly common day-to-day need for me. The existing options for transferring files from my Mac to my iPhone (Email, Dropbox, AirDrop, etc.) either require too much user intervention and configuration, or are too unreliable for me to enjoy using. I set out to build Ares as a way to simplify this user experience as much as possible and allow for fast file transfers with no additional setup or configuration (except for the initial install of the Ares apps, creating an account, etc.).

What it does

Ares greatly simplifies the process of transferring a file from your Mac to your iOS device.

Steps:

  1. Drag a file to the Ares menu bar icon on your Mac
  2. Slide the push notification that appears on your iPhone
  3. There is no step three.

How I built it

Ares Architecture

I built 3 applications:

  • Native Mac application written in Swift. Shows a menu bar icon that a user drags and drop files on, which results in an API call to the Ares back-end that sends a push notification payload to be delivered to the iOS device. The Mac app also handles requests for file transfers and transfers file data to the iOS device.
  • Native iOS application written in Swift. Handles push notifications that are received from the Ares backend, requests file data from the Mac, and presents the downloaded file to the user.
  • Backend written in JavaScript using Node.js. Handles user and device registration and authentication and sending push notification payloads to the APNS gateway for delivery to iOS devices. The back-end is hosted on Heroku and uses a MongoDB database hosted on MongoLab.

Challenges I ran into

Debugging this project was really difficult because there are so many communication links over several protocols where things can go wrong: Mac app -> Ares back-end -> APNS gateway -> iOS device -> Mac -> iOS device. There was lots of log reading and recompiling/redeploying involved.

Simultaneously developing 3 applications that work closely with each other was also challenging. There was lots of context switching involved in continuously jumping between developing for iOS, Mac, and the server.

Accomplishments that I'm proud of

Building 3 applications in under 24 hours by myself is something that I'm proud of, especially since several of the core technologies I used were new to me.

What I learned

  • How to use MongoDB
  • How to set up and use APNS (Apple Push Notification Service) on both the iOS side and the back-end
  • How to use the MultipeerConnectivity framework for P2P communication on OS X and iOS

What's next for Ares

  • Bidirectional file transfer: iOS -> Mac transfers in addition to the Mac -> iOS transfer implemented currently
  • A full file manager in the iOS app that lets you view and catalogue files that were previously downloaded over Ares
  • Multiple simultaneous file transfers
  • Better security in verifying origins and the integrity of delivered payloads
  • Fallback to uploading files to a storage server when P2P communication is not available
  • iOS action extension for sending content from 3rd party apps via Ares
Share this project:

Updates