iPhone27 Apr 2009 06:12 am

Apple just accepted my ChessPlayer update today. I’ve since removed all the amateur games from the database and have added a collection of Kasparov games compiled by Allen Dellinger specifically for use in Chess Player. I also have to thank Bruno Berenguer for letting me use his grandmaster collections.

We’re also now multilingual! Thanks to Maria Nuyanzina for Russian, Judith Meyer for German and Alex Kadar for French! I also translated the app to Esperanto, but since there is no localization option on the iPhone (even though it appears in the iPhone Simulator!) for Esperanto, there’s no way to view it on a device. However, Esperanto does show up as being supported in the app description.

chess_player_languages

iPhone and Objective-C24 Apr 2009 03:11 am

I’m developing an iPhone app which has a built-in quiz which runs using JavaScript within a UIWebView. After a user clicks a Check Answers button, I have to use JavaScript to determine if all the answers are correct, so I can save this result for later.

Here is the relevant JavaScript:

function checkAnswers() {
  // Do stuff to see if all answers were correct
  ...

  // Send all correct status back to Objective-C
  window.location = "/allCorrect/" + allCorrect;
}

In Objective-C, you then need to set up a UIWebViewDelegate to intercept whenever a new URL is to be loaded into the UIWebView. Then you need to call shouldStartLoadWithRequest and if you called your fake URL, then it shouldn’t load, but execute the code you need to run in Objective-C instead. Here is the relevant Objective-C code:

- (BOOL)webView:(UIWebView *)webView
        shouldStartLoadWithRequest:(NSURLRequest *)request
        navigationType:(UIWebViewNavigationType)navigationType {

  if ( [request.mainDocumentURL.relativePath
        isEqualToString:@"/allCorrect/false"] ) {
    NSLog( @"Nope, that is not right!" );
    return false;
  }

  if ( [request.mainDocumentURL.relativePath
        isEqualToString:@"/allCorrect/true"] ) {
    NSLog( @"You got them all!" );
    return false;
  }

  return true;
}
Podcasts21 Apr 2009 12:16 am

[Non-German summary: I appeared in a German tech podcast.]

Ich war ein Gast bei einem Podcast über alles was mit Technologie zu tun hat, aber hauptsächlich mit Apple und iPhone. Leider ist die Audio-Qualität nicht so gut, aber ich hoffe, ihr findet es interessant. Das war die erste Podcast Runde, wir probieren das zu verbessern. Ich freue mich auf euer Feedback!

ebooks08 Apr 2009 01:05 am

Yesterday I rediscovered the cross-platform open source app Calibre, an incredible ebook management tool. I like to say it’s like iTunes, but for ebooks. First of all, for those of you who don’t know, Sony Reader’s official software only works for Windows and from what I’ve read it’s quite unintuitive to use. Calibre has all the features you would want to manage your ebooks.

calibre

Remember that it will manage your library, so don’t tell it to use the directory that you currently use for ebooks as its default as this will drive you mad. Make an empty directory and then drag your ebooks into it. This will also effectively create a backup on your hard drive in case you accidentally delete books using Calibre. Once you have your books in your library, insert your Sony Reader (or other favorite eReader device) and Calibre will automatically recognize it and now you can simply highlight which books you want and click Send to Device. It will also show you the reader’s internal memory as well as any memory cards you have in your device and how much free space they have. By clicking on the arrow next to Send to Device, you can Set it to send to the device or card by default.

One issue that plagues everyone with eReaders is the plethora of ebook formats out there. Fortunately, Calibre deals with this nicely. You set your default output option, and I have chosen the standard ePub format and when you highlight a non-ePub book, you can just click Convert E-books and it will convert them to ePub format for you! Note that this does not work with DRM files.

However, the killer feature I found yesterday is Fetch News. Calibre comes with 100+ news sources in 10+ languages. As well as “ordinary news sources”, you can also use this to fetch your Instapaper or Google Reader by entering your username and password of that service. If Calibre doesn’t have the news source you want, you can add it yourself by creating a simple recipe. If you need something advanced, there is even a place where you can write a Python script to make it as customized as necessary! They encourage you to send them your recipes, so they can add them to future versions of Calibre, which is updated frequently indeed!

So, you can schedule Calibre to autofetch news feeds for you at a certain time of the day or every certain number of days. Then, when you connect your eReader device, it will automatically copy the latest news to your device in your preferred format. I have yet to see if it will also delete the old news files.

