iOS Development Interview Questions | iOS Development for Senior Developers

Turing
10 Oct 202225:58

Summary

TLDR本次视频访谈的是David, 一个有6年开发经验的iOS开发人员。他谈到了WWDC会议上Apple公布的最新iOS 16功能,如锁屏小部件、实时活动更新和动态岛等。他还详细讨论了iOS开发中的并发、性能优化和测试的最佳实践。总的来说,这是一次对iOS开发及其最新趋势和技术的详尽而生动的概述。

Takeaways

  • 🍏 WWDC是苹果的全球开发者大会,介绍iOS新功能,如SwiftUI的新导航API、锁屏小组件和实时活动。
  • 🔑 Live Activities允许用户从锁屏实时更新应用信息,如共享出行应用状态或实时比分。
  • 📱 David Zampier专注于iOS开发超过四年,参与了多个有趣的项目,如世界范围的行李追踪和流媒体应用。
  • 💼 通过Touring工作,David得以与来自不同文化和国家的人交流,并为一家位于加州的公司工作。
  • 🔄 Objective-C不再是新项目的首选,Swift和SwiftUI更受欢迎,但Objective-C代码仍可与Swift互操作。
  • 📲 在苹果生态系统中,不同设备(如iPhone、Apple Watch、Apple TV)可以共享Swift代码,但需要不同的bundle ID。
  • 🔗 Deep Link和Universal Link允许用户直接从网页或其他应用跳转到应用的特定页面。
  • ⚙️ GCD(Grand Central Dispatch)和操作队列是iOS中实现并发的方式,允许后台执行多任务。
  • 🧩 设计模式,如MVC和MVVM,对于构建易于理解和扩展的iOS应用至关重要。
  • 🔍 TDD(测试驱动开发)是提高代码质量和结构的重要实践,通过先编写测试再编写功能代码来实现。
  • ✨ 异步编程和最新的async/await关键字简化了iOS中并发任务的处理,提高了代码的可读性和维护性。

Q & A

  • WWDC是什么,今年有哪些新功能被介绍?

    -WWDC是苹果的全球开发者大会,今年介绍了新的SwiftUI导航API、锁屏的新小工具、以及实时活动等功能。

  • 锁屏上的实时活动是什么,它怎么工作?

    -实时活动允许应用在锁屏上显示实时更新信息,如共享出行应用或实时比分等,也支持在iPhone 14 Pro和Pro Max的动态岛上显示。

  • 如果我有自己的API,能在锁屏上显示数据吗?

    -可以,你的应用可以通过实时活动在锁屏上显示来自你自己API的数据。

  • Objective-C还在iOS开发中使用吗,还是已经完全转向Swift?

    -新项目和新功能主要使用Swift和SwiftUI,但因为Objective-C与Swift的良好互操作性,旧项目仍可能使用Objective-C。

  • iOS, watchOS, tvOS和macOS应用开发中有什么共同点?

    -这些平台都可以使用Swift进行开发,并且开发者可以在这些平台间共享代码。

  • 什么是深度链接,它如何工作?

    -深度链接是指向你应用内特定页面的链接。使用通用链接,如果应用未安装,用户点击链接会被引导至App Store下载应用,安装后打开特定页面。

  • 什么是GCD,它在iOS中用来解决什么问题?

    -GCD(Grand Central Dispatch)是一种低级API,用于在iOS应用中实现并发和并行任务处理,通过管理后台线程来执行多个任务。

  • iOS应用在后台运行时会发生什么?

    -当应用处于后台时,主线程被挂起,但后台线程可以继续执行某些操作,如使用用户位置或与服务器同步,但不能执行大量的处理任务。

  • App ID和Bundle ID有什么区别?

    -Bundle ID是应用在苹果生态系统中的唯一标识符,而App ID是由团队ID和Bundle ID组成的字符串,用于标识同一开发团队的一个或多个应用。

  • 在iOS开发中如何提高应用性能或管理内存?

    -可以通过使用多线程、并发任务、懒加载属性等技术来提高性能和优化内存使用。

