Xin is an iPhone developer. His wife Olivia and he are enjoying inspirations in their OLIVIDA Studio.
- Adium
- Anime
- Apple
- App Store
- Beginning
- Beta
- cocos2d
- Code
- Code Geass
- Cydia
- Design
- Example
- FAQ
- Games
- Gomoku
- Hangzhou
- Interface Builder
- iPhone
- iPhone Developer Program
- Jabber
- Java
- Live
- MacBook Pro
- Nonsense
- NSString
- nVIDIA
- Performance
- Smack
- SQLite
- Themes
- Thinking
- Trip
- Tutorial
- UIActionSheet
- UIImageView
- UITableView
- UITableViewCell
- UIView
- UIViewController
- V2EX
- Video
- WordPress
- Xcode
- XMPP
Every iPhone developer cares about their data on iTunes Connect, but Apple just made a very catastrophic offer. Don’t be fooled by the beautiful trending up icons on iTunes Connect page, all you can get from it are just plain CSV files. But it also leaves opportunities for 3rd party developers to innovate on visualizing these CSV files.
AppViz
![]()
Price: $29.95, 30-day free trial
Download: http://www.ideaswarm.com/products/appviz/
This Mac application can download all your sales data (including historical), and render them into beautiful and readable charts. And you can check your app’s User Reviews from all countries in one place. Not all options on the market are able to fetch historical data, I’m really wondering how they did it. It’s absolutely worth $29.99.
AppStore Sales
Price: $19.95, 14-day free trial
Download: http://positiveteam.com/
If you search for AppStore Sales in Google, you’ll barely find this application, this name is just too general. But actually this app can download your recent data from iTunes Connect, and turns out very nice charts. Its UI design is sleek and native, it can render your sales number on a world map, really nice feature. Though you can import CSV files on your HDD to render historical numbers, AppStore Sales 1.6.2 is unable to fetch historical data, so AppViz is a clear win on this important feature.
Both applications provide powerful ranking charts, while AppViz can download more detailed data from APPlyzer.com, which is a non-free service, but you can check if your app is in top 1000 in any category or country.
Got my copy of Uncharted 2: Among Thieves at the moment, been playing it for days. This is a must have for all PlayStation 3 owners, I have never seen such a sharp and rich graphic on PS3, much better than my favorite game Resident Evil 5. If you got 10000 points in the game, you can unlock a bonus movie titled Mastering the Cell Processor to tell you how they achieve such a great graphic, finally they use a lot SPU to do various stuff!
These days I’m working on a better implementation of AI for my game Gomoku, and found that when performing pure math & logic calculations, iPhone simulator is vastly faster than real device, maybe 10x times! I implemented a new way to calculate next move for computer in the board name, it took few seconds to calculate inside simulator, but more than 30 seconds on real device. Interesting. I need to put more work on my algorithm, definitely!
If you’re going to create your own iPhone games, with help from a good game engine, your life will be much easier, and you’ll be able to focus on executing your ideas, not the low-level details involving too much math and OpenGL.
cocos2d for iPhone

This is an open source 2D game engine imported from its original Python implementation. The API is organized in several easy-to-understand OOP concepts: Director, Scene, Layer and Sprite. It also sports two powerful 2D physics engine: Chipmunk and Box2d. The full feature list can be found here:
http://www.cocos2d-iphone.org/wiki/doku.php/prog_guide:index
OGRE