For those who are true open source purists, you might want to wait for the Txtr Reader which should also have integrated WiFi, 3G and bookstore… and it runs on Linux. In any case, whatever your device, Calibre should greatly improve your ebook management experience.

Conferences31 Mar 2009 06:56 am

If you’re going to be at the biggest blogger conference in Europe, re:publica, let’s meet up! Message me on Twitter @ChuckSmith and I’ll be checking it regularly throughout the conference. Hope to see you there!

ebooks11 Mar 2009 06:54 am

Today the Sony Reader PRS-505 launches in Germany for 299€ (US$377, £269). Due to the fall of the pound, we already bought ours at the Sony Center in the London Heathrow Airport for only £194 (216€, US$273), so that would make it a 28% discount for us. At that price, we couldn’t resist. We would certainly have preferred a Kindle, but they’re only sold in the USA, and despite being in California last week, all Kindle’s advantages are due to their Sprint whispernet coverage (cell phone data network, through a proprietary North American protocol) which won’t work in Europe.

Sony Reader displaying PDF file with magnified text

Sony Reader displaying PDF file with magnified text

(Full-sized image taken on my iPhone 3G using the Clarifi close-up lens)

Look and feel

As for this device itself, it looks great! Above you can see it viewing Tournament Poker: 101 Winning Moves, an ebook in PDF format with magnified text. You can also view files in landscape mode (by holding down the magnifying button for 5 seconds), which helps to be able to view most PDF files, although some will still have very small print using this method. Page turning is easy with two places to turn pages and you’ll never accidentally flip pages like I hear happened on the Kindle 1.

The advantage of an eBook reader over a laptop is that it uses electronic ink, thus making the experience almost that of looking at regular paper. This means no eye-strain, but also that you will need an extra reading light if you want to read in the dark.

Getting your files on the Sony Reader

As a Mac user, you’ll have to connect your device using USB and then copy your books into the /database/media/books folder. For Windows users, you install their software as use that which from what I understand works similar to iTunes. I’ve found that native LRF files (proprietary Sony Reader format) and ePub files (open ebook standard) work best on the device.

Downloading/Buying ebooks

Note that the Sony Reader PRS-505 comes with 192 MB of internal memory with two slots for Sony Memory Stick Pro Duo and SanDisk cards (up to 16 GB). Most LRF and ePub files are relatively small (The 3423 page War and Peace is 4.7 MB in LRF format). It came with a 100 Classics CD when I bought it in London, but it looks like that doesn’t come with it in Germany.

Unfortunately from what I’ve seen, everything at the official eBook Store from Sony is North America-only Windows-only DRM. Talk about restrictions! UK customers can buy from Waterstones, but with Adobe Digital Editions DRM (Mac and Windows) from what I can tell. I’d be curious to hear if anyone has had success buying ebooks and loading them on their Sony Reader with a Mac.

Update: I am very happy with how Fictionwise is very open about DRM, geographical restrictions and in what formats they have books. When I’m ready to buy ebooks, I think I’ll start with them.

Specifically in Germany, I’ve found that Thalia and Libri sell ebooks in Germany, but their prices are the same as regular print books, which I guess comes from the old-fashioned German law where all new books have to be sold at their retail price everywhere.

So, that leaves books in ePub format. For an excellent selection of ePub books, I’d highly recommend epubbooks.com. The most impressive source for free ebooks has been feedbooks which has every book in their 3000+ collection available in ePub format which will display nicely on a Sony Reader PRS-505. You can also use their service to convert RSS feeds to ePub. They also have software to sync your feeds to your ebook reader, except it’s Windows-only. grrr

PDF files work ok, but not great. No article on ebooks would be complete without mentioning Project Gutenberg. This is a collection of 27,000 free books in various electronic formats.

Charging

Due to its use of electronic ink, an ebook reader generally only consumes power when it changes a page unlike a typical monitor. Thus, these devices typically show power consumption in terms of page flips. The Sony Reader’s battery is good for 7500 page turns (read War and Peace twice on a single charge). It takes 4 hours to go from an empty battery to a complete charge via USB.

Conclusion