Outlines

00:00

😀 开场与iOS开发简介

视频以介绍主持人Jose和嘉宾David Zampier开始,David在iOS开发领域拥有超过六年的经验,专注于iOS开发近四到五年。讨论内容围绕David在iOS开发中的经验,特别是他参与的项目,如全球行李追踪、流媒体应用和社交网络应用。接着讨论了苹果的全球开发者大会(WWDC),David详细介绍了WWDC期间苹果发布的新iOS版本的新功能,如新的导航API、锁屏小工具、实时活动以及如何将这些新特性集成到自定义应用中。

05:02

🔄 iOS开发进阶话题

在这一部分,David讨论了iOS开发的更高级话题,包括Objective-C与Swift的使用情况、重要性和转变,以及开始iOS开发的最佳路径。他还详细解释了为不同苹果平台(如Apple Watch、Mac和Apple TV)开发应用时代码共享的概念。此外,他提到了深度链接(Deep Link)和大中心调度(GCD)在iOS中的应用,以及如何实现并发性和应用性能优化的技术。

10:04

🔍 iOS并发编程与性能优化

第三段深入探讨了iOS中的并发编程和性能优化策略。David解释了不同的并发技术,如调度队列、线程和操作队列,以及它们如何帮助提高应用性能。他讨论了将应用置于后台时的行为,包括何时使用用户位置和API同步,以及应用在后台的存活时间。David还区分了应用ID和包ID的概念,并提供了关于如何在不同的Apple平台上设置和识别应用的建议。

15:06

🛠️ iOS开发技巧与最佳实践

在这部分,David分享了有关iOS开发的技巧和最佳实践,包括如何使用懒加载属性来优化性能和内存使用,设计模式的重要性,特别是MVC和MVVM在iOS中的应用。他强调了测试驱动开发(TDD)的价值,并讨论了如何使用异步编程和完成处理器来处理iOS应用中的并发任务。David还提到了Swift中的async/await关键词,以及如何利用它们简化异步编程。

20:07

📲 iOS开发资源与学习路径

最后一段讨论了成为iOS开发者的资源和学习路径。David鼓励观众利用互联网上的资源,如Apple的官方文档和开发社区,来学习iOS开发。此外,他提出了动态派发和同步与异步任务的概念,并解释了它们在iOS应用开发中的区别和应用。视频以鼓励观众订阅频道并关注社交媒体账号结束,同时强调Touring平台上远程工作的机会。

25:08

🎉 结语与呼吁关注

在视频的结尾,Jose感谢David的精彩对话,并邀请观众订阅频道、点赞视频,并关注Touring在LinkedIn、Instagram、Facebook、Twitter、Clubhouse和YouTube上的社交媒体账号。强调了Touring提供的远程工作机会,鼓励有志于iOS开发的观众利用这个平台寻找合适的工作。

Mindmap

Keywords

💡iOS

iOS是苹果公司的手机操作系统,用于iPhone、iPad等苹果产品。视频里讨论了iOS开发的相关技术与实践。

💡Swift

Swift是苹果公司推出的用于iOS和MacOS应用开发的新编程语言,取代了过去的Objective C语言。视频中提到现在iOS开发主要使用Swift语言。

💡WWDC

WWDC是苹果举办的全球开发者大会,每年6月举行。苹果会在会上发布iOS等系统的新版本与新特性。

💡动态调度

动态调度是指程序在运行时决定调用哪个方法的实现的机制。当子类重写父类的方法时,动态调度允许根据运行时条件选择调用子类还是父类的实现。

💡异步

异步是指程序中多个任务可以同时执行,一个任务不需要等待另一个任务结束后再开始。视频中提到iOS中的异步编程可以提高效率。

💡gcd

GCD是Grand Central Dispatch的缩写,是iOS中的并发框架,可以更好地管理线程与任务,实现并发编程。

💡设计模式

设计模式是可重用的解决常见问题的编码设计。视频中提到MVC、MVVM等模式在iOS开发中的应用。使用设计模式可以提高代码质量。