OGRE is a famous open source 3D game engine, now it being ported to iPhone.
Unity iPhone
Unity is a commercial iPhone game development environment, it has got everything you’ll need for developing a 3D game. The only problem is the licensing price is too high, the combination of Unity Pro and iPhone Advanced could cost you $1499 + $1499. It’s quite a lot.
Unity feature list can be found here:
http://unity3d.com/unity/whats-new/iphone-1.5
Oolong Engine
Oolong Engine is a new open source 3D game engine, it has built-in support for Bullet Physics SDK, which is also open sourced and being supported by AMD recently.
After upgraded to Snow Leopard, the first thing I noticed is that my MacPorts installation stopped working. It’s due to the architecture change, since almost everything in Snow Leopard now shifts to 64-bit, old 32-bit MacPorts is no longer working.
My local web development depends on MacPorts, I use MacPorts to install Apache 2.2 and compile my own PHP 5.3 since I need some special PHP modules. When I’m going to compile PHP 5.3 under 10.6, I got this at last stage:
Undefined symbols:
"_res_9_dn_expand", referenced from:
_php_parserr in dns.o
_php_parserr in dns.o
_php_parserr in dns.o
_php_parserr in dns.o
_php_parserr in dns.o
_php_parserr in dns.o
_php_parserr in dns.o
_zif_dns_get_mx in dns.o
"_res_9_search", referenced from:
_zif_dns_check_record in dns.o
_zif_dns_get_record in dns.o
_zif_dns_get_mx in dns.o
"_res_9_init", referenced from:
_zif_dns_check_record in dns.o
_zif_dns_get_record in dns.o
_zif_dns_get_mx in dns.o
"_res_9_dn_skipname", referenced from:
_zif_dns_get_record in dns.o
_zif_dns_get_mx in dns.o
_zif_dns_get_mx in dns.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [libs/libphp5.bundle] Error 1
After some Google I found it’s fixed if you add this line in EXTRA_LIBS in Makefile:
-lresolv
I guess it’s a bug in PHP 5.3 branch. And another thing you’ll need to care is to replace your MySQL installation with a 64-bit one. Then everything is with 64-bit super force. :)

I’ve been following this open source project for quite a long time, for those who don’t know what it is, it’s a very powerful framework for developing hardware accelerated 2D iPhone games. You can learn more at http://www.cocos2d-iphone.org/.
The latest release even comes with a tile map editor and a decent physics engine known as Box2D.
This post contains Chinese characters, it may not be displayed properly without Chinese fonts installed.