As a Mac user, I’m quite happy with the Sony Reader as long as I stick to ePub files and classics. I’d like to buy ebooks, but the way things look now, it looks like I’m left to what I can get for free, since I refuse to buy DRM-content. Well, except for iPhone apps, but that’s because they will only work on an iPhone anyway. If I buy a book or music, I’d also like to be able to use that on my computer as well as an external device. Also, I’ve only had this for 5 days, so if you see any errors in this blog post, please feel free to comment so I can correct them. Happy reading!

iPhone and Objective-C08 Mar 2009 04:55 pm

Many times you need to save some user preferences or session data that will load automatically upon the next launch of your iPhone app. Unfortunately this is quite a bit harder than it looks. Here are simple steps on how to save a string from your application. Just change the variable type to save more information!

Let’s assume you want to save the user’s account number.

Add the following to AppDelegate.h like you would normally create a mutable string:

NSMutableString *accountName;
@property (nonatomic, retain) NSMutableString *accountName;

Add the following to the top of AppDelegate.m. I put this between my import and implementation statements.

NSString *kAccountName = @"AccountName";

Add the following to applicationDidFinishLoading in AppDelegate.m:

NSMutableString *tempMutableAccountName = [[[NSUserDefaults standardUserDefaults] objectForKey:kAccountName] mutableCopy];
self.accountName = tempMutableAccountName;
[tempMutableAccountName release];

Add the following to applicationWillTerminate in AppDelegate.m:

[[NSUserDefaults standardUserDefaults] setObject:accountName forKey:kAccountName];

In the application itself, you will need to add the following code where you want to set this value to prepare for saving on application termination:

AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
appDelegate.accountNumber = x;

To grab this value from the saved variable, add these lines:

MobilePOSAppDelegate *appDelegate = (MobilePOSAppDelegate *)[[UIApplication sharedApplication] delegate];
x = appDelegate.accountNumber;

Now you can save data from your app so it can be loaded automatically next time!

iPhone03 Feb 2009 12:10 pm

The history of German Sex? Is that anything like the Book of Italian War Heroes? :) –Rory O’Connor

german-sex-app-store

After almost a month of waiting, Apple has finally accepted German Sex into the App Store. Even though I’ve lived in Germany for three years, I still can’t always remember the sex of every noun when I speak. In German, every noun can have one of three genders: masculine (der), feminine (die) or neuter (das). The gender of each noun is rather arbitrary. My program has the two thousand most commonly used nouns and will randomly quiz you on whether a noun is der, die or das.

A while ago, I was chatting with Steve Finkelstein online about how he wanted to find a good way to learn iPhone development and he mentioned that his job was considering sending him to the iPhone bootcamp by the Big Nerd Ranch. I said that looks interesting and then I saw the price tag: $3850. Wow! I said, he could fly over here and stay at my apartment a few weeks and write an application and it would be a whole lot cheaper than that class! I’d teach him for free and in exchange he would write an app I could sell. Steve actually did end up going to the iPhone Bootcamp and said he thought it was a very good course.

So, that put this idea into my head and I remembered that my friend Jesse Alter just graduated and was looking for a job. I said, “Hey, how about you come visit me in Berlin and learn iPhone dev?” At first he thought it was a crazy idea, but then remembered that through one of his credit cards, he would get $400 back from a travel expense. He originally planned to stay a few nights in some stupid hotel, but decided visiting Berlin would be much cooler. He found a flight for $600, so was able to visit Berlin for a few weeks for around $200. Not bad!

When he arrived, we brainstormed what he could write in three weeks and finally settled upon this language training app. Then, we had to come up with a name and we thought of GermanGender, but it was too long to find under an icon on the iPhone home screen. Then we said, “Why not German Sex?” First I thought there’s no way Apple would accept it, but sex is the linguistic term for noun gender in such languages, so I said let’s go for it.

A few days passed and I received the letter I was half-dreading from Apple. Yes, I bet they’re rejecting it because it has “sex” in the name:

Dear Mr. Smith,

Thank you for submitting German Sex to the App Store. We’ve reviewed German Sex and determined that we cannot post this version of your iPhone application to the App Store because it contains objectionable content and is in violation of Section 3.3.12 from the iPhone SDK Agreement which states:

“Applications must not contain any obscene, pornographic, offensive or defamatory content or materials of any kind (text, graphics, images, photographs, etc.), or other content or materials that in Apple’s reasonable judgement may be found objectionable by iPhone or iPod touch users.”