💡测试驱动开发

测试驱动开发把测试放在首位,通过先写测试来驱动整个开发流程。视频中建议iOS开发要使用测试驱动开发。

💡内存管理

优化内存管理对提高iOS应用性能非常重要。视频中提到了一些实用技巧,比如延迟初始化属性等。

💡深度链接

深度链接可以直接在应用内打开指定页面。视频中解释了iOS中的通用链接实现深度链接的功能。

Highlights

苹果每年在WWDC大会上发布iOS最新版本和特性

iOS 16增加了锁屏小组件功能,开发者可以为用户自定义锁屏

iOS 16还增加了实时动态信息更新功能,可以在锁屏显示比赛分数或者共享汽车等实时信息

WWDC大会上,开发者可以与苹果工程师交流,学习新特性和新文档

目前iOS开发都使用Swift语言,尽管Objective C仍然支持与Swift的互操作

SwiftUI可以编写跨多平台代码,比如iOS, watchOS和tvOS

深度链接可以直接打开App中的某个界面

GCD是底层API,可以同时执行并发任务

后台任务会被挂起,但是可以继续执行某些操作,比如位置跟踪

iOS有调度队列、线程和Operation Queues三种实现并发的方式

延时属性可以根据需要延迟初始化,提高性能

MVC设计模式还是常用的iOS架构模式

测试驱动开发可以提高代码质量

动态调度是在运行时决定调用哪个方法实现的

同步任务会顺序执行,异步任务同时开始

Transcripts

play00:00

[Music]

play00:07

hello everyone we are back with another

play00:09

round of touring Dev talks and today I'm

play00:12

so excited because today talks is about

play00:14

iOS development and I will be talking

play00:17

with David zampier about iOS okay and uh

play00:22

to give you a little bit of context

play00:24

about David has over six years of

play00:26

experience but for the past four to five

play00:29

years he's focused on iOS development so

play00:32

without further Ado hi David D how are

play00:35

you doing and how is your day doing so

play00:36

far

play00:37

hey Jose thank you for having me I'm

play00:39

really excited to be here today talking

play00:41

to you about the iOS development so yeah

play00:43

this is uh I'm doing great thank you and

play00:47

let's talk about it nice so could you

play00:49

please uh introduce yourself and talk a

play00:53

little bit about your experience with

play00:55

iOS what kind of project have you been

play00:57

doing

play00:58

so yeah I've worked for a lot of uh

play01:01

interesting projects like uh worldwide

play01:03

baggage tracking like for lost baggages

play01:06

in airports also for streaming apps

play01:10

um and social networks so yeah

play01:14

so cool project a lot of cool projects

play01:16

nice nice all right so and the first

play01:19

question that I have to you today is

play01:22

what is WWDC and what happened there

play01:27

oh yeah so wwc is the worldwide

play01:30

developer conference it's a conference

play01:32

that Apple uh where Apple shows all the

play01:36

new features for the new iOS version it

play01:39

happens on June it's a whole week of

play01:41

stockings and we can talk with uh

play01:44

airport Engineers we can

play01:46

study the new documentations we have

play01:49

some uh working sessions and

play01:53

where Apple introduces the new features

play01:57

for us developers so this year we had

play01:59

like the new Apple announced the newer

play02:01

navigation API for Swift UI so we can

play02:04

like build the navigation for our apps

play02:06

in Swift UI more easily so we have the

play02:09

new widgets for lock screen so if you

play02:11

are using the new iOS 16 you can you

play02:14

probably have seen it and you can like

play02:17

uh build

play02:19

um custom widgets for the lock screen uh

play02:22

us as developers so also we have the

play02:25

live activities and like screen lock

play02:27

screen as well and all of these features

play02:29

were introduced by Apple in www.dc this

play02:31

year and and they like

play02:34

um touch taught us how to build them for

play02:38

our custom apps nice nice and what is

play02:41

live activities on lock screen what kind

play02:45

of features we have there

play02:46

okay so a lot of activities uh Apple

