Monday, December 7, 2009

New Projects.

I have to projects in the pipeline. One is a dictionary/study app. The other is an organizer app. Not going to go into details, because I don't want any one to rip off my idea. Though my ideas are inspired from others. Been having fun with sqlite3 and searches. Too slow. And fun incorporating Google's Data API into the app. Should work nicely when done. Just need to find time to work. I have plans to do a lot during the upcoming Spring festival vacation. Will have ~4-5 weeks rest/free time. Hope to post more then.

Also need to renew my iPhone App Dev membership. Have I even recouped the first time yet? Maybe not quite...

Hope to have some more too post soon.

I'm starting to think I am not really much of a blogger!

Wednesday, March 25, 2009

Uploaded, Approved and ready for sale!

The title pretty much says it all! On March 18 (Beijing time) I jumped through all the necessary hoops and uploaded my app using itunesconnect. It was pretty easy. I was abit worried about how long it would take to be approved but it turned out to be just under 7 days. (6 days, 20 hours or so)

Clicking the above pic will take you to iTunes! Over all the hardest part has been teaching myself programming in Objective-C. But it has been very fulling. So far I have give out one Promo Code and supposed 2 have bought it. I already have a few ideas for upgrades and future versions. Namely integration with Facebook Connect and news feeds. my goal is to integrate that by April 17th.

Well I hope a few people find it interesting and mildly entertaining. (By few I mean several 10's of thousands!)

Wednesday, March 11, 2009

Busy-ness & Business.

Been having a lot of free time lately. Putting polishing touches on the game. Oh, I can now tell you it is a game. Also been learning about and using NSNotificationCenter as well as AVAudioPlayer. Objective-C programming itself is becoming much much easier. I guess you could say I am becoming more and more fluent. I was having an NSTimer issue awhile back. Turns out, after the timer would fire it would been dealloc'ed. And so I was unable to call [timer isValid] or [timer invalidate] on it, because it was no longer available. Adding a "retain" in the right place and all is well. NSNotificationCenter is pretty great and useful as well. And easy to use once I figured it out.

The difficult part lately has been music. Not using it in the game, but making it. The choices are buying royalty-free stuff or making my own. I opted for the cheap choice! So I've been playing composer this week! Yikes!

But the bulk is done. Time for testing (and refining). Bundling. Documenting. Signing. Zipping. Uploading then selling.

Thursday, February 19, 2009


I've found NSTimers to be pretty useful. Good for timing a game level or setting a timeout for a particular action. Though the first time around I was getting some funky run-time errors. Had to do with how the timer is retained. I was trying to use a [myTimer isValid] as a condition in an if statement. Well after it expires it seems to go back to the ether, and was causing an error. I changed the structure to have a the Timers method set a flag which was then checked in my control statements. Problem solved.

Converting an int into a NSString is mildly problematic. Easy to deal with. Using a unichar pointer and pixie dust.

I've started to realize that this project is actually coming together into some sort of actual game. Which leads me to a problem. Music. I need music during game play, right? So I guess it will be a good opportunity to play with Garageband. 'Cuz, you know it's free, and I need some royalty-free muzac!

Need to start on dealing with levels. And handle the on screen clock... leading us, most likely, back to the topic of NSTimers...

Sunday, February 8, 2009


Played with Core Animation today for about an hour or so. Managed to add a little bit. This addition gives the user feedback as whether there touch was successful. Very easy to do.

[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.40];
CGAffineTransform transform = CGAffineTransformMakeScale(1.5, 1.5);
bananaView.transform = transform;
bananaView.alpha = 0.0;
[UIView commitAnimations];

How it works. beginAnimations starts the animation block. you can guess what setAnimationDuration does. CGAffineTransformMakeScale basic sets the end product for how you want the View scaled, in this case 150% of original size. You then assign the transform to the View, and set the final alpha. Then finally commitAnimations. The overall effect is that in .4 seconds the View grows to 150% and fades to invisible.

Very interesting and very easy. Will play with it more.

Friday, February 6, 2009

UIAlertViewDelegate & Quotes

Was able to bang out UIAlertViewDelegate aspect. Now the user is gets an alert when they try to reset the counts. Basically asking for a confirmation/cancellation. This was really easy. You just extend your ViewController, define your alertView method and you're done.

This calls and opens the Alert popup window!

UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Your title here"
message:@"Your message here!"
otherButtonTitles:@"Yes, Reset!", nil];
[alert show];
[alert release];

This is the method where you define what happens when the user presses "Ok"

- (void)alertView:(UIAlertView *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
if(buttonIndex == 1){ // 1 corresponds to the "ok" button!
// stuff here!

After that I added in a rudimentary quote handler. At first I kept getting a null object when I was reading the text file into the array. Then I realized my calls were looking in the Documents folder rather than in the App's bundle which is where the source file would be located. Fixed that. Now it works. I currently just have it cycling through the quotes once per poke. and using the modulus operator to cycle back to the beginning. I will make this more complicated later, so it doesn't just spit out the quote every time. I still haven't decided betwee random or regular intervals.

Monday, February 2, 2009

UIView beginAnimations c*ck block.

Well, it seems the problem I was having the other day was that I was calling my function from within a beginAnimations block. Naughty Mitch. But also naughty documentation. I have learned something new once again. My MainView and FlipsideView are playing nicely together now.

I have also add a reset count buttons to flipside statistics side, in case the user wishes to reset counts.

I have started to add the quotes window, using a UIWebView. The close window method is done and working and I need only add the quotes and decide on how often to show a quote. I can't decide between set number or random periodicity. Will abstract the code and try both.

Ordered an iPod Touch 16gb for testing. It's not an iPhone but, I have two reasons for waiting; A) new iPhone probably in June or July, B) don't really need a new cell phone right now.

Friday, January 30, 2009

NSMutableArrays & Switch Statements

So I tidied up all the array code. Made some of the code more modular and switched to NSMutableArrays. Most of it went smoothly. I tend to work for an hour or two in the morning and an hour or so at night. This all depends on whether I have freshly downloaded American TV Goodness waiting to be watched.

On a side note, I forgot the syntax for "switch" statements in C-like languages. It felt like a doh moment. But it is past and reinforced back into the ole gray matter.

I have one problem involving two ViewControllers talking properly to each other. But I think it has to do with connects. I'll check in IB tomorrow.

Good night all!

Thursday, January 29, 2009


I have made quite a bit of progress in the past hour on initializing from and writing to files with NSArrays. And by progress, I mean I can actually do it now. I am current recreating an Array each time I increment one for the counters. I know this is a horrible kludge, but it is a baby step. I will switch to MSMutableArrays and hopefully tidy things up abit.

I have a name for the app finally. Which I won't mention here.

Also, I finally broke down and bought into the ipone dev program. I have not yet figured on a way of testing as I have neither an iPhone or iPod Touch device. But I am sure I can find a "lucky" friend.

A few things first...

First, I hope to explain some of my thoughts, ideas and things I have learned while developing for the iPhone OS. I hope I can share learn from your comments as well as teach a few things along the way!

Second, why "sells chicken"? Well living in china I like most westerners have acquired a Chinese name. In my case "麦吉" which is phonetically equal to "买鸡" which means "to sell/Sells Chicken". It got translated back into English and so now, one of my English nicknames is "Sells Chicken."

Finally, I am sure I will make mistakes along the way, but hopefully I will make a little money in the process, probably making silly, non-productive programs.