Hiring guide for Objective-C Engineers

Objective-C Developer Hiring Guide

Objective-C is a high-level, object-oriented programming language that adds Smalltalk-style messaging to the C programming language. Developed in the early 1980s, it was selected as the main language used by NeXT for its NeXTSTEP operating system, from which macOS and iOS are derived. Objective-C is primarily used by developers to create apps for iOS and macOS due to its incorporation into Apple's development frameworks like Cocoa Touch and Cocoa. It uses dynamic runtime and has unique syntax for defining classes and methods. Despite being somewhat overshadowed by Swift, Apple's newer programming language, Objective-C remains a vital part of the iOS development ecosystem.

Ask the right questions secure the right Objective-C talent among an increasingly shrinking pool of talent.

First 20 minutes

General Objective-C app knowledge and experience

The first 20 minutes of the interview should seek to understand the candidate's general background in Objective-C application development, including their experience with various programming languages, databases, and their approach to designing scalable and maintainable systems.

How would you declare an array in Objective-C?
You can declare an array in Objective-C using the '@[]' syntax. For example, NSArray *myArray = @['element1', 'element2', 'element3'];
What are the different collection types in Objective-C?
The different collection types in Objective-C include NSArray, NSDictionary, and NSSet.
How would you define a method in Objective-C?
A method in Objective-C is defined using the '-' or '+' symbol followed by the return type in parentheses and then the method name. For example, '- (void)myMethod;' or '+ (int)myMethod;'
What are the differences between a class method and an instance method?
A class method is a method that is called on the class itself, while an instance method is called on an instance of the class. Class methods are similar to static methods in other languages, and instance methods are similar to regular methods in other languages.
How would you create a custom class in Objective-C?
To create a custom class in Objective-C, you would need to define both a header (.h) file and an implementation (.m) file. The header file would declare the class interface, including any properties and methods, while the implementation file would provide the actual code for the methods.
The hiring guide has been successfully sent to your email address.
Oops! Something went wrong while submitting the form.

What you’re looking for early on

Does the candidate demonstrate a deep understanding of Objective-C?
Can the candidate solve complex problems using Objective-C?
Does the candidate have experience with Cocoa Touch and other Apple frameworks?
Has the candidate kept up with the latest developments in Objective-C and related technologies?

Next 20 minutes

Specific Objective-C development questions

The next 20 minutes of the interview should focus on the candidate's expertise with specific backend frameworks, their understanding of RESTful APIs, and their experience in handling data storage and retrieval efficiently.

What is the purpose of the @synthesize directive?
The @synthesize directive automatically generates getter and setter methods for a property. It's used in the implementation file of a class.
Describe the difference between strong and weak references in Objective-C.
A strong reference means that as long as the reference exists, the object cannot be deallocated. A weak reference, on the other hand, does not prevent the system from deallocating the object it points to. If the object it points to is deallocated, the weak reference is automatically set to nil.
What is a protocol in Objective-C and how would you define one?
A protocol in Objective-C defines a set of methods that a class can choose to implement. You define a protocol using the @protocol directive, followed by the list of methods, and end it with @end.
What is the difference between #import and #include in Objective-C?
#import ensures that a file is only ever included once so you never have a problem with recursive includes. Whereas, #include will include the file as many times as it is included.
How would you handle exceptions in Objective-C?
You can handle exceptions in Objective-C using @try, @catch, and @finally blocks. The code that can potentially throw an exception is put inside the @try block, the exception is caught in the @catch block, and any cleanup code is put in the @finally block.
The hiring guide has been successfully sent to your email address.
Oops! Something went wrong while submitting the form.

The ideal back-end app developer

What you’re looking to see on the Objective-C engineer at this point.

At this point, a skilled Objective-C engineer should demonstrate strong problem-solving abilities, proficiency in Objective-C programming language, and knowledge of software development methodologies. Red flags include lack of hands-on experience, inability to articulate complex concepts, or unfamiliarity with standard coding practices.

Digging deeper

Code questions

These will help you see the candidate's real-world development capabilities with Objective-C.

What does the following Objective-C code do?
@interface MyClass : NSObject
@property (nonatomic, strong) NSString *myString;
@end
This code defines an interface for a class named 'MyClass' that inherits from the 'NSObject' class. It also declares a property named 'myString' of type 'NSString'. The 'nonatomic' keyword means that the property is not thread-safe. The 'strong' keyword means that the property maintains a strong reference to the 'NSString' object.
What will be the output of the following Objective-C code?
NSString *str1 = @"Hello";
NSString *str2 = @"World";
NSString *str3 = [str1 stringByAppendingString:str2];
NSLog(@"%@", str3);
The output of the code will be 'HelloWorld'. The 'stringByAppendingString:' method is used to append 'str2' to 'str1' and the result is assigned to 'str3'. The 'NSLog' function is then used to print the value of 'str3'.
What does the following Objective-C code do?
NSMutableArray *array = [NSMutableArray arrayWithObjects:@"Apple", @"Banana", @"Cherry", nil];
[array removeObjectAtIndex:1];
This code creates a mutable array with three objects: 'Apple', 'Banana', and 'Cherry'. It then removes the object at index 1 (which is 'Banana') from the array. After this operation, the array contains only 'Apple' and 'Cherry'.
What does the following Objective-C code do?
@synchronized(self) {
// critical section of code
}
This code is used to create a critical section, ensuring that only one thread can execute this block of code at a time. The '@synchronized' directive locks 'self' for the duration of the block, preventing other threads from executing the same block of code until the lock is released.

Wrap-up questions

Final candidate for Objective-C Developer role questions

The final few questions should evaluate the candidate's teamwork, communication, and problem-solving skills. Additionally, assess their knowledge of microservices architecture, serverless computing, and how they handle Objective-C application deployments. Inquire about their experience in handling system failures and their approach to debugging and troubleshooting.

What is the purpose of the NSObject class?
NSObject is the root class of most Objective-C class hierarchies. Through NSObject, objects inherit a basic interface to the runtime system and the ability to behave as Objective-C objects.
What is key-value coding in Objective-C?
Key-value coding is a mechanism for accessing an object’s properties indirectly, using strings to identify properties, rather than through invocation of an accessor method or accessing them directly through instance variables.
What is the difference between @interface and @implementation in Objective-C?
@interface is used to declare a class, including its instance variables and declared properties, which are either public or protected. @implementation is where you write the actual code that implements the declared methods.

Objective-C application related

Product Perfect's Objective-C development capabilities

Beyond hiring for your Objective-C engineering team, you may be in the market for additional help. Product Perfect provides seasoned expertise in Objective-C projects, and can engage in multiple capacities.