play02:49

introduced this year so basically we can

play02:52

you can see uh real-time updates from

play02:55

your app from your locked screen so like

play02:58

for Rideshare apps or

play03:01

um some you can see the score of a live

play03:04

game in your lock screen so it's really

play03:07

interesting and also it worked in the

play03:10

dynamic Island introduced by Apple in

play03:12

the new iPhone 14 pro and 14 pro Max

play03:15

and so if I have my own API can I I see

play03:20

data in my lock screen from my own API

play03:24

sure for sure yeah you can do it in your

play03:26

app all right so that is amazing so

play03:29

could you please tell our audience uh

play03:31

how you're working at touring has been

play03:34

so far

play03:35

oh it's it has been amazing like I've

play03:39

known people from many cultures from

play03:41

many countries and this is great because

play03:45

I have opportunity to connect to people

play03:47

from all the world

play03:49

and uh I've been working for a company

play03:52

based in California and they are amazing

play03:55

they have like great Engineers there and

play03:58

I had opportunity to be there a couple

play04:01

of weeks ago to know the the the company

play04:05

uh headquarters and to connect to my

play04:09

teammates and it was awesome did you

play04:11

travel to us last last week also yeah

play04:15

yeah all right that's amazing yeah

play04:17

that's that's so nice all right so in

play04:20

talking about iOS okay the first

play04:24

question that I have for you is so I use

play04:26

iOS I used to develop for iOS long uh

play04:30

years ago long time ago and I use

play04:33

Objective C okay and is objective c is

play04:37

still using nowadays or they are using

play04:40

only Swift

play04:42

yeah so for new features and new

play04:45

projects we are only using Swift and

play04:48

sf2i maybe but because uh objectivity C

play04:52

has a great interoperability with swift

play04:55

so if you have like a code reading like

play04:58

a few years ago you can like it

play05:02

communicates with Swift in a great way

play05:05

so we're not using objectives anymore

play05:08

just for like old projects but we are

play05:11

still migrating from your objectivity to

play05:13

serve because it's way better in my

play05:15

opinion nice and yeah and do you think

play05:18

that it's important for developers to

play05:20

know objective see if they want to start

play05:22

in this world or they they must start

play05:27

with Swift and then go on

play05:31

I think they can start with swift

play05:33

nowadays because as I said they're like

play05:36

the new projects and the new features

play05:38

that we're current building like they

play05:40

are all in Swift but there are some

play05:42

projects that still use this objectivity

play05:45

so maybe at some point they will need to

play05:48

like study a little bit about

play05:50

objectivity but for starters I think

play05:52

it's probably the best way to start with

play05:55

swift just to understand a little bit

play05:56

right

play05:57

yeah all right all right all right so

play06:01

um could you please

play06:03

um explain me okay what what are the

play06:06

main difference between uh you create

play06:08

one application for Apple watch for Max

play06:11

and for Apple TV and for iOS and so on

play06:15

for example

play06:17

yeah so uh basically we can use apple

play06:20

uses Swift for all of its platforms like

play06:22

uh iOS that it's the the OS for the

play06:27

iPhones for watch OS for app watch the

play06:30

TV OS that it is for Apple TV so

play06:34

basically we can like for iOS we can

play06:38

build an app for iOS and it can run

play06:40

share the code with the Apple watch or

play06:43

the iPads or even with the Mac OS so we

play06:47

have great uh things

play06:49

um a great ways to like share the code

play06:51

between all the platforms from Apple

play06:53

nice really nice all right and what

play06:57

could you tell me about uh deep link uh

play07:00

in iOS what's deep link

play07:03

well so deep links uh there are links

play07:07

that are used to send users like direct

play07:09

to a point of your apps for screen or

play07:12

something like that so

play07:14

um

play07:15

Apple introduced us the universal links

play07:18

that's a new approach to connect your

play07:20

web page

play07:21

so we are uh to our app under the same

play07:25

link so if you click to a universal link

play07:27

and your app was set up with this new

play07:31

this new Universal link API so instead

play07:35