It would be appropriate to replace the sound produced by the app when the user selects a wrong answer.

If you believe that you can make the necessary changes so that German Sex does not violate the iPhone SDK Agreement we encourage you to do so and resubmit it for review.

Regards,
iPhone Developer Program

WTF?! They’re rejecting it because they think the wrong answer sounds like a fart! ROFLMAO! Listen to it for yourself: wrong answer. Well, I decided to change the sound anyway, fixed it, uploaded it and sent the following reply to Apple:

Dear iPhone Developer Program,

I have changed the sound for a wrong answer and have resubmitted. I
was unaware that a gameshow buzzer would be offensive, but I am
willing to comply with your recommendation regarding this resource.

Sincerely yours,
Chuck Smith

Several weeks passed with no word, so I was quite happy to see that it was accepted this morning! So, that’s the story behind German Sex, and the $200 3-week European iPhone development immersion trip that led to its creation.

So, if you’d like German Sex, get it in the App Store.

Interviews and iPhone27 Jan 2009 08:26 am

Today I’m with Mika Letki of ThousandApps.com. First, some Internet history. In 2005, Alex Tew had the original concept of the Million Dollar Homepage where websites would pay $100 to buy a 10×10 icon on a website thus paying $1 per pixel. At the end of the project, he would have a million dollars. Believe it or not, it worked and today Alex is a millionaire. As soon as I heard the domain name of this new project, ThousandApps.com, I immediately had the same idea: The Million Dollar Homepage, but with iPhone app icons. Brilliant!

What inspired you to build this website?

Of course I was inspired by the Million Dollar Homepage. I have to admit I didn’t know about Alex Tew’s story before, but last week a friend of mine told me about it and I immediately started to think how to make something similar, but different.

I called my friend Danilo Yasuno of DYS: Translations because he always has interesting ideas and as soon as I told him “Hey, I want to create something like the Million Dollar Homepage,” he replied “Ok, so create a blank page and fill it with a million iPhone icons. Call it Million Apps or something like that. Oh wait, there are not a million icons yet, so maybe a thousand.”

On Sunday www.thousandapps.com was online and I started to contact potential customers, i.e. iPhone developers.

What has been the general response to it?

Sounds like people are loving it. I got dozens of emails in two days and some of the most strategic places for the icons have already been sold. Some people see Thousand Apps as a really good advertising opportunity, others like a freak piece of art, and to feel like they’re joining this “community”.

I expected people would be interested, but I didn’t know it could happen so soon. I’ve never received more than 20 emails in a day before. I’m having fun. :)

How much does a space cost and when does it expire?

Each space cost 10€ (around US$13) which is a link to its App Store page. It won’t expire. All the icons will be there FOREVER, just like The Milion Dollar Homepage. I’ll take care of this website with Danilo.

So, that means if all spaces are sold, you will have made 10.000€ ($13,000), not bad! How many spaces have you sold so far?

10.000 € wouldn’t be bad since I’m planning to get married soon. :) I sold 20 icons in one day and a person booked 5 places for his upcoming apps. I had to invent a “SOLD” icon for this reason.

Sounds like a good start indeed. Thanks for the interview and I wish you the best!

Thank you Chuck, congratulations for the good place you’ve chosen for your app and I wish you all the best as well. [Editor's note: check the very bottom left corner of the Thousand Apps page.]

Conferences and Interviews and iPhone08 Jan 2009 08:41 am

Today, I’m proud to have John Wilker and Tom Ortega with me about the 360|iDev conference taking place in San Jose on Mar 2-4. They boast it to be the largest iPhone conference in the world, so I thought I had to investigate a bit more and I ended up being accepted as a speaker. So, without further ado, let’s get started.

What gave you the idea to start 360|iDev?

John: We want to do conferences we’d attend, that’s what lead us to 360|Flex for Adobe Flex developers, and now both of us are dabbling (hoping to one day have a conference tool) in iPhone Dev, so we had a light bulb moment that there wasn’t really an event for iPhone devs. Apple’s conference is HUGE and across all their tools and platforms, why not offer iPhone devs their own community?

Tom: I really want to be one of the cool kids and program on this wonderful new device. ;) Seriously though, we started 360|Flex, our other show, so there could be a better place to learn how to program in Flex. We saw the same need for iPhone development and thus here we are, planning a new conference.

