Saturday, January 30, 2010

Citizen Reporter Plug-in for TapLynx

[Update 3/16/2010: I'm sorry, I had the comment notifications going to a bad email address, so I missed the comments that were made. I've corrected the problem and will now make some changes and updates to the plug in]

In addition to being a really easy framework to use to make an iPhone app, TapLynx lets you extend the framework by adding your own view controllers. I've created a little view controller that lets a TapLynx app offer the user a quick way to snap a photo and then email it to someone without ever leaving the TapLynx based application.

If you ever want to create an RSS based application you should definitely check out the TapLynx framework. The framework is designed to be used by people with limited coding experience and is controlled by making configuration changes to a .plist file. If you have a list of RSS feeds and a couple of images, you can have an app compiled and ready to submit to the App store in under an hour. Really.

The Citizen Reporter plug in simply presents the user with a screen that looks like the one in this screen shot.
I made the view in Interface Builder so that you can have a GUI way to change the look and the language. Please feel free to use this or to encourage me
to make changes and fixes. Also, if you have questions on the code, I'm happy to answer and explain what I've done. You can modify the colors and such on the .xib to fit your scheme better, I don't think it will break anything unless you delete one of the buttons or the little thumbnail I added.

TapLynx can work with any view controller as long as the view controller is more or less self contained and as long as the view controller uses an init method like this one:

#pragma mark Initialize for TapLynx

-(id)initWithTabInfo:(NSDictionary *)tabInfo topLevelTab:(NSDictionary *)topLevelTab {

return [self initWithNibName:nil bundle:nil];

}

You hook the view controller to the main TapLynx project by adding a regular tab entry to the NGConfig.plist. Here is a screen shot of how I added a view controller called "CitizenReporterReporterViewController" and a little camera.png file to use on the tab.


The ViewController itself is just calling the image picker and the email composer that are already built into the iPhone OS 3. The view controller is already configured to sit within
TapLynx as one of the tabs. When the user goes to that tab, it asks
them to first get a picture from their camera or photo album and then
email the picture to an address you choose with an option for them to
add a note. It leverages the build in Image Picker and Mail Composer
controllers in iPhone OS3. I know that it would be more professional to actually have some server side thing to get the picture, but I figured this is a good first step. Besides, there are millions of server configurations and TapLynx is aimed a people who don't necessarily have servers to store the photos and messages.

There is one place in the code where you need to make some changes. I went ahead and moved the strings you will need for the "to", "subject" and "body" parts of the email into some string constants. At the top of the CitizenReporterViewController.m file you will want to change the string to be something more meaningful (and the email address to be the email address where you want the pictures to be sent).

#pragma mark Constants

static NSString * const kSendTo = @"theaddress@mycompany.com";

static NSString * const kSubject = @"Subject of the Email";

static NSString * const kBody = @"Body of the Email";


Find the code shown above and make your changes. It is important to ensure that the at sign and the quote marks stay where they are and that you just change what's in the middle.

The zip Archive contains 3 files, you need to add the CitizenReporterViewController.h, .m and .xib to your project. Additionally, you will need to configure the NGConfig in your project
to have a new tab with a Title, ShortTitle, TabImageName and a customViewControllerClass entry. The customViewControllerClass should be a String and it's value should be CitizenReporterViewController. The files can be in any part of the XCode project file structure, but Classes, Other Resources, Resources are probably the most common. I wouldn't put them in Frameworks or somewhere like that. The archive is stored at the Tyree.apps website and you can get it from this link.

Thursday, January 28, 2010

Carter's Coin Flip Version 1.6 Submitted to the App Store

Carter's Coin Flip version 1.6 includes a Belgian 5 Franc coin, a French 1 Franc coin and a Canadian 25 cent coin. My wife says that we should look for a Canadian coin she called a "Looney" since that is more Canadian somehow. I was working with a Canadian two dollar coin but it was too worn and I couldn't get a good photograph of it. I've also translated the interface into French and written some French language copy for the France App store. I have to thank Nicole Washington for helping me make sure the French isn't just a transliteration. The Belgian coin is in her honor.

I'm also planning to record a spot for the Today in iPhone podcast. They are having a contest where developers can talk about their apps for 60 seconds. This seems like a good venue for TyreeApps.com since we're a family affair and not as polished as some of those other companies. I've never recorded a commercial so I'm obsessing a little too much about what to say and whether I have a voice for podcasting. I think I should just suck it up and do it.

Thursday, January 21, 2010

TapLynx Plug In

It's amazing how much work gets done when you can't sleep.

I've been working on a plug-in for the TapLynx framework. It's almost done. I'll post code snippets and a link to the files as soon as it's finished.