of if you don't have that installed on

play07:37

your iPhone you'll be redirected to your

play07:40

like the App Store so you can download

play07:43

the app and open the app right on the

play07:45

page that you are looking for that's

play07:47

nice so let's suppose I am on touring

play07:50

webpage website and then to the says uh

play07:53

download our app and then when I click

play07:55

in this link it will try to it will

play07:58

check if I have this uh app installed in

play08:01

my device if not it will redirect to uh

play08:04

Apple Store in the app page when I click

play08:07

and download it will download and open

play08:09

the the app is that

play08:12

yeah yeah basically that it's amazing

play08:14

nice all right next question I have for

play08:17

you okay uh what is gcd uh gcd and iOS

play08:21

in general

play08:23

okay so DCd stands for Grand Central

play08:26

Dispatch it's a low level API that

play08:28

enables users to run concurrent tasks

play08:31

like a current

play08:32

simultaneously by managed tradings

play08:35

threatens in the background so today we

play08:38

have uh lots of complex apps that needs

play08:42

to run simultaneous tasks so the the gcd

play08:46

it's a apple solution to build the

play08:48

concurrency and parallelism into iOS

play08:51

applications and so you can run multiple

play08:54

tasks in background simultaneously and

play08:58

this will not affect like the main

play08:59

thread or your main app so you can still

play09:02

using like your features while other

play09:05

things are currently are happening in

play09:08

the background

play09:09

all right okay got that but

play09:13

um so how we can achieve uh concurrence

play09:17

in iOS so is that the only way to do

play09:20

that or there's or is there any other

play09:22

possibility

play09:23

okay so basically we have three ways to

play09:26

achieve the concurrency so one of them

play09:29

are the dispatch queues so they are used

play09:32

to manage uh tasks like my fifth order

play09:35

first in First South where they can

play09:38

basic execute it sequentially or

play09:41

concurrently this is an easy way to

play09:44

handle a secret a synchronous tasks in

play09:47

your application you know so the second

play09:50

way we can use threads so we can start a

play09:52

thread and like uh run a code in this

play09:56

separated thread and it will run uh

play10:02

concurrently with the main traged that

play10:04

of that or your app can have like many

play10:07

threads

play10:08

and having a threat is special it's

play10:12

useful uh when you need to perform uh

play10:14

some tests that it will take a long time

play10:17

to to run you know

play10:18

and we have also the operation skills

play10:21

the operation queues they are high level

play10:24

abstractions they were built on top of

play10:27

the gcd that we talked before and it is

play10:31

possible to

play10:33

execute tasks like concurrently just

play10:36

like this the gcd but in object-oriented

play10:40

manner

play10:41

all right so then I have two dummy

play10:43

questions for you okay I hope you don't

play10:45

kill me about this question but yeah so

play10:48

first question

play10:50

um what happened when you put our app in

play10:54

background for example if I'm using 2D

play10:56

app and then I just uh swiped up and

play11:00

then go to the main page what what what

play11:02

happened and what what can I do there

play11:06

okay so basically when you put your app

play11:08

and background uh the main thread it's

play11:11

like suspended and the background

play11:15

threads can uh perform some actions that

play11:19

you are explicitly say to perform so you

play11:22

can uh continue using the user's

play11:26

location for Rideshare apps uh in

play11:29

instance so also you can have like some

play11:33

kind of synchronization with your

play11:36

um background back end or if you or with

play11:38

your API but you cannot perform like

play11:41

have your uh have tasks like that

play11:44

demands among a lot of power or energy

play11:46

or processing from your app from the iOS

play11:50

you know yeah and how much time our web

play11:53

can stay in the background

play11:55

so it's defined by the iOS the iOS

play11:59

defines how much time your app can stay

play12:02

alive in background

play12:04

it depends on your available memory the

play12:08

processing the app that is currently in

play12:10

the in the foreground like is running

play12:13

uh active at the same at the time you

play12:17

know so it's defined by the iOS all

play12:19

right in my second question for you is

play12:21

what's the difference between app ID and