Why attend iDev instead of WWDC?

Tom: 2 huge reasons:

Cost – If you buy a ticket to our show early, it’s only $200 USD. Even if you wait til the end, the price caps at $499 USD. That price includes most if not all your food for the 3 days of the conference. That and we have a group hotel rate of $129 a night near the conference center.

Content – If all you care about is the iPhone/iPod Touch, then this is the show for you. It is 100% about that and nothing else. It won’t be a matter of “Is there anything of interest for me today?” but rather more of “There’s too much goodness for me today. Which one do I go for?”

John: WWDC is Apple’s main stage, and a great event (I presume, having never attended), but all main stage events, focus on all products and platforms. An iPhone developer may have little interest in other technologies, yet they’re there, as are those people who use them. An attendee at our Flex Conference pointed out that Adobe MAX (similar to WWDC) is 4000+ people, but the guy next to you at lunch, might be an Illustrator designer, or a PDF person, or who knows what, but at 360|Flex, the whole table will be peers in Flex development. That’s the goal with 360|iDev, to give the iPhone developer community a place to come together, swap stories, tricks, lessons learned, etc.

What is your target audience? Is your conference geared more toward developers or businessmen?

John: Developers. We say that our events are by developers, for developers. That’s not to say there won’t be business folks, they’re a large part of any developer community really. They pay the bills usually, they’re clients, owners, idea folks, etc. We hope to bring both groups together in a way that has benefit to both, indie devs can find clients or full time work. Business people can find developers.

Tom: Traditionally, we do get more developers. Most of the sessions are technical in nature. However, we do have a business side of iPhone App development. That is aimed 100% at the businessmen, so there will be topics for both crowds.

On that note, if someone is interested in speaking, which track needs the most contributions? Is there any particular topic that you’re surprised no one has taken up yet?

John: Game dev. For as much noise as Apple has been making about the games on the iPhone, I thought there’d be a lot of people interested in sharing what they’ve learned about developing games for the iPhone.

Tom: Currently, the gambit is wide open. The topic I was most interested
in learning about was Open GL ES. I was suprised no one had offered to speak on that, but just today we got a submission on that topic. :)

Great, I’ve been struggling lately with learning OpenGL ES, so I’ll definitely attend that talk! So, besides the conference, what else does San Jose have to offer that might attract people to attend?

John: The Winchester Mystery House is a fun time. It’s about an hour or less from San Francisco, so that’s always a huge plus! Plus all the startups in the area, you can’t get in but you can drive by. Heck Apple is there!

Tom: It’s Silicon Valley! If you love the iPhone and are trying to develop for it, you’re probably a nerd. The headquarters of Apple, Intel, nVidia, AMD, Google, Yahoo, and, of course, eBay are all here. For me, there’s something cool about being able to see all those companies. Take a gander at where the magic happens. I’ve been known to serve as a tour guide late at night, during a In-N-Out burger run. If you’ve never had an In-N-Out double-double cheeseburger, that’s reason enough to come.

Ah yes, I’ve heard about the famous In-N-Out burgers, but being an east coast boy, I never had the chance to try them out for myself. So enough about food… for those of us flying in, will 360|iDev be in the middle of nowhere or are there public transportation options available?

John: We hate the middle of nowhere! We aim for hub cities or at least one along a major travel path. From San Jose airport, there’s a shuttle bus that drops off across the street from the hotel, and from the hotel to the conference, there’s light rail. The Hotel is half a mile (Editor’s note for non-Americans: that would be a kilometer) or one stop from the conference.

Tom: That same light rail will take you to downtown. The conference is at eBay’s HQ, which is in an office park area. However, downtown is only a few miles away.

Besides iDev, what are some other conferences you run?

John: We’ve been doing 360|Flex for 2 years now, 7 events in all, including Europe. We really try to focus on making the event a big success with our attendees before even thinking about splitting our attention. Each event is very different as we work to refine what worked and what didn’t, etc. If anyone is curious about our reputation, etc do a google search for 360|Flex (or 360flex, flex 360, we seem to have an easily confused name, LOL) to see what our attendees are saying.

Thank you very much for the interview and I look forward to seeing you there!

John: For sure! Can’t wait to see everyone in San Jose!

Tom: Thanks for the interview. It’s been really fun!

« Previous PageNext Page »