Apr 30, 2009

iPhone - provision and cert

Just a quick note if you have the same issues like I had.

After you finished debugging in your simulator, it is time for you to deploy on your device. You must have a developer ID and cert before you can do that. More details please read the official document. But even you followed every steps in the guide, you might be encounting some errors. I solved that by manually open the Info.plist with vim, then modify key "CFBundleIdentifier" to what is in your provision file. Save it, launch XCode. Then you should be good.

Another issue I had was if you get someone's Xcode project, and the owner happened deployed it to his/her devices, you will failed to deploy it to your device. To fix this, you have to do it in a terminal, open the project_home/project.xcodeproj/project.pbxproj. Search for "PROVISIONING_PROFILE...", then replace it with your profile identifier in the Organizer.

Apr 24, 2009

Developing Apps on iPhone

In the past two weeks I was extremely busy - I am diving into iPhone program development! I have a shopping list. I even bought a brand new iPhone 3G (Without the AT&T contract) from Apple local store.

So, let's go programing, baby!

Apr 10, 2009

Get all controllers and actions in Merb

When I was implementing our home-grown authorization system, I have to know what controllers are available, for the given controller, what actions are available. This shouldn't difficult using reflection within Ruby. But after reading the source code of Merb, I found it is dead simple to get what you want:

- Application.subclasses_list
- YourController.callable_actions

Here is the code in my Role modle:

Apr 4, 2009

Daycare

April 1 was the first day of my baby girl in a daycare center. Since that daycare center is supposed to be the best in town, I've been on the waiting list for really a long time, even before she was born. I was expecting some difficulties, both physical and emotional, but I've never thought it was that hard.

The beginning in the morning wasn't that pleasure. For the first time I know my baby girl is that loud, she cried really hard and not letting her mom go. We sneaked into the private room, which has a one-way window on the wall, so we can watch her, even can listen to her with the help of headphone. No teacher can calm her down. So the mom had to get into the classroom...

Then the next day, she seems to be OK in the morning, but just before the end of the day, the teacher called, my baby girl caught a fever - 101.3F. Then in the next two days we have to fight with the fever. Today, I even had to bring her to ER...

She is totally fine now. As the first time parents, my wife and I really enjoy this whole new experience. We've learned a lot, and we are continuing the process, it is like perusing another Ph. D again, only the experience is much better.

Here is what we learned from the daycare:

1. Your kid will like there, the daycare is like a Toys R Us opened in a small school.
2. Your kid will grow strong, the daycare is like a germ camp.