Archive for the ‘Objective-C’ Category
Windows Phone Potential?
I normally hear from Windows developer to say that their Windows market share is much bigger than the total of iOS and Android together. And the sales of Windows 8 has bypassed all the sales of iOS and Android from the beginning to now.
It is quite unfair to compare the whole Windows 8 with iOS or Android. And if we do take that demand into PCs and laptops, then why the hell we do not compare the supply side? It is very clear that if Windows 8 could be a shared platform between PCs, tablets and phones, then all the old software, all the old games would have beome compatible to the Windows 8 system in the short amount of time. And many apps for tablets and phones would be quite different than the ones in PC. No, I don’t mean technology, I am talking about the business model, the purpose of the software.
I don’t mean that iOS and Android is a better market than Windows Phone for indie business. These markets have become very competitive and continue being so. You either have to figure out a market niche or be very lucky.
iPhone v.s Android
The smartphone game is over. The tablet game will be finished soon, within 2 years.
Android wins, iPhone loses. 75% v.s 15%, soon will become 85% v.s 5%. But that doesn’t matter much for Apple. Apple is a brand for high-end products. They don’t aim to gain all market share. To gain market share, Apple has to attack more of the low-end market, which means they have to lower their price. However, matching other supplier’s price may be harmful for Apple’s brand, although they may achieve it by more efficient supply chain and factories. To become a high-end brand, Apple spends a significant amount of money on their brand and will not scarify it for the market share.
But in this ecosystem war, the bigger ecosystem leads to a win by monopoly. When 75, 80 or 85% of the market is using Android, app developers will flock to there, and make the ecosystem become much more valuable for customer. To continue earning a lot of money, Apple has to continue what it has done best under Steve Jobs’s empire. New product, new market, new value, or new software that people are willing to purchase with high-price.
What will be the next Apple’s product? Probably Apple TV, I am not even sure about that.
And the important questions for most of us, as app developers, what should we do? Should we all move to Android yet, should we change our strategy of iOS first, Android second? Or should we start discussing about Mobile Web App?
I am writing more on the Mobile Web App v.s Mobile Native App in the next post, catch it soon.
Suggested Frameworks for iOS
Here are some suggested frameworks for iOS development, since I have used all of them quite a lot. I think they are good frameworks/libraries that you may need to know. It could save you a good amount of time in researching and reinventing the wheel.
List of Frameworks/Code Snippets for Objective-C:
CorePlot : Core Plot is a plotting framework for OS X and iOS. It provides 2D visualization of data, and is tightly integrated with Apple technologies like Core Animation, Core Data, and Cocoa Bindings.
CocoaHTTPServer is a small, lightweight, embeddable HTTP server for Mac OS X or iOS applications.
Sometimes developers need an embedded HTTP server in their app. Perhaps it’s a server application with remote monitoring. Or perhaps it’s a desktop application using HTTP for the communication backend. Or perhaps it’s an iOS app providing over-the-air access to documents. Whatever your reason, CocoaHTTPServer can get the job done. It provides:
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
- or + and the return type, and no spacing in the parameter list except between parameters.@public and @private access modifiers should be indented by 1 space.@ 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.My New Book – 21 years old achievement
21 years old, I got my first book released, I was so excited. Buy it here
Today’s iPhone and iPad apps developers are often running into the need to refine, improve and optimize their apps performances. As more complex apps can be created, it is even more important for developers to deal with this critical issue.
Pro iOS Apps Performance Tuning and Optimization covers many common but difficult problems when tuning and optimizing performance for iPhone and iPad apps and how to resolve these problems efficiently. This book gives you the following:
- Basic knowledge on common problems in iPhone apps
- Advanced knowledge over data structure, algorithms, multithreading, and network data in iPhone apps
- Comparison with problems and solutions for Android and Windows Phone apps
After reading this must-have book, you’ll be ready to make the most of the processing power of the iPhone with your apps performance optimization know-how.
What you’ll learn
- Benchmark your apps using emulators and real device tests
- Increase and optimize UITableView performance in your iOS apps
- Increase your app performance using image and data caching techniques
- Tune your apps using algorithms and data structures
- Improve your parallel data access using multithreading techniques
- Optimize memory usage for increased battery life and better apps performance
- Use native C code to address memory leaks or EXEC_BAD_ACCESS
Installing App with 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
3/ Select your app
Open Your File Browser and select the file you need, in this case is JobFinder.app
4/ Go back to device and open the Applications Tab
5/ Installing the app in
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
http://amanpages.com/sample-iphone-example-project/multiple-login-for-twitteragent/
Windows Phone 7 v.s iPhone Presentation in Barcampsaigon
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:
- 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
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.