play12:24

bundle ID

play12:26

okay so the bundle ID is uh it's the

play12:29

unique identifier for applications in

play12:32

the whole apples ecosystem so we have

play12:34

the bundle identifier for your IOS app

play12:37

the bundle identifier for your

play12:39

uh watch OS app for your Apple TV app so

play12:45

they are for the whole Apple system uh

play12:50

they use it they are used to reckon just

play12:53

to recognize your app and for updates

play12:55

and this kind of stuff and the app ID

play12:58

it's a string that uniquely identifies

play13:00

one or more apps from the same

play13:02

development team so we have uh

play13:05

development teams for the Apple

play13:07

developer and uh this string the app ID

play13:11

has two components the team ID and your

play13:15

bundle ID from your app

play13:17

got you so so if you have one

play13:20

application that runs in my my cell

play13:24

phone and another one that runs my Apple

play13:26

watch so how can I set up it and to

play13:30

identify they are the same

play13:32

yeah so we will need to set a different

play13:34

bundle identity a different bundle

play13:37

identifier for your iOS targets we call

play13:40

it Target so we have the iOS Target and

play13:43

the watch West Target so we you can set

play13:46

them separately different they must have

play13:49

differently okay bundle with two

play13:52

different bundle ID and when it comes to

play13:54

the app ID

play13:56

two different two

play13:57

yeah exactly because you get the bundle

play14:00

ID and the team ID the team ID will be

play14:03

the same but the bundle ID will be

play14:04

different all right so in terms of

play14:06

performance uh what techniques we can

play14:09

apply in our app to improve the

play14:11

performance or the user the the managing

play14:14

memory and stuff like that in our

play14:17

application

play14:18

okay so well we can do a lot of things

play14:21

while we are creating a new feature

play14:24

developing our code so we can use like

play14:27

uh multiple threads I start processing

play14:31

different threads or background threads

play14:33

so we can do uh some hard work uh in the

play14:38

background or if you have to do lots of

play14:41

API calls you can use uh

play14:44

simultaneously using concurrency also

play14:48

you can use uh lady prop lazy properties

play14:50

and a lot of

play14:52

stuff nice nice and speaking about lazy

play14:55

property what's lazy property

play14:58

okay so the latest properties are

play15:00

properties who's the initial value isn't

play15:03

computed until the first time they are

play15:06

used so you just need to include a lady

play15:09

a lazy a modifier to your Declaration of

play15:13

your property and this lets uh this will

play15:18

delay the initialization the

play15:20

initialization of this property so this

play15:22

is a a good thing to

play15:25

save your memory or save energy because

play15:29

if you have a property that needs to do

play15:31

some kind of uh uh work hard work or you

play15:36

can reduce this unnecessary work like

play15:38

you know so it will be computed just

play15:41

when you use it in your code your call

play15:43

it your function or something like that

play15:45

nice nice all right and when it comes to

play15:48

design pattern okay do you think design

play15:50

patterns are important nowadays if so

play15:53

what design pattern are they using and

play15:57

if not what should they do

play16:01

okay so I think design patterns are

play16:04

really important for most uh all the the

play16:07

software development because it allows

play16:10

us to uh make our code more

play16:13

understandable and you can add more

play16:16

features in an easy way

play16:18

and specifically for iOS development you

play16:22

can use a lot of different design

play16:24

patterns

play16:26

um so

play16:28

when for the UI kids apps uh Apple

play16:32

always like tried to use the MVC the

play16:34

model of your controller uh it's where

play16:37

we can like have mainly three components

play16:41

like the view uh the controller and the

play16:44

model

play16:45

um the view is what the user sees uh the

play16:48

controller it's everything that controls

play16:51

this view or get information for it and

play16:54

the model are your models for your app

play16:57

and

play16:59

we have the mvvm that's commonly used

play17:02

for the new Swift UI where we have the

play17:05

model view the model where the model is

play17:09

are the models from your app the view is

play17:12

what your user sees and the view model

play17:15

is what connects your view

play17:18

