<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description></description><title>chpwn blog</title><generator>Tumblr (3.0; @chpwn)</generator><link>http://blog.chpwn.com/</link><item><title>iOS 5 Status</title><description>&lt;p&gt;Here&amp;#8217;s the status of all my stuff on iOS 5 (all versions: iOS 5.0, 5.0.1, 5.1 and 5.1.1). If you haven&amp;#8217;t heard of any of these before and want to check them out: search in Cydia, they&amp;#8217;ll all show up. Feel free to send me a support email from Cydia if you have any issues or questions, for paid products I try and respond within a few hours if I&amp;#8217;m not sleeping.&lt;/p&gt;

&lt;p&gt;I&amp;#8217;m going to keep this post updated for all the latest status updates to each of them, so be sure to check back here.&lt;/p&gt;

&lt;h2&gt;Paid Extensions&lt;/h2&gt;

&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Zephyr&lt;/strong&gt;: &lt;em&gt;Full iOS 5 support.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Gridlock&lt;/strong&gt;: &lt;em&gt;Full iOS 5 support.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;VoiceActivator&lt;/strong&gt;: &lt;em&gt;Full iOS 5 support.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Infinidock&lt;/strong&gt;: &lt;em&gt;Full iOS 5 support.&lt;/em&gt; (As of version 1.8, available now in Cydia!)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Infinifolders&lt;/strong&gt;: &lt;em&gt;Full iOS 5 support.&lt;/em&gt; (As of version 1.4, available now in Cydia!)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Infiniboard&lt;/strong&gt;: &lt;em&gt;Full iOS 5 support.&lt;/em&gt; (As of version 1.8, available now in Cydia!)&lt;/li&gt;
&lt;/ul&gt;&lt;h2&gt;Free Extensions&lt;/h2&gt;

&lt;ul&gt;&lt;li&gt;&lt;strong&gt;IconSupport&lt;/strong&gt;: &lt;em&gt;Full iOS 5 support.&lt;/em&gt; (Via @ashikase, who did the iOS 5 work: thanks!)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AppSlide&lt;/strong&gt;: &lt;em&gt;Full iOS 5 support.&lt;/em&gt; (As of version 1.1, now available in Cydia!)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;MobileVolumeSound&lt;/strong&gt;: &lt;em&gt;Full iOS 5 support.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Internalizer&lt;/strong&gt;: &lt;em&gt;Full iOS 5 support.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Five Icon Switcher&lt;/strong&gt;: &lt;em&gt;Full iOS 5 support.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Webscrollian&lt;/strong&gt;: &lt;em&gt;Full iOS 5 support.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;No Page Dots&lt;/strong&gt;: &lt;em&gt;Full iOS 5 support.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;No Bookmarks&lt;/strong&gt;: &lt;em&gt;Full iOS 5 support.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Full WebClips&lt;/strong&gt;: &lt;em&gt;Full iOS 5 support.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;No Folder Badges&lt;/strong&gt;: &lt;em&gt;Full iOS 5 support.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Spire&lt;/strong&gt;: &lt;em&gt;Supports iOS 5.0 and 5.0.1, but not iOS 5.1 or 5.1.1.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Empty Folder Icons&lt;/strong&gt;: &lt;em&gt;Unknown.&lt;/em&gt; Let me know?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Colloquy Tab Complete&lt;/strong&gt;: &lt;em&gt;Unknown.&lt;/em&gt; Let me know?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Covert&lt;/strong&gt;: Does not work, but similar functionality is included in iOS 5.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;ListLauncher&lt;/strong&gt;: Does not work.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Switcherscape&lt;/strong&gt;: Does not work.&lt;/li&gt;
&lt;/ul&gt;</description><link>http://blog.chpwn.com/post/11543429806</link><guid>http://blog.chpwn.com/post/11543429806</guid><pubDate>Fri, 25 May 2012 11:38:23 -0400</pubDate></item><item><title>HTC One X</title><description>&lt;p&gt;Since it was released on AT&amp;amp;T this weekend, I was able to try it out at a store today. I only played with it for a few minutes, but here&amp;#8217;s what I thought:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;It&amp;#8217;s smaller than you think. Definitely still a big phone, but it&amp;#8217;s thin, and doesn&amp;#8217;t feel huge (like the Galaxy Note).&lt;/li&gt;
&lt;li&gt;The screen is great. It doesn&amp;#8217;t have the awful PenTile that Samsung still ruins their high-end phones with, and the density is as good as I want. Probably the best non-iPhone screen I&amp;#8217;ve seen yet.&lt;/li&gt;
&lt;li&gt;It&amp;#8217;s fast. Definitely the fastest phone I&amp;#8217;ve tried so far. And unlike every other Android phone I&amp;#8217;ve used, it can scroll a list smoothly. (About as smooth as a single-core Windows Phone or iPhone. And the physics still suck. Sigh.)&lt;/li&gt;
&lt;li&gt;HTC Sense is awful. I&amp;#8217;m not a huge fan of Android 4.0, and I think it needs a lot of work, but it&amp;#8217;s miles better than the crap HTC added here.&lt;/li&gt;
&lt;li&gt;The hardware is solid. Not quite as solid as the Nokia Lumia 800 or 900 or the iPhone 4/4S, but definitely better than the Samsung phones.&lt;/li&gt;
&lt;li&gt;The glossy case on the white model is suboptimal, and the dark gray model doesn&amp;#8217;t look nearly as good. I&amp;#8217;d love a matte white model, but HTC apparently decided against it.&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Overall, this is the best Android hardware I&amp;#8217;ve tried, but the software is even worse than the Galaxy Nexus&amp;#8217; stock Android. The Galaxy S III looks even worse: more awful skin and the usual ugly, creaky Samsung hardware.&lt;/p&gt;

&lt;p&gt;Will there ever be an Android phone with hardware and software that anyone would actually want to buy?&lt;/p&gt;</description><link>http://blog.chpwn.com/post/22602061282</link><guid>http://blog.chpwn.com/post/22602061282</guid><pubDate>Mon, 07 May 2012 16:07:33 -0400</pubDate></item><item><title>How to test your app on older iOS releases</title><description>&lt;p&gt;In this week&amp;#8217;s &lt;a href="http://5by5.tv/buildanalyze/69"&gt;Build and Analyze&lt;/a&gt;, Marco Arment talks about supporting older iOS versions in &lt;a href="http://instapaper.com"&gt;Instapaper&lt;/a&gt;. As he says, being able to test your app on those versions is not easy, and just getting a device to run a specific iOS release can need &amp;#8220;hacky jailbreak tools&amp;#8221; or can even be impossible. Since I spend my time with those (admittedly hacky and confusing) tools and have an understanding of how the restrictions here work, I thought I&amp;#8217;d write an explanation and a guide on how to successfully test for older iOS releases.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Background&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Originally, there weren&amp;#8217;t any issues with running any iOS release on your device. You just download the firmware (&lt;code&gt;ipsw&lt;/code&gt;) file, open up iTunes, and &lt;a href="http://iphoners.org/alt_option-restore.itunes/"&gt;restore with it&lt;/a&gt;. This method worked through iPhone OS 2.0, the iPhone 3G, and the second generation iPod touch.&lt;/p&gt;

