<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Max Weisel &#187; Uncategorized</title>
	<atom:link href="http://maxweisel.com/blog/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://maxweisel.com/blog</link>
	<description></description>
	<lastBuildDate>Tue, 24 Aug 2010 07:13:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>iOSDevCamp2010 Hackathon: iOS USB Sync</title>
		<link>http://maxweisel.com/blog/iosdevcamp2010-hackathon-ios-usb-sync/</link>
		<comments>http://maxweisel.com/blog/iosdevcamp2010-hackathon-ios-usb-sync/#comments</comments>
		<pubDate>Tue, 24 Aug 2010 07:07:49 +0000</pubDate>
		<dc:creator>Max</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://maxweisel.com/blog/?p=232</guid>
		<description><![CDATA[To start off, this was my first iOSDevCamp and by far it has proven to be my favorite developer event so far. The rules are simple, your app cannot be in the app store unless it&#8217;s open source, and it cannot use private apis or require a jailbroken device. Prior to iOSDevCamp, I had been [...]]]></description>
			<content:encoded><![CDATA[<p>To start off, this was my first iOSDevCamp and by far it has proven to be my favorite developer event so far. The rules are simple, your app cannot be in the app store unless it&#8217;s open source, and it cannot use private apis or require a jailbroken device.</p>
<p>Prior to iOSDevCamp, I had been looking into Hector Martin&#8217;s usbmux implementation for linux. The main goal of his project was to provide usb syncing for iOS devices on linux machines. Upon further investigation, I found usbmux sets up a local socket that relays information to an Apple daemon running on the iOS device. This daemon then relays the information via tcp to other daemons on the device. In short, usbmux allows applications on the desktop to talk to tcp-based servers running on the device without using private APIs or modifications to the OS, all over usb.</p>
<p>My hackathon demo was fairly straight-forward.<br />
1. Make an iPhone app that listens on a predetermined tcp port.<br />
2. Make a Mac app that uses usbmux to talk to the iPhone app tcp server.</p>
<p>Side Note: The mac app can also choose to talk to the iPhone app via wifi without any modification to the iPhone app. Which is beautiful. If Apple comes along and breaks usbmux or adds in protections for app store apps, the mac app can fallback to talking to the device over wifi with no modification to the iPhone app.</p>
<p>Ideally, the mac application would talk directly to the unix domain socket /var/run/usbmuxd. However, due to lack of time from working on other hackathon projects, I took a shortcut. Hector Martin&#8217;s <a href="http://git.marcansoft.com/?p=usbmuxd.git" target="_blank">usbmuxd source code repo</a> contains a wonderful python utility called tcprelay. Tcprelay forwards any port on the local machine to any port on an iOS device using usbmux. For the demo, I&#8217;ve set this up to relay port 20000 on my local machine to my iOS device where my iPhone app is listening.</p>
<p>My client/server setup is using serialized plists to transfer information. The first 32 bits are the size of the data to be received.</p>
<p>To get the demo up and running:<br />
1. Compile Server/Server2 and place it on your iOS device.<br />
2. run &#8220;$ ./tcprelay -t 20000:20000&#8243; to relay local port 20000 to remote port 20000 via usbmux.<br />
3. Start up Server/Server2<br />
4. Start the corresponding MacUSBSyncClient. (The server _must_ be running before you start the mac client)</p>
<p>MacUSBSyncClient/Server will send a string and an image for display on the device. Due to my horrible unix socket implementation, the images must be <1mb. MacUSBSyncClient2/Server2 requests the most recent barcode scan from the iPhone. The iPhone server will constantly be checking for bar codes via the camera preview. Upon a successful scan, it saves the barcode image and data. Pressing "Scan" in the client will grab this information from the iPhone and display it on the mac. The product can then be looked up via the "Lookup" button.</p>
<p>I'm working on a much cleaner implementation that I'll be posting asap. It will talk directly to /var/run/usbmuxd instead of requiring tcprelay. However, for those interested, here is the source code I used in the demo at iOSDevCamp2010. Please note it was written in less than a day and is _extremely_ ugly.</p>
<p><a href='http://maxweisel.com/blog/wp-content/uploads/2010/08/iOS-USB-Sync-Demo.zip'>iOS USB Sync Demo</a></p>
<p>For those interested in integrating this into their application. Shoot me an email Max@MaxWeisel.com, I&#8217;d love to help!</p>
<p>Max</p>
]]></content:encoded>
			<wfw:commentRss>http://maxweisel.com/blog/iosdevcamp2010-hackathon-ios-usb-sync/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MiTube Short Lived</title>
		<link>http://maxweisel.com/blog/mitube-short-lived/</link>
		<comments>http://maxweisel.com/blog/mitube-short-lived/#comments</comments>
		<pubDate>Wed, 04 Aug 2010 22:06:50 +0000</pubDate>
		<dc:creator>Max</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://maxweisel.com/blog/?p=224</guid>
		<description><![CDATA[I just received a call from Apple Legal. MiTube will be taken out of the App Store within the hour. It&#8217;s currently 33 in top free apps! All in less than 24 hours. UPDATE: MiTube is officially down. Top 7 in less than 24 hours!]]></description>
			<content:encoded><![CDATA[<p>I just received a call from Apple Legal. MiTube will be taken out of the App Store within the hour. It&#8217;s currently 33 in top free apps! All in less than 24 hours.</p>
<p>UPDATE: MiTube is officially down. Top 7 in less than 24 hours!</p>
]]></content:encoded>
			<wfw:commentRss>http://maxweisel.com/blog/mitube-short-lived/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
	</channel>
</rss>