to your model that's why it's called

play17:20

view model but for iOS we can use lots

play17:24

of other design patterns like Singleton

play17:27

uh Builder and many others got you and

play17:31

when it comes to testing okay what are

play17:35

the best practice in terms of testing

play17:37

your application

play17:39

is DDD bdd any of this design pattern or

play17:43

these techniques use it or is there

play17:46

another one that you recommend

play17:49

oh yeah so tdd is really important to

play17:52

use I think in my opinion because it

play17:55

allows us to plan the features and build

play17:59

the features already with your tests so

play18:01

basically we will we start developing

play18:04

your feature by the test so you create

play18:06

your tests let them fail because you

play18:08

don't have your classes yet so and then

play18:11

you implement your code and you run the

play18:14

test and if your test passes you can

play18:17

improve your code and this is amazing

play18:21

because uh we can gain sites into both

play18:24

quality of the implementation if it is

play18:27

work and the quality of design if it's

play18:30

well structured and it's a good a good

play18:34

code that you have reading you know all

play18:37

right yeah I totally agree with you so

play18:40

tdd is really important not only to

play18:42

debits as much as you test your

play18:44

application you will avoid further

play18:46

problems believe me yeah all right and

play18:49

and the next thing that come to my mind

play18:52

is to talk about complexion handle okay

play18:56

uh what's completion Handler

play18:59

well uh completion hinders uh are

play19:03

basically just functions passed as

play19:05

parameters to other functions so they're

play19:08

using to dealing with response of a

play19:10

synchronous task since we we do not know

play19:13

like when it will end so we use a

play19:16

completion Handler to perform uh an

play19:19

actual after your asynchronous code was

play19:21

uh uh was run and but now we have the

play19:27

new synchronous uh the swiftest

play19:29

synchronous API that we they introduced

play19:33

the async uh await keywords where you

play19:36

can like uh using them you don't need to

play19:39

use the completion handles anymore nice

play19:41

yeah it's pretty uh pretty similar what

play19:45

they are doing with uh c-sharp and

play19:47

JavaScript as well so you can just think

play19:49

a way to introduce that in JavaScript

play19:51

and that's pretty great all right and

play19:54

before we go to our next question I

play19:57

would like to open our developers out

play19:59

there and if you have three places of

play20:01

experience and they are confident with

play20:02

your text tag go to touring.com I'll put

play20:05

the link into the description section

play20:06

below okay go to touring.com create your

play20:09

profile there search for the job that

play20:11

are suitable for your text tag and when

play20:13

you find it you can apply for that all

play20:16

you need to do is pass in the touring

play20:17

fetching process once you complete

play20:19

everything process you get a job 100

play20:21

remote and as we did okay if you enjoyed

play20:25

this content please consider to give a

play20:26

big fat thumbs up for this video and

play20:28

comment down below uh what kind of talks

play20:30

you would like to have uh to see in the

play20:32

upcoming video if you are not subscribed

play20:34

subscribe to our YouTube channel uh

play20:37

clicking in the bottom below and come

play20:40

back to you David what do you understand

play20:42

okay what could we tell us about Dynamic

play20:45

dispatch

play20:46

okay so in simple terms Dynamic dispatch

play20:50

means that the program designs decides

play20:53

at the runtime

play20:54

which implementation of a particular

play20:56

method or function it needs to invoke in

play20:59

the case where a subclass overrides a

play21:01

methods or if it's upper class Dynamic

play21:04

dispatch there means determines whether

play21:07

to invoke the subclass implementation

play21:09

of the method are the parents it takes

play21:12

more time like it it makes your code a

play21:16

little bit slower using the dynamic

play21:18

dispatch okay so previously we talked

play21:21

about async await right which were a

play21:24

great addition in iOS developing the iOS

play21:27

world and so but I think I wait is for

play21:30

uh can I say for asynchronous operations

play21:33

or asynchronous tasks right but uh if

play21:38

they are starting with iOS from now okay

play21:41

from this video what do you understand

play21:45

about the difference between synchronous

