Added code for Objective-C and tested.