Skip to main content

Posts

Showing posts with the label Macintosh

Removing NSLogs from release build

NSLogs are great when debugging to see exactly what is going on but the downside is that they impact heavily on performance (I speak from experience on that one). Luckily there is a way to "disable" them on release builds of your application and still have them in your debug builds. we do this by simply adding the following macro to the prefix .pch file in your project or anywhere before the entry point to your application. #ifdef DEBUG #define NSLog(...) NSLog(__VA_ARGS__) #else #define NSLog(...) {} #endif If you want an explanation here it is. When you build a Debug version of an application DEBUG is defined , if its a release build , DEBUG is not defined.This macro checks if DEBUG is defined , if it is it sets NSLog to what it should be , if DEBUG is not defined then NSLog is defined as an empty code block that as you should know will do nothing , thus saving on performance.

Lion's eat RAM's

I recently purchased a Mac-mini(Yes I own a Mac now) with relatively the same hardware specs as my(well the one I work with) MacBook pro, Intel Core i5,Graphics 3000(or whatever) etc. The only difference being that the ram in the Mini was only 2GB and the Laptop has 4GB,we will come back to this later. The MacBook Pro experience: My experience with the laptop has been great,never lagging and I really got used to using a track-pad instead of a mouse and found gestures very helpful for quick desktop management with a small screen.It was also very responsive and I keep tons of windows open all the time without problems.  When I got my Mac Mini,I popped it out of its box and plugged it in to my standard PC peripherals,switched it on and everything worked fine ,I got a few nice surprises too,I did not expect it to come with a wireless card or built in Bluetooth,just like it does on the MacBook. Then I tried to run Safari,iTunes and Xcode all at once(I do this often while worki...

MacBook Pro with Lion,WiFi problems?

If you don't know already I am a fan of Apples products,this is coupled with a strange fact.I have never,ever owned anything made by Apple besides the copy of Snowleopard I run on a VirtualBox. I may not own one ,but I think I can speak with authority on the topic of "MacBook Pro with Lion,WiFi problems?" because of what I have seen on another machine and what I have Internet-ed. I have seen Lion run on a 2008 15 inch MacBook Pro - no WiFi problems ,why? It was fully updated.The reason I am actually posting this is that I recently tried helping someone with this problem on a not fully updated MacBook Pro(hence the extensive internet research).Of all the strange hacks and ideas the only eureka moments on the internet are when some guy posts ,"I updated and now it works". So there,if you are having WiFi problems on your MacBook pro with Lion,Update,it seems like it works and it makes more sense than "8.8.8.8". The person I attempted to help ...