play21:47

and asynchronous tasks in iOS how can we

play21:50

explain it to our audience

play21:53

okay uh so for synchronous tests uh they

play21:57

are performed one at a time therefore uh

play22:00

other tests must wait until the previous

play22:02

task is completed before continue

play22:05

for a synchronous tasks there runs

play22:08

simultaneously in the background so if

play22:10

the if background texts are completed

play22:12

you'll be notified and a synchronous

play22:15

programming allow us to process mood

play22:17

proquests at the same time so you can

play22:19

accomplish more tests in a shorter

play22:21

amount of time you know okay let me see

play22:24

if I get that so uh synchronous tasks

play22:27

means it will be executing in the main

play22:29

thread and then it go one by one let's

play22:32

suppose you have a table uh with 10

play22:34

lines and then you want to uh iterate

play22:37

over this table it will be executing the

play22:40

main thread and you go for line one and

play22:42

then do whatever we need to do then line

play22:44

two then line three line four and then

play22:46

so on correct but asynchronous means

play22:51

that it will be executed in a different

play22:52

thread or the same thread as well

play22:54

because this is I'm a bit confused so

play22:57

different threads and then I can go for

play23:00

uh execute that I can read the 10 lines

play23:04

at the same times in different in in 10

play23:06

different process and when it process

play23:09

each process finish it will send me a

play23:11

message is it like that

play23:14

okay so the synchronous test not

play23:18

necessarily will be

play23:20

um uh run in the main thread I mean you

play23:23

can start like a synchronous synchronous

play23:26

tasks in a background thread so it is it

play23:29

is possible and for the a synchronous

play23:32

test they are start they start at the

play23:34

same time I mean like one doesn't one

play23:37

test don't need to wait to the other

play23:40

test to finish so all of them start at

play23:42

the same time in different queues and we

play23:46

can like start for all of them to finish

play23:48

to continue our code you know you can

play23:51

get notified when all of them are

play23:53

finished oh got you so then I have

play23:56

follow-up questions so we wait we will

play23:59

be notified when all of them uh finish

play24:02

processing or one when each one so if

play24:06

you want finish we will be notified and

play24:08

then another one thing to be notified

play24:11

you can have both behaviors it depends

play24:13

on your implementation but you can get

play24:15

that fire when all of them are completed

play24:18

or when a specific one is completed nice

play24:22

all right yeah you clarify my mind thank

play24:25

you all right and as that said that was

play24:27

my last question and then I just want to

play24:30

ask you if you have anything to add okay

play24:33

uh resource did that if they are

play24:36

inspiring to be a iOS Developer like you

play24:38

and work at tutoring where they can

play24:41

learn uh what they could learn about iOS

play24:43

what what's the best place to learn

play24:45

about iOS well so we have a lot of uh

play24:48

things on the internet so I mean we have

play24:50

the Apple documentation we have a lot of

play24:54

great uh blogs like uh talking about iOS

play24:59

development so they are great resources

play25:01

for us to understand and to learn about

play25:05

iOS development in general in the

play25:07

community community is really great you

play25:10

know with this we come to the end thank

play25:12

you Dave for this amazing talk okay that

play25:15

was my pleasure to talk with you today

play25:17

oh thank you Jose it was a pleasure uh

play25:21

being here today talking to you thank

play25:23

you for everything

play25:24

cool I hope to see you again soon okay

play25:26

and to everybody else so don't forget to

play25:29

subscribe to our Channel okay hit the

play25:31

button below and give us a big fat

play25:33

thumbs up if you enjoyed this video and

play25:36

don't forget to follow today on LinkedIn

play25:38

Instagram Facebook Twitter Clubhouse

play25:40

YouTube so we are in everywhere so keep

play25:43

close to touring then I'm pretty much

play25:45

sure that we'll get the job that you

play25:47

deserve okay as that said that's a wrap

play25:50

thank you and hope to see you all again

play25:52

take care foreign

play25:56

[Music]

Rate This

5.0 / 5 (0 votes)

Do you need a summary in English?