Author: andras.palfi

Reset external display settings on mac

Using external display is a great thing. I prefer to use my big external screen rotated by 90º: quite useful for long docs. The problem comes along when you remove the cable while the mac is sleeping: sometimes the system remembers that the screen is rotated but this no more synced with the monitor. It […]

Analyzing binary libraries on Mac

If you want to know the architectures a library supports, just call: lipo -info <libname> lipo is also used to create fat-binaries. If you want to look more deeply into a binary library the easiest way to use nm. NM will list the whole structure of the library together with the public classes/method. It’s under the […]

The case of missing IPA creation option in Xcode

IPA is technically a small install package of iOS platform. You can create it in XCode by creating an archive (Product/Archive menu point) and if the build is ready pressing the Distribution button on the right side of the appearing Organizer window. In the new appearing window just select Save for Enterprise or Ad-Hoc Deployment, sign with […]

ObjC ivar/global var declaration – a clarification

You can declares iVar-s in header files but it’s better in the implementation, so they will be really invisible for others. You should do this way: @implementation MyClass { int firstiVar; } @synthesize anyProperty; But what if you forget the parenthesis and you put the variable simply beside the @synthesize? Like this: @implementation MyClass int […]

Enabling AirDrop – if it doesn’t work

Have you ever experienced that the AirDrop doesn’t work while it definitely should work? Two computers cannot see each other? Ok, first check some cases – on both machines: You have a Mac OS X Lion OS installed wifi is turned on both machines has to have an opened Finder window and the AirDrop should […]

iOS mock framework for unit tests

Mock objects are objects which behave like another business objects, but they don’t do more than you need to test a unit. For example they response with a static data. Mock frameworks gives you the ability to define dynamically mock objects in the test method rather than define them in separate classes. The mock object […]

ObjC advanced static code analyzer

There is a built in code analyzer in Xcode but unfortunately it’s not that we really need. It doesn’t check complexity, method sizes etc. This was one of the missing features till now because fortunately there is a good one out already: OCLint (http://oclint.org/) Unfortunately there is still no correct Xcode project file read support […]