Think of the children!

A couple of people have complained that a more consumer electronics based computing platform would be murder to the subculture that they belong to.

From al3x.net:

The thing that bothers me most about the iPad is this: if I had an iPad rather than a real computer as a kid, I’d never be a programmer today. I’d never have had the ability to run whatever stupid, potentially harmful, hugely educational programs I could download or write. I wouldn’t have been able to fire up ResEdit and edit out the Mac startup sound so I could tinker on the computer at all hours without waking my parents. The iPad may be a boon to traditional eduction, insofar as it allows for multimedia textbooks and such, but in its current form, it’s a detriment to the sort of hacker culture that has propelled the digital economy.

I’m a fairly young person, yet I realize these sentiments are shared in every generation. “My kids won’t have the same great experiences I had because of this new technology. They won’t know the joy of riding a horse on the open range because of this newfangled mechanical carriage!”

Your kids are going to have the wonderful experience of opening up an interactive textbook on their iPad and learning about how their cells work. Or tapping on a circuit design simulation application and dragging components into a circuit to create a ripple adder. Or posting to their virtual reality homebase that because of the new GenomeEditor 3000 (with presets!!), their kids aren’t going to have the fun of tinkering with their genome. So the “think of the children!” argument isn’t going to sway me. You can leave those up to Fox News.

The new paradigm of a simplified, consumer electronics computing experience isn’t going to catch on overnight. Look on the bright side though. By the time the only computers left are the ones abstracted away enough to where you can’t edit the startup sound, we’ll be retired or, fingers crossed, dead.

Getting User Data From a Lite to a Paid App

It’s a common problem now on the App Store. User buys Lite version. User likes lite version. User buys the paid version and loses all of her/his data. Not a very good experience.

How can we fix this?

UIPasteboard of course!

Apple introduced an excellent and oft overlooked addition to the iPhone SDK when it gave developers the same power that they have on the desktop for sharing large chunks of data between applications. But Zac, you say, you of all people should know you can’t share data between apps…they’re sandboxed! Not true! Think of UIPasteboard as those little paper airplanes you used to send notes in back in school. No sandbox can hold UIPasteboard…

Method 1

This first method is fairly straightforward and easy for small data sets: Keep custom pasteboard filled with data you’d want users to import into your paid app.

UIPasteboard *sharedPasteboard = [UIPasteboard pasteboardWithName:@"com.mydomain.myapplite.sharedpasteboard" create:YES];
sharedPasteboard.persistent = YES;

By executing that on launch and keeping your sharedPasteboard up to date, you’ll always be able to request that from your paid app and auto-discover data from the lite version. The nicest thing about this method is most people won’t notice you did anything. Maybe you want users to notice your work…but sometimes the best features are the ones users don’t notice.

Method 2

This is for apps that have lots of content to put on the pasteboard and updating it all the time wouldn’t necessarily be so great. It’s a little weird but bear with me.

First, make sure you app can respond to the MyAppLite-export:// scheme. The parameters to this don’t really matter, but you could use them to specify some subset of data to export. You could also make this a little more generic and perhaps a little more secure by specifying a pasteboard name to the URL.

When MyAppLite is launched using this scheme, the users is presented with an “Exporting…” screen or something of the sort while MyAppLite puts everything requested on a special, one time use, pasteboard. After the pasteboard has been filled, MyAppLite opens MyApp-import://NAME_OF_PASTEBOARD. Now the paid app knows where to look to get all the necessary MyAppLite data off of the temporary pasteboard.

Security Concerns

Method 2 definitely has some security risks which possibly could be worked around. For one, if someone finds out your schemes they can read users data from a lite version and overwrite data in the paid version. With some obfuscated keys, this might not be much of an issue. Also, you wouldn’t want to send passwords or sensitive data using this method. That kind of data should be stored in the keychain anyway that is already available across your apps.

I hope this gives you some ideas on how to transfer data with UIPasteboard. I’ll try and post some sample code illustrating some of these concepts soon.

Site Downtime

My sites are going down for a couple days starting tonight.

positronsoftware.com and zacwhite.com are being moved to a different host. Thanks for your patience.

New Site!!

http://thatswh.at/

It’s juvenile and hilarious. My two favorite things. It looks at every tweet on Twitter and finds tweets that tell other people “That’s what she said.” It then finds the tweet that was in response to and puts it on a list.

This produces some of the following gems:

“my hands smell like meat”

and

“@mikejarrell @Jabrown85 Haha, thanks. I think he’s a little crooked but it was hard since he is the same height as me.”

Classics.

Enjoy!

Free Software!!!

I made a little app for my personal use the other day and thought I would share it. It basically keeps a window that is globally accessible through a keyboard command (cmd+shift+m by default). It lets you jot down any notes and use them in any other app.

Simi-useful but more importantly…free!

Download Memo 1.0

Exciting News

So I’ve put my pet project, Searcher, on Cydia (under Utilities). Searcher is an easy way to search your entire iPhone. SMS, Contacts, Notes, Events, Safari Bookmarks and Safari History are a single tap away. Check out the website for Positron Software to find out more.

I will have some more news on OpenClip in the next couple days. I will also be traveling to Chicago for C4[2], so drop me a line if you would like to meet up.

OpenClip Concerns

Note: This is also mirrored on openclip.org.

Let me first explain how OpenClip works:

How it works is relatively simple and doesn’t break the SDK agreement. OpenClip works by looking into the Documents folder of other applications to get their pastes. Applications are allowed to write all they want to their own Documents directory (for copy), so no foul there.
Applications are also allowed to read outside their sandbox into the Documents directories for other apps (for paste), so no foul there.

How could that ever go wrong? What’s the problem?

The problem is Apple is probably going to shut down reading into other application’s boxes. I’m all for that as long as one of two things happens before:

  • Apple ports NSPasteboard to the iPhone SDK (radar://6158362)

NSPasteboard is what I modeled OpenClip after. It allows copy and paste between applications, but more than that, it adds communication between applications. Porting NSPasteboard would make OpenClip moot and developers could easily respond by changing all references to OCPasteboard to NSPasteboard. Easy for everyone involved.

  • Apple shuts down sandbox reading but creates a public folder for apps to write to. (radar://6156881)

If Apple does this, inter-app communication would still be possible through OpenClip or some other file communication method.

Applications need to work together. That’s the Apple Way®. I don’t know what you think, but to me the smaller and simpler an app is on the iPhone, the better it is. To make apps that are simple but powerful, developers need to make applications that can communicate.

What happens if Apple shuts it down?

Here’s what happens if a new version of the iPhone OS comes out and OpenClip can’t communicate anymore:

  • Developers who implement OpenClip to either *only* copy or *only* paste can easily check if that will work before displaying any UI. If it breaks, those options just disappear.
  • Developers who implement to do both copy and paste retain copy and paste within their application. That means that when and if the next update breaks OpenClip, applications won’t stop launching, they won’t crash when you try and copy and they won’t get garbage data. All that will happen is the app will only be able to copy and paste in the application. Not a horrible way to degrade if you ask me.

What about the UI? There are going to be like 20 implementations for copy/paste!

UI is a hard problem to solve. One of OpenClips goals is to provide examples of UIs for copy and paste. But to be honest, the best thing you can do with OpenClip is use it only for simple data. Only copy interesting data that a user would want to copy and present UI similar to Apple’s push to save image UI. Doing what MagicPad does and providing a whole way to select text is not what 90% of apps need. Look at what Twittelator did with copy in the video on GeekBrief.tv (http://www.geekbrief.tv/copy-and-paste-for-iphone). Press and hold needs to be the way most apps utilize copy and paste.

You can check out Proximi’s MagicPad UI proposal video here. It’s worth a look.

Lets face it. Hardly anyone is not buying an iPhone because it doesn’t copy and paste. It’s useful, but not necessary. Apple knows this so they put it at the bottom of their to-do list. If Apple were to implement NSPasteboard, however, 90% of apps could gain some really great functionality. Until then, maybe OpenClip can serve as a sneak peek to Apple, developers and users that this kind of framework would benefit the iPhone greatly.

iPhone Copy/Paste

I created an open source project for iPhoneDevCamp 2. It allows cross application copy and paste.

Basically, all you have to do to get the benefits is include a few classes and use the very simple API to copy data or paste data. The special part is cross application. Copy a cocktail in Cocktails and paste it into MagicPad (Video of this in action).

There are some limitations. This technically complies with all Apple agreements. It is completely possible that apps that use this wouldn’t get on the App Store. Not for any real reason other than it will eventually step on Apple’s toes. It is also conceivable that the technology this is built on will break in the future. The hope is that the update that breaks this also brings copy and paste support. :)

If you are interested in looking at some code, send me an email to zacwhite+copypaste@@at@@gmail..dot..com.

Update: Ok people. Go download the code at http://code.google.com/p/touchclipboard/. Willing to hear name ideas :)

Update 2: Video: http://www.viddler.com/explore/mager/videos/36/.

Ignore all that.

Update 3: Site is up. Check out OpenClip.org.

WWDC==Awesome

Let me just take a moment to be thankful for this amazing event…

There is nothing more special than the big names in your favorite sub-culture getting together in one square block. WWDC is just that.

Continue reading “WWDC==Awesome”

WWDC Predictions

So it is that time again. Time to pack up and head to California for another badass week of techno-babble and nerd socializing. I totally know everything that will happen at the keynote, so I thought I’d share.

.Mac -> Mobile Me
Yep, that’s happening and guess what? It is going to be pretty nice. Third party developers can easily use the service to sync data between the iPhone and the Mac. Basically, developers can post data to Apple and it will get pushed to the iPhone. The best part? Buy an new iPhone and it comes with a year free. Oh, and Apple is going to add some pretty nice iPhone integration too. Think Visual Voicemail web interface kind of stuff.

iPhone gets 3G
Yeah, duh. There have been 3G rumors forever and it was bound to happen. It will have GPS, but not much software that utilizes it at first. Oh, we will finally be able to use the iPhone as a modem.

App Store
Not available after the keynote. We are going to get a nice little demo of apps, then Jobs is going to tell us that we should get out there and start putting the finishing touches (no pun intended) on our apps because in August they are going to launch the store. Yep, not until August, sorry.

OS 10.6 demo?
No.

Other Hardware?
Psh, what do I look like? A magic 8 ball? Speaking of that, I expect around 10 magic 8 ball apps at App Store launch.

There you have it. What do I win when I’m right?

Anyone wanting to meet up, let me know at first name + last name + @gmail.com.