Initial commit
diff --git a/osx/sparkle-auto-update.mm b/osx/sparkle-auto-update.mm
new file mode 100644
index 0000000..a1dc5c0
--- /dev/null
+++ b/osx/sparkle-auto-update.mm
@@ -0,0 +1,42 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
+/*
+ * @copyright See LICENCE for copyright and license information.
+ *
+ * @author Zhenkai Zhu <zhenkai@cs.ucla.edu>
+ * @author Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ */
+
+#include "sparkle-auto-update.h"
+
+#import <Foundation/Foundation.h>
+#import <AppKit/AppKit.h>
+#import <Sparkle/Sparkle.h>
+
+class SparkleAutoUpdate::Private
+{
+public:
+  SUUpdater *updater;
+};
+
+SparkleAutoUpdate::SparkleAutoUpdate(const char *updateUrl)
+{
+  d = new Private;
+  d->updater = [[SUUpdater sharedUpdater] retain];
+  NSURL *url = [NSURL URLWithString: [NSString stringWithCString:updateUrl encoding:NSASCIIStringEncoding]];
+  [d->updater setFeedURL: url];
+  [d->updater setAutomaticallyChecksForUpdates: YES];
+  [d->updater setUpdateCheckInterval: 86400];
+}
+
+SparkleAutoUpdate::~SparkleAutoUpdate()
+{
+  [d->updater release];
+  delete d;
+  // presummably SUUpdater handles garbage collection
+}
+
+void SparkleAutoUpdate::checkForUpdates()
+{
+  //[d->updater checkForUpdatesInBackground];
+  [d->updater checkForUpdates : nil];
+}