In this comprehensive tutorial, we will try to cater to Top iOS Interview questions and Answers. We aim to address key iOS interview questions and provide insightful answers to assist you in thorough preparation and effective revision for your upcoming interview rounds.
Q.1 What are value types and reference types in Swift and When to use them?
Q.2 Why does Apple prefer to use Value types by default? What’s wrong with using a reference type?
Q.3 Why do we use the mutating keyword?
Q.4 What is the difference between Array and Set?
Q. 5 Explain failiable initializer in Swift?
Q.6 Explain convenience initializer in Swift?
Q.7 What’s a closure? Explain trailing closures?
Q.8 Difference between strong and weak keyword? And when to use them?
Q.9 Explain memory management (ARC) in Swift?
Q.10 Explain MVC along with 3 pros and cons?
Q.11 Explain the difference between MVC and MVVM?
Q.12 Explain pros and cons of MVVM?
Q.13 Have you used URLSession class? What does it do?
Q.14 Explain the difference between property wrappers and property observers?
Q.15 Explain the iOS life cycle and 3 delegate method of the AppDelegate.
Q. 16 What is a protocol and what are the benefits of using a protocol?
Q. 17 How to pass data from one view controller to another?
Q.18 Explain the difference between formal and informal protocol?
Q.19 What’s the difference between Sync and Async tasks in iOS?
Q.20 When to use the @objc keyword in Swift programming?
Q.21 What are delegates? and how are they different from data source?
Q.22 Explain the difference between abstraction and encapsulation and where do we use them in the code?
Q.23 Explain the difference between stack vs heap?
Q.24 What is the dynamic keyword used for?
Q.25 What is the use of “resueIdentifier” in a UITableView?
Q.26 Explain delegate pattern in swift and how will you implement them?
Q.27 What’s the difference between KVO and Delegate?
Q.28 What’s the difference between KVC and KVO?
Q.29 Explain singleton class and the when to use them along with drawbacks of using singleton class?
Q.30 What’s the difference between protocol extension and optional protocol?
Q. 31 When to use guard vs if let in your code?
Q.32 What’s the difference between frames and bounds?
Q.33 Explain serial and concurrent queues?
Q.34 What is SceneDelegate and How is it different from an AppDelegate?
Q.35 Difference between copy and retain
Q.36 Difference between GCD and NSOperation
Q.37 What is REST API? What’s the difference between POST and PUT
Q.38 How do you store sensitive information in your app?
Q.39 Suppose there are 10 threads trying to access the database at the same time for the same table, how will you make sure that a deadlock never occurs in such case.
Q.40 When will you use weak vs unowned in your code?
Q.41 Explain the responder chain?
Q.42 Explain the difference between delegate and KVO?
Q.43 Explain the difference between map and flat map?
Q.44 What is protocol oriented languages?
Q.45 Difference between OOPS and POPS ?
Q.46 What are higher order function?
Q.47 Difference between map and flat map?
Q.49 What is optional?
Q.50 What is optional binding?
Q.51 What are application states?
Q.52 What is lazy?
Q.53 What are solid principles?
Q.54 What is codable?
Q.55 Difference between Class, Structure, Enum.
Q.56 What are constraints?
Q.57 How to switch from background queue to main queue?
Q.58 What is a serial queue?
Q.59 What is a concurrent queue?
Q.60 Why you use FCM notification instead of APNS?
Q.61 Can we take ViewModel as Struct instead of Class?
Q.62 Difference between struct and class.
Q.63 Is there any way to achieve inheritance in struct?
Q.64 Can we write computed and stored properties in Protocol?
Q.65 How many types of closure are there?
Q.66 Closure having capture list is escaping or non escaping closure?
Q.67 Is any other class initialized in any viewcontroller has strong or weak?
Q.68 How many types of acces specifier in Swift?
Q.69 Difference between Open and Public.
Q.70 What is use of defer keyword?
Q.71 If there are 4 defer statements, then how it will be excecuted?
Q.72 What is Swift package manager?
Q.73 What is abstraction example in ios?
Q.74 What is subscript? Give example of use.
Q.75 What is technique in ios to secure your api call?
Q.76 How can I call 6 api simultaneously? Tell steps for this?
Q.77 Explain About application authentication.
Q.78 Tableview reuse in different controllers in different class ( can we have same identifier)
Q.79 How to mutate structure variable without using mutating function variables.
Q.80 Data passing from completion handler from one view controller to another while API calling.
Q.81 Weak vs unowned variable. Is weak/unowned variable used in @non-escaping variable?
Q.81 How to create retain cycle? How to solve this?
Q.82 When you to use structure and when to class?
Q.83 Different types of size class?
Q.84 How will you design for iPhone and iPad design?
Q.85 What is range operator in Swift?
Q.86 What is Enum and Why we need to create Enum?
Q.87 What is raw value or associated value in enum?
Q.88 Can we use KVC in structure?
Q.89 Type of properties in Swift.
Q.90 What is lazy property?
Q.91 What is type property?
Q.92 What are generics?
Q.93 Difference between Generic and Any.
Q.94 Generic and Any, which achieve type safety?
Q.95 Does closure capture values?
Q.96 What should I do if my closure avoid capturing values?
Q.97 What is inout parameter?
Q.98 Can we make protocol only class specific, struct can not adopt it?
Q.99 How multithreading managed in Swift?
Q.100 What is content hugging?
Q.101 What are methods of uitableviewdelegate?\
Q.102 What is intrinsic content size?
Q.103 Is core data thread safe?
Q.104 Deletion rule for core data.
Q.105 What are Persistent stores available in core data?
Q.106 Different type of migration in Core data?
Q.107 Can we create delegate as strong?
Q.108 What is memory leak? How you resolve memory leak issue?
Q.109 What is best practise to save secure data in locally?
Q110 Can you give me brief about how we can integrate apns?
Q.111 What is app slicing?
Q.112 What is app thinning?
Q.113 What is SSO – Single Sign On?
Q.114 What is app clips?
Q.115 How to deploy app to app store?
Q.116 What is code coverage?
Q.117 What is use of sonar?
Q.118 What is SSL pinning?
Q.119 How can I enable some feature available for some country and not available to some country?
Q.120 How can you create a framework?
Q.121 Write reduce higher order function?
Q.122 Can you list of state of application?
Q.123 How to call api if my application is not running state?
Q.124 If my application is not running, can I update my location to backend?
Q.125 If I want to run all test case methods on single click, then how can I do that?
Q.126 What is retain count?
Q.127 What is type alias?
Q.129 What is viper?
Q.130 If I use print statement in code, what should I do when we are uploading binary to appstore?
Q.131 What is SML for authentication?
Q.132 Explain error handling.
Q.133 Difference between REST and SOAP api. Which one is most secure? Which one you will choose for your application and Why?
Q.134 What is string interpolation in Swift 5.1?
Q.135 what is .dysm file? Where you can get that file?
Q.136 ViewController Lifecycle
Q.137 What is flag in memory for local variables?
Q.138 In Swift, which inheritance support, multiple inheritance or multilevel inheritance?
Q.139 Make one protocol and how to implement, write code.
Q.140 Can protocol be file private?
Q.141 Can we make init method in protocol?
Q.142 What is QOS?
Q.143 Difference between Open and Public?
Q.144 What types of certificates are needed in iOS development and deployment?
Q.145 Is distribution certificate support wild mark (*)?
Q.146 What is vary trait in auto layout?
Q.147 What is content hugging priority?
Q.148 What is Operator overloading?
Q.149 What is Unmanaged objects?
Q.150 Different types of Control statements.
Q.151 Persistent storage in iOS.
Q.152 Difference between Stackview and Normal View.
Q.153 Explain Delegate & protocol for Data passing in swift.
Q.154 Are delegates strong or weak?
Q.155 How to implement real time in an app?
Q.156 How you handle & manage data offline and online?
Q.157 What is remote config in firebase
Q.158 What is push notification payload maximum size?
Q.159 What is happened with push notifications if device has not internet connection?
Q.160 Push notification stored in apple system in sequential format or what?