V2EX.com 这个域名是在 2007 年的 9 月中,变成一个 GFW 关键字的。从那个时候开始,如果一个中国的互联网用户访问的国外网站在 URL 中包含 V2EX.com 这个字符串的话,那么和这个网站的链接就会断开。此外,当时 V2EX.com 所在的服务器的 IP 地址,也被 GFW 封锁。
作为 V2EX 网站的制作者,我当时感到莫名其妙,也感到愤怒和失望,各种各样的情绪都有。
V2EX 最早是作为我的开源软件 Project Babel 的实际运行演示而出现的。出现之后,喜欢这个网站和这个程序的网友越来越多,于是我也在众多网友的支持下,陆续地开发了这个开源软件的后续版本。
封锁事件在我看来,所带来的最大的打击是用户体验上的打击。当用户欢欣鼓舞地在浏览器地址栏敲入 V2EX.com 并按下回车时,看到的却是“链接被重置”,“你要访问的网站的链接已断开”,“Connection Reset”,然后用户又试了几次,结果依旧。然后用户到搜索引擎输入 V2EX.com 想看看发生了什么事,却发现连访问搜索引擎看到的也是“Connection Reset”,这种心情,可想而知。
不过,所有的这些时刻,都将会消失在时间中,就像大雨中落下的泪水。当我在昨天发现 GFW 针对 V2EX.com 所进行的封锁消失时,我是感到十分高兴的。不管如何,这都是一件让我高兴的事情啊。哪怕这或许只是 GFW 的某台过滤服务器在维护?
有很多网友希望 V2EX.com 能够恢复之前的数据库,恢复到之前的状态去。我十分感谢,感谢大家还记得这个网站。
请大家给我一些时间,我想我需要再整理一下自己的思路,去好好想想,这一切的一切是怎么回事。恢复数据库是很简单的事情,V2EX.com 的数据一直都非常规整。只是,我们,需要如何做,做什么,才能够保证这个网站不被再次封锁呢?至少,作为我小小的私心,我不希望被别人以同样的方式伤害第二次。
As a developer and also a gamer with MacBook Pro Unibody, I found it was a pain to play games on this gorgeous machine, because it always turns to black screen when I’m playing any 3D intensive games in Windows Vista, then I’ll have to press power button for several seconds to force the machine to shut down.
I searched the Internet and found a lot people are experiencing the same:
http://discussions.apple.com/thread.jspa?threadID=1767221&tstart=0
So I’m wondering:
- Is Apple shipping faulty chips in the latest MacBook Pro?
- Or it’s just a driver issue?
After days of attempts, I finally figured out a way to make the machine stable when gaming. Here is how:
Update Drivers
Drivers included in Bootcamp are just too old, one big problem I experienced is crappy sound, it’s fixed after updated drivers.
You’ll need to download and install these three driver packages:
Realtek HD Audio Codec Driver
Download URL: http://www.realtek.com/downloads/downloadsView.aspx?Langid=1&PNid=14&PFid=24&Level=4&Conn=3&DownTypeID=3&GetDown=false
As of writing, the latest version is 2.13, this will fix the problematic sound quality.
nForce Driver
Download URL: http://www.nvidia.com/object/nforce_vista_20.08.html
As of writing, the latest version is 20.08. This will update drivers of your logic board and networking.
GeForce Driver
nVIDIA has released an official version of laptop driver, but it’s still at 179.x, I’m using the latest 180.x version. As a software engineer, my experience told me that the latest version could always contain undiscovered fixes which are good. Believe it or not.
You can find various latest nVIDIA GeForce drivers here:
http://www.laptopvideo2go.com/
Install nVIDIA System Tools
After updated all drivers, if you’re still experiencing black screen of death, it could be caused by some settings of fan speed is messed. I noticed that every time my MBP turns BSOD, it’s just too quiet, because the fans are not speeding up at all and the whole shell is as hot as hell.
I heard that RivaTuner can tweak fan speed settings, but its shattered UI really scared me, I’m afraid I may get more things messed with RivaTuner. So I turned to try nVIDIA System Tools, the official utility provided by nVIDIA for performance and monitoring stuff. You can download it here:
http://www.nvidia.com/object/nvidia_system_tools_6.03.html
As of writing, the latest version is 6.03. After installed, it will ask you to reboot the computer, and just follow that.
nVIDIA System Tools adds several panels in control panel, and you’ll find the option that lets you set cool down percentage is gray. I don’t know why but it’s normal, maybe. Since this nVIDIA part is assembled by Apple?
Then try your 3D intensive games like Call of Duty: World at War or Prince of Persia, you’ll notice that fans are speeding up as you enter game scenes. And I haven’t experienced a crash since I installed nVIDIA System Tools. So I guess it fixed some mess in fan speed settings, and that saves the machine from BSOD? At least it seems Apple is not shipping faulty chips in my MacBook Pro?
Best wishes to you and one more thing I may have to remind you, your mileage may vary.
iPhone OS 2.2 is a really big update, not only about features, but mostly about performance and stability.
From my real usage, Safari does crash less. Before 2.2, the most unstable web app is Google Reader, it can crash at any time, since I use Google Reader a lot on iPhone, what a pain it was. Now things are much better. And all components has dependency on WebKit also got enhancements, like UITableView, if you have some UIImageView inside UITableViewCell, you’ll find it scrolls much more smoother on 2.2! So, iPhone OS 2.2 is strongly recommended for everyone from newbies to developers.
On feature side, the new Emoji feature is particularly interesting, though it meant to be Japanese users only, but you can turn it on easily with some small helper program in Cydia installer. I really wish the cuteness be part of the whole world, not only Japan.
These days I’ve been working on an easy solution for implementing full text search on iPhone, and finally I got it working.
There is UISearchBar in UIKit, but there isn’t anything easy in iPhone SDK to help you implementing a high performance data structure for indexing and searching. After some Google search, I found that SQLite has a very promising full text search component called FTS3, however, this component exists in SQLite code tree as a plug-in, so it’s not to be found in iPhone’s built-in SQLite support.
To integrate FTS3 plug-in into your iPhone app, you need to build your own SQLite. Fortunately there is a project named The SQLite Amalgamation, it makes the whole SQLite source tree into three files: two .h headers and one .c source file. So you can create a group in your project in Xcode named SQLite, and drag-n-copy these 3 files into this group. So you’re ready to compile your own SQLite for your iPhone app.
Next step is to turn on FTS3 in sqlite3.c, you need to add this line:
#define SQLITE_ENABLE_FTS3 1
Below this line:
#define SQLITE_AMALGAMATION 1
Be aware that sqlite3.c is a very huge file weighing 340K+, it may crash your Xcode. You may want to open it in vim.
Now you can click build and play with your own SQLite 3 with FTS3. For more information on how to use FTS3, please read the official documentation, it’s quite easy:


