Category Archives: Iphone

Google Objective-C coding standard

I am not sure what coding standard you follow, but I usually follow the Objective-C coding standard of Google for code formatting:

Spacing And Formatting

Spaces vs. Tabs

Use only spaces, and indent 2 spaces at a time.
Line Length

Each line of text in your code should try to be at most 80 characters long.
Method Declarations and Definitions

One space should be used between the - or + and the return type, and no spacing in the parameter list except between parameters.
Method Invocations

Method invocations should be formatted much like method declarations. When there’s a choice of formatting styles, follow the convention already used in a given source file.
@public and @private

The @public and @private access modifiers should be indented by 1 space.
Exceptions

Format exceptions with each @ label on its own line and a space between the @ label and the opening brace ({), as well as between the @catch and the caught object declaration.
Protocols

There should not be a space between the type identifier and the name of the protocol encased in angle brackets.
Blocks

Blocks are preferred to the target-selector pattern when creating callbacks, as it makes code easier to read. Code inside blocks should be indented four spaces.

Me in RMIT and Vietnamese Newspaper

You can read the Vietnamese version here



Many software engineers and IT professionals dream of developing a ‘killer App’ for popular products like the iPhone, which will make them rich. Other people dream of one day having a book published.


Not many achieve either – and even fewer do so in their early 20s. But Vo Duy Khang (formerly student 3184092), an alumnus of RMIT Vietnam’s Bachelor of Information Technology program, has hit the jackpot with success in both of these areas – and now has the makings of a successful business spanning both Vietnam and Australia.


Khang graduated from RMIT Vietnam in November 2010 and travelled to Adelaide, Australia, where he is now completing a Master of Information Technology with Carnegie Mellon University, under a full scholarship.


With the benefit of the scholarship, Khang has been freed up to apply his own financial resources fully to get a small business off the ground while he also continues his studies.


His hard work and talent have been recognised by US publisher Apress, which has just decided to publish a book by Khang on how to build better iPhone applications. Khang’s book, Pro iOS Apps Performance Optimization, fills a need in the market for more practical guidance in this booming area of consumer technology.


Khang’s creativity and expertise has also been applied to a new business start-up in this field which already has five people on staff in Australia. Khang has been visiting Vietnam in the past month seeking further talent from Vietnam to join his operation.


Almost all his development team to date are RMIT students or graduates.


“They speak English well, and they all have a good understanding of what is needed,” Khang says.


According to Khang, the basis of a good user experience of any iPhone or iPad App is good performance. There is enormous potential in helping social networking applications such as Facebook to provide a better user experience by moving data in a quicker and smarter way over the net.


Apress has been impressed by his thinking in this area, as shown on his own website and as shared amongst the online community overseas.


One of Khang’s mentors has been Barend Scholtus, Academic Services Manager for the Bachelor of IT program, and the two continue to discuss shared interests regularly.


“We hope – in fact we are pretty sure – that Khang’s learning experiences at RMIT Vietnam have made contributions to his achievements to date, and we hope the best is yet to come.”



 





Khang (sitting) sharing knowledge with friends in Barcamp 2011


 


Khang’s book on Amazon: http://www.amazon.com/Apps-Performance-Optimization-Professional-Apress/dp/1430237171/ref=sr_1_1?ie=UTF8&qid=1321662306&sr=8-1


Facebook page: http://www.facebook.com/vodkhang
Contact info: Phone +61 478146872 
Email: vodkhang@gmail.com


 

iOS Readability Parser

Hearie - News Aloud

Hearie - News Aloud

 

 

I have just released part of my source code in the Hearie project to be open source, this project will do the html readability parsing by objective-C. It still has some issues over threading, performance and may not work with all sites.

Feel free to use it and contact me if you have any issues

 

Hearie gets rid of distractions in webpages. Also, a high quality voice reads the content for you.

How many times have you complained your iPhone screen is too small to read? Hearie removes all useless contents including advertisments, links and more. Open your Safari, go to New York Times, tap our button and enjoy.

Hearie reads the content for you with human voice. Free your hands and eyes. Plug in your earphones and hear the content.

Installing App with iPhone Configuration Utility

iPhone Configuration Utility

iPhone Configuration Utility

 

I always have problems finding a good tutorial for my customers whenever I send them the adhoc app for testing, so I write this post to have a basic place for me and everybody else to send to their beta tester/customer without touching to iTunes with the crazy syncing process. This can be good for JailBreak iPhone as well but this is another story.

 

1/ Download iPhone Configuration Utility.

You can download the iPhone Configuration Utility for Windows here, and for Mac here.

2/ Plugin and find your device

You can find your device easily, and then choose add button as shown in the red box

iPhone Configuration Utility - Device

Show Devices in iPhone Configuration Utility

3/ Select your app

Open Your File Browser and select the file you need, in this case is JobFinder.app

iPhone Configuration Utility - SelectFile

Select Application File

4/ Go back to device and open the Applications Tab

iPhone Configuration Utility - Applications

Applications Tab

5/ Installing the app in

iPhone Configuration Utility - Install Applications

Install Applications

 

New Twitter XAuth and Sharing on iPhone

This Twitter sharing library for iPhone has a great User Interface, comparing to my current library for Twitter Sharing, the only problem is that it does not work with new XAuth project. So, I decided to take that UI and merge into my existing codebase for twitter xauth and sharing. The new library allow you to login, share and logout

https://github.com/vodkhang/Twitter-XAuth-and-Sharing

And here is the result. It looks great and really like the UIAlertView in iPhone

Login To Twitter with iPhone

Login To Twitter

Share on Twitter

Share on Twitter

 

 

 

 

 

 

 

 

 

 

 

 

http://amanpages.com/sample-iphone-example-project/multiple-login-for-twitteragent/

My book: Community and Opportunities


My iPhone Book

My iPhone Book

I am happy to announce that I encountered a book contract with Apress to write about iphone development. This will be a great opportunity and new experience for me when I have never written a real book before.

That is just part of the main content of this blog, I want to share my own thought over community support (as I already said at this blog post about Community Support) and how it would help me to reach this kind of opportunities. An Apress staff contacted me after he read my blog series about iphone development. This helps me to restate again that if you do good thing for other people, chance will come back. Real chance, real value, not an artificial reputation.

Supporting community and make lives better is my personal long-term goal as well as my company’s long-term goal.

 

Advertising:

Visit vworker to hire best employees

Applyzer – more statistics for iPhone Apps

Review example Review example

 

Just a quick note and introduction over Applyzer : a website that gather all reviews from all countries and rankings of your app in those countries. This is a good thing because iTune does not allow you to view all reviews at the same time and switching the country is so painful that nobody will ever do it. The ranking is also good that let you decide to focus on some countries rather than others if your app requires a little bit localization

 

Windows Phone 7 v.s iPhone Presentation in Barcampsaigon

Windows Phone 7 and iPhone Presentation

Windows Phone 7 and iPhone Presentation

Here is my presentation with Nghia Dang on the topic comparing the differences between Windows Phone 7 and iPhone Development. I share it here for others who cannot come. Contact me (vodkhang@gmail.com) or Nghia (nghiadang@kms-technology.com) if you have any questions:

Kms-Technology

iPhone Code Generation – Property

This is my new generation script, mainly copied from here with some improvements to meet my needs:

XCode Code Generation

XCode Code Generation

- Change the dealloc to [self.variable release] instead of [self.variable dealloc];

- Change the @outlet variable to check for the “UI” prefix rather than letting it put IBOutlet everywhere or I have to use 2 scripts at the same time.
- Add some of my own into the assign list

The second one is not a perfect solution for IBOutlet but considering that it doesn’t harm much except let some annoying IBOutlet out.

Twitter: XAuth + Sharing

DDSocialDialog for Twitter

DDSocialDialog for Twitter

Showing a place for logging and sharing a tweet in Twitter with my new library. You now can use XAuth without even understanding about how it works and you also have a nice facebook-style pop up.

For details about XAuth and how to use the XAuth functions, you can follow this link: Aralbalkan’s blog and his feather apps.

For showing a Twitter Pop up Dialog, I appreciate the effort of DDSocialDialog and the quick image is like in the left hand image.

I hope that this will help other iphone developers and me to cut their time and efforts to redo this dialog again and again.