Swift: Dynamic Member Lookup Intro (Xcode 13, 2022) – iOS

preview_player
Показать описание
In this video we will take a brief introductory look at Dynamic Member Lookup in Swift and Xcode. A feature designed to allow for runtime lookup of properties via subscripts, DynamicMemberLookup annotations are easy to use but powerful in practice. Designed to enable interop with scripting languages like Python, Dynamic Member Lookup is a pillar for for swift compatibility.

** Popular Series

** Get Skillshare free for 2 Months and learn iOS

** Manage all your investments from app earnings on Betterment!

** Grow your own Youtube tech channel with TubeBuddy:

#swift #dynamicMember #interoperability
Рекомендации по теме
Комментарии
Автор

Awesome video! Would love to see more practical examples of this, can’t believe I’ve never heard of it before.

eric
Автор

Great video! You explained it very well. Also Yes, a more practical example would be very interesting to watch.

vinealviji
Автор

Never used that before. Such a cool Thing.

xcoder
Автор

Great video as always Afraz!!! Thank you so much

marcosfvarani
Автор

could you make another vid of this for whats applicable?

bobs
Автор

could you do a video on the shortcuts integration ( with the Souphef sample code project) please. Best Regards

alexunbekannt
Автор

Thanks A lot that is great
I have a question how to switch to other story board from NSObject class I used what you wrote but it said no present in NSObject please help me

rafatwasef
Автор

How do you find like these features Afraz? I mostly learn new features from you.

himanskss
Автор

Nice video. Interested to know the practical use case of this topic in real life complicated applications.

anurantheassassin
Автор

Great video! I was just watching one of your json videos and was wondering if Swift had a dynamic mechanism like this video shows. My specific "more practical" use case is how to interop with json (TypeScript atm not Python but 🤷‍♂️). So in your example here, you're always returning a String, but is there a clever & clean way to have a looser base protocol with an "any" or map type and then wrap it with a more concrete protocol? E.g

name: String;
detail: Any; (dynamic)

Then later in code, cast as
name: String
detail: {
address: String;
count: Int;
}

Sorry typing on phone... great video regardless! Thank You!

ibgib
Автор

How can we nested values of JSON using this

arjunhanswal
Автор

Can this be used with json instead of codebel ?

musbahabushaban
Автор

Haha, The thumbnail image with waves like graphic makes video look like unseen, It does not show progress bar as it is getting merged with same color. Seeing this video again 😂
btw nice topic

rebellious_
Автор

Hey! So can we execute python script on ios using dynamic lookup?

ahmedmujahad
Автор

Great video, but this seems useless and a bit dangerous… anyone?

leifashley
Автор

Seems absolutely useless and unjustifiably dangerous. Is there any example where this can bring any benefit and does not make the whole system less predictable and sustainable?

oleksandrbalan
Автор

nice tutorial, there could be just a dictionary inside a class then the syntax would be
myClass.json["member"] vs myClass.member
or there could be subscript on the class for strings to map them to the dictionary then the syntax would be
myClass["member"] instead of myClass.member
there are also ways to avoid typing strings for subscripts which reduces typing errors.

me-timeline