Sunday, July 25, 2010
How to test if file exist in iPhone iOS
BOOL fileExists = [[NSFileManager defaultManager] fileExistsAtPath:somePath];
Friday, July 23, 2010
How to get Application Name with code
Below is how you can get the name of your application with code.
[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleName"]
[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleName"]
Wednesday, July 21, 2010
How to enable SQL debugging for Core Data in XCode
Right click on the project executable and click “Get Info.” Navigate to the Arguments tab and add the following argument: “-com.apple.CoreData.SQLDebug 1″.
When the project is running, you should see the sql used in the console.
Thanks to http://www.raywenderlich.com/934/core-data-tutorial-getting-started
When the project is running, you should see the sql used in the console.
Thanks to http://www.raywenderlich.com/934/core-data-tutorial-getting-started
Wednesday, April 21, 2010
Tuesday, March 30, 2010
Tuesday, March 16, 2010
How to access ext2 or ext3 file system from Mac OSX
I have always wanted to access my Ubuntu harddisk in my Leopard. For months, google has been telling me not possible but, today came as a surprise, you are able to do so by installing fuse. Fuse is a user space file system which allows system to read different type of file system provided the developers has followed the Fuse inferface. It is originated from Linux and it has been ported to Max OS. Man, I really like FOSS. For more infor in fuse, http://fuse.sourceforge.net/
1. go to http://code.google.com/p/macfuse/ and download the latest version
2. go to http://sourceforge.net/projects/fuse-ext2/ and download the latest version. You should be able to download dmg format under the "Files" type
3. Install macfuse first
4. Install fuse-ext2
5. Reboot and you should be able to read ext2/3 formated drive.
PS: Just a note, there is another ext application for Mac however, I tried and it does not work for me.
Sunday, February 21, 2010
How to install iPhone SDK 3.1.2 with xCode 3.1.4 on Mac OS X 10.5.5
After a clean install, I need to install the xCode with iPhone SDK again on Mac OS X 10.5.5. However, you should see an error telling you that it support 10.5.7 and above. To resolve this, you can do the following.
1. Edit the file /System/Library/CoreServices/SystemVersion.plist under superuser mode. I like to use vim
The password should be your user password.
2. Change all the 10.5.5 to 10.5.7
3. Save and exit.
4. Start installing!
1. Edit the file /System/Library/CoreServices/SystemVersion.plist under superuser mode. I like to use vim
sudo vim /System/Library/CoreServices/SystemVersion.plist
The password should be your user password.
2. Change all the 10.5.5 to 10.5.7
3. Save and exit.
4. Start installing!
Subscribe to:
Posts (Atom)
