Frameworks Flashcards

1
Q

How does CloudKit differ from Core Data?

A

Although the two have many conceptual similarities, CloudKit is specifically designed to work remotely. Another key difference is that CloudKit lets you store data without worrying about your structure ahead of time, whereas Core Data requires that you define your structure up front.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How does SpriteKit differ from SceneKit?

A

Obviously one is for 2D drawing and the other is 3D, but you might use this chance to talk about how they both sit on top of Metal, and how you can mix the two if you want.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How much experience do you have using Core Data? Can you give examples?

A

Core Data is a huge and complex topic, but you should at least have tried it once. You might find it useful to talk about how NSPersistentContainer made Core Data easier to use from iOS 10 onwards, or compare and contrast Core Data and CloudKit.

For a really great answer, talk about things that Core Data does well such as searching, sorting, and relationships, but also talk about places where Core Data struggles such as optionality and extensive stringly typed APIs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How much experience do you have using Core Graphics?

A

Most developers have at least used Core Graphics for drawing basic shapes, but you might also have used it for text and resizing images. You should aim for at least a little experience, because this is one of the most important Apple frameworks.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the different ways of showing web content to users?

A

You don’t need to have named them all, but it certainly helps: UIWebView, WKWebView, SFSafariViewController, and calling openURL() on UIApplication. Don’t just list them off, though: at least mention that UIWebView is deprecated, but if you can you should also compare and contrast WKWebView and SFSafariViewController

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What class would you use to list files in a directory?

A

Hopefully your answer was FileManager. If your interviewer looked like they wanted more, you might want to talk about sandboxing: important directories such as documents and caches, using App Groups to share data between targets in your app, and more.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is UserDefaults good for? What is UserDefaults not good for?

A

This should immediately have you thinking about speed, size, and security: UserDefaults is bad at large amounts of data because it slows your app load, it’s annoying for complex data types because of NSCoding, and a bad choice for information such as credit cards and passwords – recommend the keychain instead. If you’re using SwiftUI extensively you could mention @AppStorage here.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the purpose of NotificationCenter?

A

Most people use this for receiving system messages, for example to be notified when they keyboard appears or disappears, but you can also use it to send your own messages inside your app. Once you’ve outlined the basics, try comparing it against delegates.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What steps would you follow to make a network request?

A

There are so many ways of answering this (not least “use Alamofire”), but the main thing is to demonstrate that you know it needs to be asynchronous to avoid blocking the main thread. Don’t forget to mention the need to push work back to the main thread when it’s time to update the user interface.

For bonus points, mention that this is the kind of work Combine just eats up.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

When would you use CGAffineTransform?

A

There are lots of ways of using these to manipulate the frame of a view, but an easy one is animation – you might make a view scale upwards, rotate, or grow larger over time for example.

For bonus points, you might want to move on to discuss that affine scale transforms don’t cause views to redraw at their larger size, which means that text is likely to appear fuzzy.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How much experience do you have using Core Image? Can you give examples?

A

Some developers confuse Core Graphics and Core Image, which is a mistake – they are quite different. Core Image is used less often than Core Graphics, but is helpful for filtering images: blurring or sharpening, adjusting colors, and so on.

For bonus points, talk about Core Image being able to apply multiple effects efficiently, and how it can also generate some kinds of images too.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How much experience do you have using iBeacons? Can you give examples?

A

iBeacons were introduced way back in iOS 7, and have found mixed use – unless you’re applying for an iBeacon development job this is one you can probably skip with “I haven’t used them much, but I’m keen to learn!”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How much experience do you have using StoreKit? Can you give examples?

A

Most apps use only a small slice of StoreKit, whether it’s unlocking in-app purchases, displaying other apps to purchase, or asking users to review the app. Either way, have something to talk about – it’s better to say you’ve at least tried one of its features than have nothing at all to show.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How much experience do you have with GCD?

A

Most developers have used Grand Central Dispatch at some point, either explicitly or implicitly – here the interviewer is probably trying to figure out which it is. You can approach this directly using DispatchQueue if you want, but you might also want to consider OperationQueue.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What class would you use to play a custom sound in your app?

A

An easy answer is AVAudioPlayer, as long as you’re clear about keeping the object alive while its sound plays. If you were feeling more confident you could discuss the pros and cons of using AudioServicesCreateSystemSoundID() instead – it’s a slightly odd API, but it definitely works.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What experience do you have of NSAttributedString?

A

This is an incredibly useful class, so hopefully your answer isn’t “none”! Perhaps start by talking about how they are useful to add formatting like bold, italics, and color. You might also want to mention that they are great for hyperlinks, but for real bonus points mention that you can embed images inside them as well.

17
Q

Can you name at least three different CALayer subclasses?

A

This is an intermediate to advanced question aimed at folks with UIKit experience. You could choose from CAGradientLayer, CATiledLayer, CAEmitterLayer, CAShapeLayer, and more – they are all quite popular on Apple’s platforms.