Sobes.tech

Are there any macros in the project besides the network layer?

Senior
237

What are the consequences of using the Singleton pattern inside a class implementing the observable object protocol?

Junior — Middle
237

What are the types of memory leaks and how to detect them?

Junior — Middle
236

What is the role and main responsibilities of the UIResponder class in the event handling system?

Junior — Middle
236

When you joined the project, was Swift 6 already available, or did the transition happen during your time?

Senior
235

Self -> Task -> (strong) Self .... Back -> View desinit -> View model deinit?

Senior
234

protocol SomeProtocol { func test() } func test1_1(value: SomeProtocol) {} func test1_2(value: any SomeProtocol) {} func test2_1(value: some SomeProtocol) {} func test2_2<Value: SomeProtocol>(value: Value) {} class A { func test2_2<Value: SomeProtocol>(value: Value) { } } class B: SomeProtocol { func test() {} } class C: B {} A().test2_2(value: B())

Senior
234

final class ProfileViewModel1 { enum State { ... } var state: State = .idle let service: UserService init(service: UserService) { ... } func onBackPress() { // view deinit } func loadUser() { state = .loading Task { [weak self] guard let self else { return } do { let user = try await self.service.fetchUser() self.state = .loaded(user) } catch { self.state = .failed(error.localizedDescription) } } } }

Senior
234

What is the process of combining multiple operations into one sequence for execution called?

Junior — Middle
233

Tell about useful Property Wrappers you've used in a project.

Senior
232

let parent = Task { let child = Task { print("child started, isCancelled = ", Task.isCancelled) // for index in (1...[phone]) { print(index) } print("child finished, isCancelled = ", Task.isCancelled) // } await child.value } try? await Task.sleep(nanoseconds: 1_000_000_000) // 1 second parent.cancel()

Senior
230

What is the complexity indicator for adding an element to the beginning of a doubly linked list?

Junior — Middle
229

struct ExampleView: View { var body: some View { VStack { FormView() Button("Reset") { // TODO: } } } } // READ ONLY struct FormView: View { @State private var firstname = "" @State private var lastname = "" @State private var email = "" @State private var website = "" var body: some View { Form { TextField("Enter firstname", text: self.$firstname) TextField("Enter lastname", text: self.$lastname) TextField("Enter email address", text: self.$email) TextField("Enter website address", text: self.$website) } } }

Senior
229

When implementing a new screen or feature, do you immediately write in SwiftUI, or are there discussions about choosing between UIKit and SwiftUI?

Senior
228

When is it permissible to perform user interface updates outside the main thread?

Junior — Middle
228

Can you give an example of implementing the dependency inversion principle in a project?

Junior — Middle
227

protocol SomeProtocol {} func test1_1(value: SomeProtocol) {} func test1_2(value: any SomeProtocol) {} func test2_1(value: some SomeProtocol) {} func test2_2<Value: SomeProtocol>(value: Value) {} class A { func test2_2<Value: SomeProtocol>(value: Value) { } } class B: SomeProtocol { } A().test2_2(value: B())

Senior
227
/188