&lt;p&gt;However, with the iPhone 3GS, Apple &lt;a href="http://www.saurik.com/id/12"&gt;changed everything&lt;/a&gt;. On that device (as well as the iPod touch (third generation), the original iPad, and the iPhone 4), each and every firmware change must be approved by Apple&amp;#8217;s servers, &lt;em&gt;at the time of the install&lt;/em&gt;. And Apple will only agree to let you install the current latest release of iOS &lt;em&gt;at that time&lt;/em&gt;, so to would prevent downgrading — as well as any re-installs of the iOS release the device is running, as long as that release is not the absolute current version available.&lt;/p&gt;

&lt;p&gt;The iPad 2, iPhone 4S, and iPad (third generation) all use similar methods, with additional security measures. (I&amp;#8217;ll talk about those later.) In addition, with iOS 4, similar protections were added to the iPhone 3G and iPod touch (second generation). While those devices can still be easily restored to pre-iOS 4 releases, it&amp;#8217;s no longer easily possible to restore them to iOS 4.0 or iOS 4.1.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why It&amp;#8217;s Important&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;What Apple has done here, essentially, is sacrifice the ability for developers to test code on older versions of iOS, for the sake of increased control of how we use our devices.  It&amp;#8217;s hard to see a benefit: if someone is knowledgeable to downgrade a device, they probably also have a good reason to.&lt;/p&gt;

&lt;p&gt;It&amp;#8217;s unclear that Apple realizes what this does to developers. Xcode, even, doesn&amp;#8217;t realize that this happens at all: the Organizer still has a file picker and version selector under &amp;#8220;Restore&amp;#8221;, oblivious to the fact that this option no longer, in fact, works (and hasn&amp;#8217;t for almost three years). The enterprise iPhone Configuration Utility and education Apple Configuration tool are similarly confused.&lt;/p&gt;

&lt;p&gt;A good, simple solution would be for Apple to simply allow devices registered for development to install older iOS releases, just as they are allowed to install betas. To encourage Apple to fix this problem for developers, please &lt;a href="http://openradar.appspot.com/radar?id=1613401"&gt;dupe my radar&lt;/a&gt; and help call attention to it. Thanks!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What To Do&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Often, even if Apple doesn&amp;#8217;t support it, you still do need to ensure your code runs on older iOS releases. Since you can&amp;#8217;t trivially restore your device to an older version, I&amp;#8217;ve made a list of the possible workarounds:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Use the Simulator&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is definitely the easiest method. Rather than testing your app on a device, you just use the iOS Simulator to test it on that version. While Xcode itself only is bundled with the simulators for the latest two iOS releases, it&amp;#8217;s pretty easy to import older ones: just drag the SDK bundle (&lt;code&gt;iPhoneSimulatorX.Y.sdk&lt;/code&gt;) into the &lt;code&gt;iPhoneSimulator.platform/Developer/SDKs&lt;/code&gt; folder. If you didn&amp;#8217;t keep around copies of the older SDK, they are very findable online. &lt;em&gt;Update:&lt;/em&gt; for registered iOS developers, you can apparently find old versions of Xcode you can extract the SDKs from available on &lt;a href="https://developer.apple.com/downloads/"&gt;Apple&amp;#8217;s developer download page&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Save Devices&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The easier method, although the most expensive, is to simply begin a collection of devices running various iOS releases. Most developers I&amp;#8217;ve talked to take this route, but it&amp;#8217;s hard to enter. First, it&amp;#8217;s expensive to buy all the iOS devices necessary to test each release. Secondly, it&amp;#8217;s quite difficult to obtain a complete spread of iOS releases to test on. Since downgrading is blocked, you have to purchase these devices still running older releases — something that gets harder every day, as more older devices break and get replaced.&lt;/p&gt;

&lt;p&gt;And, once you have the devices, you have to be very careful to never break them — or to accidentally accept the endless stream of update prompts from iTunes. Remember: even if you just need to restore the device to the &lt;em&gt;same&lt;/em&gt; older version of iOS as is already on the device, Apple doesn&amp;#8217;t even allow that. So be very sure that they never get messed up.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Evading SHSH&lt;/strong&gt; (the &amp;#8220;hacky jailbreak tools&amp;#8221; method)&lt;/p&gt;

&lt;p&gt;When Apple accepts your request to restore a device, they give back a cryptographic agreement to allow it, called an &amp;#8220;&lt;a href="http://en.wikipedia.org/wiki/SHSH_blob"&gt;SHSH blob&lt;/a&gt;&amp;#8221;. In the iPhone 3GS, iPhone 4, original iPad, and iPod touch (third generation), however, Apple forgot to include one crucial piece of data in these signed blobs: a time range of when that acceptance was valid for. Using that mistake, Jay Freeman (saurik) developed a &lt;a href="http://www.saurik.com/id/12"&gt;massive MITM attack&lt;/a&gt;: storing the authorized responses for millions of device/firmware combinations, and replaying them to restore the device on demand.&lt;/p&gt;

&lt;p&gt;If did happen to store your &amp;#8220;SHSH blobs&amp;#8221; for a specific iOS version with the Cydia server for one of these devices when Apple was still signing that release (most jailbroken users probably did), you need to do some tricks to use the saved response.&lt;/p&gt;

&lt;p&gt;The tools for this are &lt;a href="http://thefirmwareumbrella.blogspot.com/"&gt;TinyUmbrella&lt;/a&gt; and &lt;a href="http://blog.iphone-dev.org"&gt;redsn0w&lt;/a&gt;. First, use TinyUmbrella to download the SHSH files saved for your device. (Be sure to have &amp;#8220;Request from Cydia&amp;#8221; checked so it asks Cydia&amp;#8217;s server, rather than Apple, for the saved blobs.) Then, &lt;a href="http://www.idownloadblog.com/2011/09/27/stitch-shsh-blobs-redsn0w-downgrade-firmware/"&gt;use redsn0w&lt;/a&gt; to create an IPSW you can restore in iTunes.&lt;/p&gt;

&lt;p&gt;To save SHSH blobs for the future, also use TinyUmbrella, just have it ask Apple (uncheck &amp;#8220;Request from Cydia&amp;#8221;). If you didn&amp;#8217;t manage to save this data but do have one of these devices on an older iOS release but want to extract the data for the version it is running, it is actually possible to do so. Use redsn0w and choose &amp;#8220;Fetch&amp;#8221; to copy the blobs off the device.&lt;/p&gt;

&lt;p&gt;Unfortunately, this loophole was essentially fixed in the iPad 2, iPad (third generation), and the iPhone 4S. (It may still be possible with GSM and Wi-Fi only models of the iPad 2, but don&amp;#8217;t rely on it.)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;Apple, please help!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The only way for this issue to be truly resolved for developers is for Apple to create a supported method to downgrade devices to test apps. While the iOS 5 over-the-air updates do appear to increase update penetration and speed, it&amp;#8217;s simply not possible for many apps to only be available (or, worse: only tested) on the very latest version of iOS.&lt;/p&gt;

&lt;p&gt;Right now, it does not seem likely that Apple will change anything here, so we are stuck with the workarounds above. However, there&amp;#8217;s a chance that they will, and more people letting them know it&amp;#8217;s an issue can only help.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Let me know if you know of any other workarounds or things I missed: I&amp;#8217;m on Twitter as &lt;a href="http://chpwn.com/twitter"&gt;@chpwn&lt;/a&gt;, or you can email me at &lt;a href="mailto:chpwn@chpwn.com"&gt;chpwn@chpwn.com&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;</description><link>http://blog.chpwn.com/post/19662817128</link><guid>http://blog.chpwn.com/post/19662817128</guid><pubDate>Thu, 22 Mar 2012 14:54:00 -0400</pubDate></item><item><title>Page Turning</title><description>&lt;p&gt;This is how you turn the page of a book:&lt;/p&gt;

&lt;iframe width="560" height="315" src="https://www.youtube.com/embed/ub9c8j5a1Wk?rel=0" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;

&lt;p&gt;&lt;br/&gt;&lt;/p&gt;

&lt;p&gt;This is how Apple&amp;#8217;s iBooks turns the pages of a book:&lt;/p&gt;

&lt;iframe width="560" height="315" src="https://www.youtube.com/embed/jcY4Ee1jUw8?rel=0" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;

&lt;p&gt;&lt;br/&gt;&lt;/p&gt;

&lt;p&gt;This is &lt;em&gt;not&lt;/em&gt; how you turn the page of a book:&lt;/p&gt;

&lt;iframe width="560" height="315" src="https://www.youtube.com/embed/J6s_8WFSlf4?rel=0" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;

&lt;p&gt;&lt;br/&gt;&lt;/p&gt;

&lt;p&gt;This is how Google Boo— oops, sorry, &lt;a href="http://googleblog.blogspot.com/2012/03/introducing-google-play-all-your.html"&gt;Google &lt;em&gt;Play&lt;/em&gt; Books&lt;/a&gt; — turns the pages of a book:&lt;/p&gt;

&lt;iframe width="560" height="315" src="https://www.youtube.com/embed/gOJ15ysPsRo?rel=0" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;

&lt;p&gt;&lt;br/&gt;&lt;/p&gt;

&lt;p&gt;This is a good example of how Google manages to only make it around 70% of the way to a good UI. They often get the basic idea right, but the details (like, for instance, &amp;#8220;does anyone actually turn a book this way?&amp;#8221;) slip through, and it shows.&lt;/p&gt;

&lt;p&gt;It&amp;#8217;s why I&amp;#8217;ve ditched the new Gmail web UI for &lt;a href="http://sparrowmailapp.com/"&gt;Sparrow&lt;/a&gt;, even though it&amp;#8217;s missing many features I liked and actually runs worse on my laptop. And it&amp;#8217;s why I&amp;#8217;ve recently switched my browser to (&lt;em&gt;gasp&lt;/em&gt;) Safari: after a year from the first betas of OS X Lion, it still only had &amp;#8220;most&amp;#8221; of what you would want from a full Lion-ready browser.&lt;/p&gt;

&lt;p&gt;I certainly hope Google finds a way to solve this issue. Most of their products are ahead of the competition in other respects, and I&amp;#8217;d love to use them. But if Google still can&amp;#8217;t make it all the way, even with a &lt;a href="http://googleblog.blogspot.com/2011/06/evolving-google-design-and-experience.html"&gt;new focus on design&lt;/a&gt;, I&amp;#8217;m not going to shove an inferior experience on myself.&lt;/p&gt;

&lt;p&gt;See also: &lt;a href="http://icspapercuts.tumblr.com"&gt;ICS Paper Cuts&lt;/a&gt;.&lt;/p&gt;</description><link>http://blog.chpwn.com/post/18894491526</link><guid>http://blog.chpwn.com/post/18894491526</guid><pubDate>Wed, 07 Mar 2012 03:02:00 -0500</pubDate></item><item><title>Ski Trip to iOS 3.1.2</title><description>&lt;p&gt;Last weekend, I went skiing at &lt;a href="http://northstarattahoe.com/"&gt;Northstar&lt;/a&gt; — the &lt;a href="http://theiphonewiki.com/wiki/index.php?title=Northstar_7D11_(iPhone)"&gt;codename&lt;/a&gt; of iOS 3.1. (Each iOS release is &lt;a href="http://theiphonewiki.com/wiki/index.php?title=Firmware"&gt;codenamed&lt;/a&gt; after a ski resort, usually in Tahoe or Colorado.) I don&amp;#8217;t have anything to match comex&amp;#8217;s awesome &lt;a href="http://i.imgur.com/unvD7.png"&gt;PDF slope&lt;/a&gt; slope from JailbreakMe 3.0, but it wasn&amp;#8217;t all bad:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://i.imgur.com/TdbKJ.jpg"&gt;&lt;img alt="Springboard ski slope" src="http://i.imgur.com/TdbKJ.jpg" width="400"/&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;SpringBoard was there, right near the top of the mountain. Also, there was a new lodge this year, to go with one of my new tweaks:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://i.imgur.com/koerZ.jpg"&gt;&lt;img alt="Zephyr Lodge" src="http://i.imgur.com/koerZ.jpg" width="400"/&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But, sadly, it was closed. Maybe that&amp;#8217;s because &lt;a href="http://www.youtube.com/watch?v=zDNXx-PgU3k"&gt;Zephyr&lt;/a&gt; doesn&amp;#8217;t support iOS 3.1. ;P&lt;/p&gt;</description><link>http://blog.chpwn.com/post/17170751817</link><guid>http://blog.chpwn.com/post/17170751817</guid><pubDate>Mon, 06 Feb 2012 16:47:00 -0500</pubDate></item><item><title>Spire Proxy "FAQ"</title><description>&lt;blockquote&gt;
  &lt;p&gt;Spire needs a proxy!? It&amp;#8217;s useless!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;As has been noted, my &lt;a href="http://chpwn.com/apps/spire"&gt;recently released tweak Spire&lt;/a&gt; requires a proxy and data from an iPhone 4S to operate. As the point of Spire is to get Siri on devices that &lt;em&gt;aren&amp;#8217;t&lt;/em&gt; the iPhone 4S, this might at first seem to imply that Spire is useless.&lt;/p&gt;

&lt;p&gt;However, this is not because I hate you or because I&amp;#8217;m lazy, it&amp;#8217;s because Apple has made it very likely &lt;a href="http://chpwn.com/apps/spire/auth-details"&gt;impossible to defeat&lt;/a&gt; the authorization requirement. I reverse engineered it, and it does not appear possible to connect Siri to the cloud without information from an iPhone 4S.&lt;/p&gt;

&lt;p&gt;However, that doesn&amp;#8217;t necessarily mean that Spire is therefore useless.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;So, how do I get a proxy?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;There&amp;#8217;s any number of ways for you to get a proxy that will help you connect Siri to Apple. Here&amp;#8217;s a few of my ideas:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;&lt;strong&gt;westbaer&amp;#8217;s &lt;a href="https://github.com/westbaer/SiriProxy"&gt;SiriProxy fork&lt;/a&gt;&lt;/strong&gt;

&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Own an iPhone 4S too:&lt;/strong&gt; Maybe you already own an iPhone 4S, and just want Siri on another device of yours. This is simple; you can just use the above proxy yourself.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Find a friend:&lt;/strong&gt; Maybe your friend has an iPhone 4S and will let you use their authentication tokens (maybe in exchange for some cool SiriProxy plugins). Then, you can share the authentication. Or, maybe you gave your relative your old iPhone when you got your iPhone 4S: now you can share your token and give them Siri.&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Pay up:&lt;/strong&gt; It&amp;#8217;s very likely that soon we will see for-pay services online to rent you some space on a Siri proxy, attached to one of their iPhone 4S devices. I haven&amp;#8217;t seen anything like this yet, but I&amp;#8217;ll keep my eye out, and I would encourage anyone who is interested to set something like this up.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;And now for something completely different:&lt;/strong&gt; As I &lt;a href="http://chpwn.com/apps/spire/auth-details"&gt;suggested earlier&lt;/a&gt;, you might be able to replace Siri entirely. A simple method might be to use Google Chrome&amp;#8217;s &lt;a href="http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/speech/"&gt;speech &amp;#8220;API&amp;#8221;&lt;/a&gt; hooked up to some code to decode the Siri requests and parse Google&amp;#8217;s result. Or, someone could hook it up to some logic backends like many of the clones available on Android: the possibilities are endless.&lt;/li&gt;
&lt;/ul&gt;&lt;blockquote&gt;
  &lt;p&gt;Okay, I&amp;#8217;ll find something!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Good! Spire is far from perfect, but at least at this point in time, it&amp;#8217;s the best that I can do. Maybe in the future someone will find a way to evade the authorization requirement, but from my position here that&amp;#8217;s unlikely. Hopefully, however, you&amp;#8217;ll be able to figure something out.&lt;/p&gt;</description><link>http://blog.chpwn.com/post/14843222758</link><guid>http://blog.chpwn.com/post/14843222758</guid><pubDate>Mon, 26 Dec 2011 22:42:00 -0500</pubDate></item><item><title>Introducing Spire</title><description>&lt;p&gt;Spire is my (along with &lt;a href="http://rpetri.ch/"&gt;Ryan Petrich&lt;/a&gt;) new tool for installing Siri on previously unsupported, but jailbroken, devices. Spire is a small download, but while installing it will download Siri itself (directly from Apple). Spire is available in Cydia right now — go get it! &lt;em&gt;This will use about 100&amp;#160;MB of data, so please connect to Wi-Fi before installing.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;However, Spire is not a complete solution. Apple still &lt;strong&gt;&lt;a href="http://chpwn.com/apps/spire/auth-details"&gt;requires authorization&lt;/a&gt;&lt;/strong&gt; to use Siri, so information from an iPhone 4S is still required. To insert this information, Spire allows you to enter your own proxy server address. I&amp;#8217;ve put up a &lt;a href="http://blog.chpwn.com/post/14843222758"&gt;list of my ideas&lt;/a&gt; on how you might get access to a proxy; hopefully you can figure something out.&lt;/p&gt;

&lt;p&gt;Spire uses a new method to obtain the files necessary for Siri, so it doesn&amp;#8217;t have the &lt;a href="http://blog.chpwn.com/post/12189986710"&gt;copyright issues&lt;/a&gt; encountered by previous attempts. Similarly, rather than directing all traffic through a specific proxy server (and the &lt;a href="https://twitter.com/#!/chpwn/statuses/143591593126010881"&gt;associated privacy issues&lt;/a&gt;), Spire allows you to specify your own proxy server.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Thanks to planetbeing for PartialZip and Ryan Petrich for his fixes and improvements.&lt;/em&gt;&lt;/p&gt;</description><link>http://blog.chpwn.com/post/14689740472</link><guid>http://blog.chpwn.com/post/14689740472</guid><pubDate>Fri, 23 Dec 2011 17:30:00 -0500</pubDate></item><item><title>Siri Authentication</title><description>&lt;p&gt;Siri may be specific to the iPhone 4S, but very little of the actual processing takes place on the iPhone. Rather, Siri streams the voice data to Apple, and then displays the response from Apple and renders it. So, to even simply transcribe your voice into text, Siri needs to be able to contact Apple.&lt;/p&gt;

&lt;p&gt;Siri requires authentication to connect to Apple. This is likely to prevent unauthorized use: I&amp;#8217;m sure Siri takes a lot of computing power to run, as voice transcription, looking up responses, and bandwidth aren&amp;#8217;t free. However, if your goal is to run Siri on a device which isn&amp;#8217;t officially supported, you need to bypass this authentication requirement in some way.&lt;/p&gt;

&lt;p&gt;The authentication is based on what I&amp;#8217;m going to call &amp;#8220;tokens&amp;#8221;, which are signed by Apple. If I remember correctly (I haven&amp;#8217;t looked at this for a month or so, and this is from memory), Siri (through the &lt;code&gt;assistantd&lt;/code&gt; binary) first asks Apple for certificate data. This is then used to sign a blob of data generated by the iPhone and encrypted using AES. That signed data is then sent back to Apple, processed. If that was found to be valid, the device receives the &amp;#8220;token&amp;#8221; (called &lt;code&gt;sessionInfo&lt;/code&gt; in the code) and an expiration date (the token is generally renewed daily).&lt;/p&gt;

&lt;p&gt;The interesting part here is the AES-encrypted and signed data that is submitted to Apple for validation. The code that generates this is obfuscated (similar to FairPlay), but the general gist of what it does is reasonably simple. Firstly, &lt;code&gt;assistantd&lt;/code&gt; calls out to the obfuscated &lt;code&gt;absinthed&lt;/code&gt;, a part of the iPhone&amp;#8217;s FairPlay subsystem. That then asks &lt;code&gt;libMobileGestalt&lt;/code&gt; for both the &lt;code&gt;UniqueDeviceID&lt;/code&gt; (the same UDID used for provisioning) and &lt;code&gt;SerialNumber&lt;/code&gt; (the device&amp;#8217;s serial number), and reads four bytes from a &lt;a href="http://pubs.opengroup.org/onlinepubs/7908799/xsh/shm_open.html"&gt;shared memory region&lt;/a&gt;. I currently do not know the source of these four byes (although I suspect the FairPlay daemon) or the purpose. This is then AES encrypted and sent back to &lt;code&gt;assistantd&lt;/code&gt; to send to Apple, and (if valid) is exchanged for the session info.&lt;/p&gt;

&lt;p&gt;As Apple can simply blacklist any device ID used for mass distribution of Siri, there is no way for a widespread and popular distribution of Siri to piggyback on one valid iPhone 4S identifier. However, a more distributed approach may be possible. A fork of &lt;a href="https://github.com/plamoni/SiriProxy"&gt;SiriProxy&lt;/a&gt;, available &lt;a href="http://www.ketchup-mayo-senf.de/blog/-it-howto-siri-fully-working-with-your-own-siriproxy-for-iphone-4-iphone-3gs-ipod-ipad"&gt;here&lt;/a&gt;, allows everyone with an iPhone 4S to run their own proxy for their own devices. Or, it may be possible to replace Siri entirely, using something like &lt;a href="http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/speech/"&gt;Google&amp;#8217;s speech &amp;#8220;API&amp;#8221;&lt;/a&gt; for speech transcription and logic like &lt;a href="https://github.com/github/hubot"&gt;Hubot&lt;/a&gt; to create something usable for at least simple tasks like dictation.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The above technical info was discovered through a combination of static and dynamic analysis. If anyone would like to see my (not well documented, sadly) .idb or to contribute more to the investigation, just let me know on IRC. Thanks to anyone who helps, in addition to &lt;a href="http://twitter.com/stroughtonsmith"&gt;Steven Troughton-Smith&lt;/a&gt; and &lt;a href="https://github.com/tmm1"&gt;Aman Gupta&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;</description><link>http://blog.chpwn.com/post/14612320117</link><guid>http://blog.chpwn.com/post/14612320117</guid><pubDate>Thu, 22 Dec 2011 06:14:00 -0500</pubDate></item><item><title>ICS Paper Cuts</title><description>&lt;a href="http://icspapercuts.tumblr.com/"&gt;ICS Paper Cuts&lt;/a&gt;: &lt;p&gt;This week, I bought myself a Galaxy Nexus (GSM version, not Verizon, so I can use it on my AT&amp;T contract). I actually generally like the phone and Android 4.0 — shocking, I know — but there are dozens of the “little things” that Google got wrong. I hope this is just growing pains of a completely new design for the software, but in the spirit of Mozilla’s &lt;a href="http://limi.net/articles/papercuts/"&gt;paper cut&lt;/a&gt; UI and UX project, I thought I’d document some of them on a &lt;a href="http://icspapercuts.tumblr.com/"&gt;new Tumblr&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In the future, I might expand this to just general UI complaints, but for now I’m just going to be discussing Ice Cream Sandwich as I use the Galaxy Nexus as my main phone.&lt;/p&gt;</description><link>http://blog.chpwn.com/post/14605313853</link><guid>http://blog.chpwn.com/post/14605313853</guid><pubDate>Thu, 22 Dec 2011 01:08:00 -0500</pubDate></item><item><title>Carrier IQ is on iOS</title><description>&lt;p&gt;Carrier IQ, the now &lt;a href="http://www.theregister.co.uk/2011/11/30/smartphone_spying_app/"&gt;infamous&lt;/a&gt; &amp;#8220;rootkit&amp;#8221; or &amp;#8220;keylogger&amp;#8221;, is not just for &lt;a href="http://www.androidcentral.com/carrier-iq-evil-we-agree-and-hate-we-did-it?style_mobile=0"&gt;Android&lt;/a&gt;, &lt;a href="http://www.rgbfilter.com/?p=15818"&gt;Symbian&lt;/a&gt;, &lt;a href="http://www.rgbfilter.com/?p=15818"&gt;BlackBerry&lt;/a&gt;, and even &lt;a href="http://forums.precentral.net/hp-touchpad/307686-carrieriq-ciq-such-rootkits-hp-touchpad.html"&gt;webOS&lt;/a&gt;. In fact, &lt;strong&gt;up through and including iOS 5, Apple has included a copy of Carrier IQ on the iPhone.&lt;/strong&gt; However, it does appears to be disabled along with diagnostics enabled on iOS 5; older versions may send back information in more cases. Because of that, &lt;strong&gt;if you want to disable Carrier IQ on your iOS 5 device, &lt;a href="http://dl.dropbox.com/u/3177211/diagnostics_and_usage.png"&gt;turning off&lt;/a&gt; &amp;#8220;Diagnostics and Usage&amp;#8221; in Settings appears to be enough.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I do realize the info below is a bit technical, but that&amp;#8217;s the best way for me to share what I&amp;#8217;ve figured out so far at this point. Please feel free to let me know if you discover something else here.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Carrier IQ is run from a number of different daemons, depending on the firmware version of the device: &lt;em&gt;(You can view this on a jailbroken iPhone with &lt;a href="http://iphone.heinelt.eu/?Applications:iFile"&gt;iFile&lt;/a&gt; or &lt;a href="http://theiphonewiki.com/wiki/index.php?title=VFDecrypt_Keys"&gt;extract&lt;/a&gt; it from a software update bundle if you want to check the files out yourself.)&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;iOS 3: &lt;code&gt;/usr/bin/IQAgent&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;iOS 4 and 5: &lt;code&gt;/usr/bin/awd_ice2&lt;/code&gt; or &lt;code&gt;/usr/bin/awd_ice3&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;The startup routine verifies that it is running on either a compatible device and exits if it is not. In addition, and most importantly: it &lt;em&gt;appears&lt;/em&gt; it will only run if:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;iOS 3: The &lt;code&gt;DiagnosticsAllowed&lt;/code&gt; key is set to true in the &lt;code&gt;com.apple.iqagent&lt;/code&gt; preferences — which it does not appear to be enabled on any of my devices. (If anyone knows what would cause this key to be set to &lt;code&gt;true&lt;/code&gt;, please let me know.)&lt;/li&gt;
&lt;li&gt;iOS 4: &lt;em&gt;Unknown, probably like iOS 3.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;iOS 5: Copies the &lt;code&gt;ShouldSubmit&lt;/code&gt; value from &lt;code&gt;lockdownd&lt;/code&gt;, under the domain &lt;code&gt;com.apple.MobileDeviceCrashCopy&lt;/code&gt;. &lt;strong&gt;I believe this value is set by the &amp;#8220;Submit Logs to Apple&amp;#8221; option during the iOS 5 setup sequence, and so Carrier IQ logging is toggled with that setting.&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;There is also a check to ensure that your carrier supports the logging: it appears some carriers support it only over WiFi, others over 3G. However, despite those restrictions and never enabling the above checks, I do see Carrier IQ log files stored on all of the devices I tested:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;iOS 3: &lt;code&gt;/var/logs/IQAgent&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;iOS 4: &lt;code&gt;/var/wireless/Library/Logs/IQAgent&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;iOS 5: &lt;code&gt;/var/wireless/Library/Logs/awd&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;But is this version of Carrier IQ the same keylogger/rootkit as on Android? The answer appears to be: not quite. It does access a reasonable amount of information, however: &lt;em&gt;(Be sure to note that I have not confirmed which, if any, of this data is sent remotely.)&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;CoreTelephony

&lt;ul&gt;&lt;li&gt;your phone number&lt;/li&gt;
&lt;li&gt;your carrier&lt;/li&gt;
&lt;li&gt;your country&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;active phone calls&lt;/strong&gt; 

&lt;ul&gt;&lt;li&gt;(However, I only saw it noting that a phone call was active, not what number was dialed or it was received from. But, I am not going to claim it doesn&amp;#8217;t do that: it&amp;#8217;s certainly possible, but didn&amp;#8217;t see it.)&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;CoreLocation

&lt;ul&gt;&lt;li&gt;your location (&lt;strong&gt;Only&lt;/strong&gt;, however, if Location Services are enabled.)&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;(Possibly more I haven&amp;#8217;t yet found.)&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;As Carrier IQ claims in &lt;a href="http://www.youtube.com/watch?v=legx3K_Ul_I"&gt;their video&lt;/a&gt;, communication with the remote server is all done via SSL. Importantly, it &lt;strong&gt;does not appear the daemon has any access or communication with the UI layer, where text entry is done&lt;/strong&gt;. I am reasonably sure it has no access to typed text, web history, passwords, browsing history, or text messages, and as such is &lt;em&gt;not&lt;/em&gt; sending any of this data remotely.&lt;/p&gt;

&lt;p&gt;It appears that if you really care about this, Windows Phone 7 is the only mobile operating system without this installed. ;P However, I think the blame here really belongs with the US carriers who obviously demanded this: personally, I am completely fine with this data being sent off (especially if it helps AT&amp;amp;T&amp;#8217;s network improve), but I would definitely prefer if it was more transparent — even if you can disable it with that toggle, Apple only explains that it &amp;#8220;might contain location data&amp;#8221;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; From my examinations, Apple&amp;#8217;s recent &lt;a href="http://allthingsd.com/20111201/apple-we-stopped-supporting-carrieriq-with-ios-5/"&gt;statement&lt;/a&gt; on the issue appears to be entirely accurate.&lt;/p&gt;</description><link>http://blog.chpwn.com/post/13572216737</link><guid>http://blog.chpwn.com/post/13572216737</guid><pubDate>Wed, 30 Nov 2011 21:30:00 -0500</pubDate></item><item><title>Why not Siri for iPhone 4, iPod touch right now?</title><description>&lt;p&gt;As &lt;a href="http://twitter.com/stroughtonsmith"&gt;@stroughtonsmith&lt;/a&gt; and I &lt;a href="http://youtu.be/p8GLwG4_qBY"&gt;demonstrated&lt;/a&gt; a few days ago, it is possible to run Siri on iPhone 4 and iPod touch. However, as we are currently unable to distribute the port or the procedure we used, I think I should at least explain the reasons why that isn&amp;#8217;t happening.&lt;/p&gt;

&lt;p&gt;For a little background information, it&amp;#8217;s important to understand the fundamentals of how copyright law works. Apple owns the copyright on the software, images, and data used inside iOS: they created them. Because of that, they have the ability to decide what other people can — are licensed to — do with them: copy, distribute, adapt, modify, or any number of other protections of their works. Pretty simple. But this does lead to one important, if somewhat counterintuitive, fact: just because a piece of data is available freely on the internet does &lt;em&gt;not&lt;/em&gt; mean that you have the rights to redistribute that data (or any part of it) without an applicable license. In practice, that means that just because certain files are freely available on a device or inside a firmware (.ispw) file freely downloadable from Apple&amp;#8217;s website, it does not imply that those files can legally be distributed by anyone else.&lt;/p&gt;

&lt;p&gt;In the context of Siri, this means that the resource files, images, and code that makes up Siri cannot be freely shared. These frameworks and plugins that work together to build Siri are not included on other iOS builds besides the ones running on the iPhone 4S. Therefore, these files must be copied from a running iPhone 4S, or from the iPhone 4S&amp;#8217;s firmware (.ipsw) file. The first method requires you to own an iPhone 4S to copy the files from, so it is not useful for most people: if you already own an iPhone 4S, you already have Siri. The issue with the second method is more technical: the firmware files are distributed encrypted, and we do not yet have the decryption key to access the Siri files inside of the iPhone 4S firmware file.&lt;/p&gt;

&lt;p&gt;Just from that, you currently &lt;em&gt;must already own an iPhone 4S&lt;/em&gt; to install Siri on it without a blatant copyright violation. But even that&amp;#8217;s not all: if you do all of that, there&amp;#8217;s still a few more reasons why Siri won&amp;#8217;t just work.&lt;/p&gt;

&lt;p&gt;Many people have managed to display the Siri UI on the iPhone 4; it is, in fact, reasonably trivial with access to the files copied off an iPhone 4S (as explained above). But only Steven and myself — yes, I know there are others that claim to have: I&amp;#8217;ll tell you this, they haven&amp;#8217;t ;) — have managed to make Siri successfully contact the Apple servers and receive responses. Why? Here, the answers become slightly more murky. Partially this is because I don&amp;#8217;t want to reveal too much about the procedure to try and ensure that you all will be able to use it in the future, and partially because it requires a jailbroken iPhone 4S, something which is currently &lt;a href="http://jailbrea.kr/"&gt;not&lt;/a&gt; publicly available. Anyway, the general gist of it is that you almost certainly need the access provided by the a jailbreak to extract all of the information necessary to get Siri working on another device, and that&amp;#8217;s not yet availble. (And, no, I don&amp;#8217;t know when it will be. You can &lt;a href="http://jailbrea.kr/"&gt;follow along with me&lt;/a&gt; while we wait, though!)&lt;/p&gt;

&lt;p&gt;Anyway, I hope that clears up some of the technical and legal reasons why distributing a build (or instructions) to run Siri on older hardware isn&amp;#8217;t possible at the moment. When we have the ability to decrypt the encrypted iPhone 4S firmware file — to extract the Siri files legally, without the need for an iPhone 4S — and we have an iPhone 4S jailbreak to obtain the other nececssary information at a mass scale, hopefully this can become a reality and everyone can try out Siri on their older devices. Until then, showing you a video that it is possible is the best we can do.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;(Oh, and to answer another popular question: nobody has tried it on an iPhone 3GS or iPod touch 3G or an iPad on iOS 5, so we don&amp;#8217;t have any clue if it will work or not there. But we can hope it will!)&lt;/em&gt;&lt;/p&gt;</description><link>http://blog.chpwn.com/post/12189986710</link><guid>http://blog.chpwn.com/post/12189986710</guid><pubDate>Tue, 01 Nov 2011 03:00:00 -0400</pubDate></item><item><title>Blocks for Target/Action?</title><description>&lt;p&gt;&lt;a href="http://en.wikipedia.org/wiki/Blocks_(C_language_extension)"&gt;Blocks&lt;/a&gt; are an awesome extension to C. And, since iOS 4 (the first version that supported blocks) now has enough adoption to make it safe to be minimum version that I support, I&amp;#8217;ve been checking out blocks quite a bit to see where they could make blocks easier.&lt;/p&gt;

&lt;p&gt;Some of the UIKit and Foundation APIs have been updated to use blocks, but many of them are still using the older target/action mechanism or delegation where blocks would probably be a better choice. Lately, there&amp;#8217;s been a &lt;a href="https://github.com/nickpaulson/BlockKit"&gt;bunch&lt;/a&gt; &lt;a href="https://github.com/jivadevoe/UIAlertView-Blocks"&gt;of&lt;/a&gt; &lt;a href="https://github.com/zwaldowski/BlocksKit"&gt;projects&lt;/a&gt; designed to add block support to the places that Apple hasn&amp;#8217;t (or has decided against) adding it.&lt;/p&gt;

&lt;p&gt;That got me thinking: blocks are Objective-C objects, why can&amp;#8217;t they act as the target, with the body of the block as the action? (Note: I&amp;#8217;m not posting this up here as a suggestion that you use this (yet!), but as a way to ask if this makes any sense.)&lt;/p&gt;

&lt;p&gt;Since I couldn&amp;#8217;t find any documentation on what Objective-C class blocks are (except that they inherit from NSObject), I decided to add a category to NSObject to give me a selector to invoke the block with. To do that, I came up with &lt;code&gt;-[NSObject startBlock]&lt;/code&gt;, which ended up looking like this: &lt;code&gt;(((void (^)(void)) self)());&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;However, when I tried &lt;code&gt;target:^{ NSLog("in a block!"); } action:@selector(startBlock)&lt;/code&gt;, I got a crash, because the block was never retained (as targets shouldn&amp;#8217;t be), so it no longer existed by the time &lt;code&gt;-startBlock&lt;/code&gt; was called on it. Just copying it wouldn&amp;#8217;t work, either, because it wouldn&amp;#8217;t ever be released, and adding an ivar to release it yourself removed any of the advantages of using a block over an additional selector in the first place.&lt;/p&gt;

&lt;p&gt;My next idea is when things got a little crazy. &lt;a href="http://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/ObjectiveC/Chapters/ocAssociativeReferences.html"&gt;Associated objects&lt;/a&gt; (added in iOS 3.1) could get around those issues, since they&amp;#8217;re automatically released when the object they are attached to is deallocated. I added another method to my NSObject category, &lt;code&gt;-copyWithOwner:&lt;/code&gt;, that took advantage of that to force ownership of an object onto another object. Using that, I ended up with something that you use like this: &lt;code&gt;[object addTarget:[^{ NSLog("block!"); } copyWithOwner:self] action:@selector(startBlock)]&lt;/code&gt;, with the below code used to implement it:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;@implementation NSObject (BlockTargetAction)
- (void)startBlock {
    (((void (^)(void)) self)());
}
- (id)copyWithOwner:(NSObject *)owner {
    // copy ourself to the heap
    self = [[self copy] autorelease];

    // this key is unique until self is deallocated,
    // so it should last as long as the owner does
    void *key = (void *) self;

    // automatically released when the owner object is deallocated
    objc_setAssociatedObject(owner, key, self, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
    return objc_getAssociatedObject(owner, key);
}
@end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I&amp;#8217;m not sure, though, that I&amp;#8217;ve fully thought through all the possible implications of using this hack, especially the memory management aspects. Does this make any sense, or am I wasting my time?&lt;/p&gt;</description><link>http://blog.chpwn.com/post/7938019469</link><guid>http://blog.chpwn.com/post/7938019469</guid><pubDate>Fri, 22 Jul 2011 15:38:00 -0400</pubDate></item><item><title>Sliding UITableView Header Views</title><description>&lt;p&gt;The &amp;#8220;dickbar&amp;#8221; (as &lt;a href="http://daringfireball.net/lined/2011/03/06/dickbar"&gt;Gruber&lt;/a&gt; puts it) may be the big news item lately, from my &amp;#8220;Twizzler&amp;#8221; to remove it to the &lt;a href="http://dickbar.org/"&gt;various&lt;/a&gt; &lt;a href="http://encodedrecords.com/dickbar/"&gt;websites&lt;/a&gt; springing up about it. But, this post is about something much more mundane and technical in Twitter for iPhone: sliding headers for UITableView.&lt;/p&gt;

&lt;p&gt;When you first open Twitter for iPhone, you get &lt;a href="http://chpwn.com/dropbox/twitter-signup.jpg"&gt;this&lt;/a&gt; screen. Looks like just a standard UITableView and a custom &lt;code&gt;-tableHeaderView&lt;/code&gt; set, yeah? Not quite. There&amp;#8217;s actually an interesting effect here: when you scroll, the header actually slides &lt;em&gt;under&lt;/em&gt; the table view. If that didn&amp;#8217;t make sense (and it&amp;#8217;s not a good explanation, sorry) I&amp;#8217;ve uploaded a video that demonstrates the effect:&lt;/p&gt;

&lt;center&gt; 
&lt;object width="480" height="390"&gt;&lt;param name="movie" value="http://www.youtube-nocookie.com/v/oEodNBkJWAY?fs=1&amp;amp;hl=en_US&amp;amp;rel=0&amp;amp;hd=1"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;embed src="http://www.youtube-nocookie.com/v/oEodNBkJWAY?fs=1&amp;amp;hl=en_US&amp;amp;rel=0&amp;amp;hd=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="390"&gt;&lt;/embed&gt;&lt;/object&gt; 
&lt;/center&gt;

&lt;!-- more --&gt;

&lt;p&gt;There&amp;#8217;s a few ways you could try and go about implementing this effect, but first let&amp;#8217;s examine the behavior more closely. I came up with the following list of important behavior points that our clone should match:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;Interaction is allowed with the header view.&lt;/li&gt; 
&lt;li&gt;The scrollbar extends to the top of the screen, past the header.&lt;/li&gt; 
&lt;li&gt;Scrolling is possible when tapping in the header.&lt;/li&gt; 
&lt;li&gt;Scrolling off the bottom of the table shows the default background.&lt;/li&gt; 
&lt;li&gt;The table view still scrolls smoothly.&lt;/li&gt; 
&lt;/ul&gt;&lt;p&gt;From that list, you can easily eliminate a few possible methods: moving the table view down and setting it&amp;#8217;s &lt;code&gt;clipsToBounds&lt;/code&gt; property to NO will cause issues with the second one, and setting a transparent background will have issues with the fourth. At this point, there were two methods that stood out to me: placing the header view underneath the table and forwarding touch events from a transparent &lt;code&gt;tableHeaderView&lt;/code&gt;, or having the header be a subview of the &lt;code&gt;tableHeaderView&lt;/code&gt; property, and updating the position in the &lt;code&gt;-scrollViewDidScroll:&lt;/code&gt; delegate method of the table.&lt;/p&gt;

&lt;p&gt;With the first method, you need some method of passing on the touch events. I had some success using &lt;code&gt;-hitTest:withEvent:&lt;/code&gt; to redirect the events towards the header, but that broke requirement three: you could &lt;em&gt;only&lt;/em&gt; interact with the header when you touched in that area. Not good. Next, I tried overriding &lt;code&gt;-touches(Began|Ended|Moved|Cancelled):withEvent:&lt;/code&gt;, but this broke the scrolling in a strange way, possibly due to gesture recognizers and other magic inside UIScrollView. Rather than hacking around that, I tried the other idea, updating it each scrolling frame. I was initially hesitant here due to concerns about impacting scrolling performance &amp;#8212; setting a frame isn&amp;#8217;t particuarly cheap, and &lt;code&gt;-scrollViewDidScroll:&lt;/code&gt; gets called a &lt;em&gt;lot&lt;/em&gt;. Even so, this method seems to work the best. Create a wrapper view, add the header as a subview of it, and store the desired height. Then, in &lt;code&gt;-scrollViewDidScroll:&lt;/code&gt;, set the Y position of the header to the table&amp;#8217;s &lt;code&gt;contentOffset&lt;/code&gt;, and it&amp;#8217;s height to that offset minus the saved desired height of the view (to prevent it from ever overlapping actual table cells).&lt;/p&gt;

&lt;p&gt;&lt;em&gt;(I don&amp;#8217;t have particuarly clean code right now to accomplish this affect, but if people want I can post some. Just let me know. Also, I do intend to blog more, I&amp;#8217;m just really lazy.)&lt;/em&gt;&lt;/p&gt;</description><link>http://blog.chpwn.com/post/6378544658</link><guid>http://blog.chpwn.com/post/6378544658</guid><pubDate>Wed, 18 May 2011 00:00:00 -0400</pubDate></item><item><title>Moving to Micro USB?</title><description>&lt;p&gt;Today, some people began receiving the first of the new, streaming-only, Apple TV. Engadget has a nice review of the device itself &lt;a href="http://www.engadget.com/2010/09/29/apple-tv-review-2010/"&gt;here&lt;/a&gt;, but the most interesting thing for me was in the ports on the back. It wasn’t the HDMI output, or the Ethernet jack, but the small, unlabeled Micro USB port.&lt;/p&gt;

&lt;center&gt;&lt;img src="http://chpwn.com/dropbox/blog/appletv-usb.jpg" alt="Apple TV's new Micro USB port."/&gt;&lt;/center&gt;

&lt;p&gt;&lt;span id="more-76"&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;No iOS device, until this one, has had a Micro USB port, especially not one used for restoring (or communicating with iTunes at all). However, that may soon be &lt;a href="http://www.iclarified.com/entry/index.php?enid=11031"&gt;changing&lt;/a&gt;. The new European “universal charger” will require all smartphones sold there, including the iPhone, to use a Micro USB charger rather than the explosion in proprietary chargers we’ve been seeing.&lt;/p&gt;

&lt;p&gt;The Apple TV may very well be preparation for what is coming soon for other iOS devices. While it’s not required for any devices outside Europe, Apple has been hesitant, to say the least, to have physical differences in their iOS devices in different regions, so the rest of the world’s devices will probably be moving to Micro USB as well. How this will impact the design — and third part accessories — still isn’t known, but we do know that some major changes will have to be made, and this new Apple TV may be a way for Apple to test those out in a much more controlled environment.&lt;/p&gt;

&lt;p&gt;(Unrelated note: I do plan on posting more often to this blog. Maybe if I set a once-a-week post schedule, I can actually keep to it and keep you guys more up to date.)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update November 2011:&lt;/strong&gt; Looks like Apple &lt;a href="http://store.apple.com/uk/product/MD099ZM/A"&gt;released what they plan to use&lt;/a&gt; for Micro USB support. Lame.&lt;/p&gt;</description><link>http://blog.chpwn.com/post/6378524445</link><guid>http://blog.chpwn.com/post/6378524445</guid><pubDate>Sun, 24 Oct 2010 00:00:00 -0400</pubDate></item><item><title>iOS 4 Status</title><description>&lt;p&gt;None of my apps so far run on the new iOS 4. This is because my iPhone 4 and my iPod touch 3G just don&amp;#8217;t have an available jailbreak running iOS 4, not because I have abandoned my applications.&lt;/p&gt;

&lt;p&gt;Once a jailbreak is released, I will work to quickly update Infinidock and Infiniboard. These are my paid apps, and I will support them at least through iOS 4.1, and likely longer. Preliminary support is already in place (my internal versions aren&amp;#8217;t complete, but don&amp;#8217;t crash), and a full update will come reasonably soon after my devices are jailbroken.&lt;/p&gt;

&lt;p&gt;ProSwitcher is a different story. Personally, I prefer the multitasking switcher that iOS 4 introduced, although I understand that many of you prefer the Palm webOS/ProSwitcher interface. I have decided that I am not going to continue updating ProSwitcher past OS 3.2, a version compatible with which is currently in Alpha. Ryan may still update ProSwitcher himself, but I feel that it is no longer necessary with the new Apple release.&lt;/p&gt;

&lt;p&gt;Finally, there is Pulldown. I was originally planning to release this as a paid tweak, but I think I will just post the source code to my GitHub soon and try to find a maintainer to have it as an open source project. If any developers are interested, please contact me via email or Twitter, and I&amp;#8217;ll see what I can do.&lt;/p&gt;</description><link>http://blog.chpwn.com/post/6378496473</link><guid>http://blog.chpwn.com/post/6378496473</guid><pubDate>Thu, 26 Aug 2010 00:00:00 -0400</pubDate></item><item><title>A Blog!</title><description>&lt;p&gt;I’ve never managed to keep a blog going beyond just a few posts before. I always have these great ideas for blog posts, and I’m sure they would be great, but I no longer have the inspiration when I’m just sitting at a computer. Maybe I’d just rather be coding, not sure.&lt;/p&gt;

&lt;p&gt;But I’ve decided that for the iPhone scene, I want another blog. I can’t promise that I’ll do any better than I’ve done in the past, but I’ll try. I don’t know if anyone even wants to read what I have to say, either. But hopefully this will give me somewhere to rant besides annoying everyone on IRC.&lt;/p&gt;

&lt;p&gt;If I do get around to posting here reasonably often, expect to see both technical and non-technical posts. Maybe I’ll make categories for the two, who knows. Hopefully it’ll all be interesting, but again, I haven’t been too great about this in the past. Maybe I should just stick with Tweeting: there, I can post what I’m thinking about while it happens. Then again, maybe that’s not the best either.&lt;/p&gt;

&lt;p&gt;Now to find something to talk about.&lt;/p&gt;</description><link>http://blog.chpwn.com/post/6378491436</link><guid>http://blog.chpwn.com/post/6378491436</guid><pubDate>Sat, 21 Aug 2010 00:00:00 -0400</pubDate></item></channel></rss>

