tag:blogger.com,1999:blog-25658974708444009012024-03-13T11:33:20.384-07:00A Passionate Technologists' Journal I write mostly on Technology!A Passionate Technologists' Journalhttp://www.blogger.com/profile/14721983341617245683noreply@blogger.comBlogger49125tag:blogger.com,1999:blog-2565897470844400901.post-3298063512322166532023-04-08T22:17:00.013-07:002023-04-08T22:24:38.619-07:00Is it possible to scale an application to INFINITY?<p class="p1" style="font-family: "Helvetica Neue"; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 13px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 0px;">If you’re designing software systems, then read on otherwise just drop off since this might feel abstract for you.</p><p class="p2" style="font-family: "Helvetica Neue"; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 13px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 0px; min-height: 15px;"><br /></p><p class="p1" style="font-family: "Helvetica Neue"; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 13px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 0px;">In today’s world, there are only 2 kinds of businesses: tech businesses or tech-enabled businesses, any other business that doesn’t fall under these categories would eventually die off, that’s a fundamental fact!</p><p class="p2" style="font-family: "Helvetica Neue"; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 13px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 0px; min-height: 15px;"><br /></p><p class="p1" style="font-family: "Helvetica Neue"; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 13px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 0px;">What does HIGH availability & INFINITE scaling mean in the first place?<span class="Apple-converted-space"> </span></p><p class="p1" style="font-family: "Helvetica Neue"; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 13px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 0px;">In a non-sensical way, it is to serve everyone on the internet, considering your service is consumed by every single user/device that’s connected to the internet, which in itself is a myth as it never happens with any given service that it gets used by all the devices on this planet, so the capping already happens at multiple layers like country policy, govt policy blocking certain services & so on, but let's just pretend that your services get consumed by all the devices that are connected to the internet, in that case, is it possible to serve your services/APIs to all those devices?</p><p class="p2" style="font-family: "Helvetica Neue"; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 13px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 0px; min-height: 15px;"><br /></p><p class="p1" style="font-family: "Helvetica Neue"; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 13px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 0px;">APIs are the central nervous system of the internet, so, the real question should ideally be this: are APIs INFINITELY scalable?</p><p class="p2" style="font-family: "Helvetica Neue"; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 13px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 0px; min-height: 15px;"><br /></p><p class="p1" style="font-family: "Helvetica Neue"; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 13px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 0px;">The fundamental fact is that for any given tech-based business, all it matters is, at the end of the day, your APIs have to be HIGHLY available & scalable, that’s all there is to it and that’s the goal that any business tries to achieve.<span class="Apple-converted-space"> </span></p><p class="p1" style="font-family: "Helvetica Neue"; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 13px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 0px;">Now, another form of the same question is: Is it possible to design a system with APIs that are highly available and scalable?<span class="Apple-converted-space"> </span></p><p class="p2" style="font-family: "Helvetica Neue"; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 13px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 0px; min-height: 15px;"><br /></p><p class="p1" style="font-family: "Helvetica Neue"; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 13px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 0px;">For all those forms of questions, the short answer is “YES”, but it all boils down to or really depends on what you are trying to achieve.</p><p class="p2" style="font-family: "Helvetica Neue"; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 13px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 0px; min-height: 15px;"><br /></p><p class="p1" style="font-family: "Helvetica Neue"; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 13px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 0px;">If you’re having a legacy app, then most probably you should’ve seen the evolution of architecture from Monolithic to multi-tier and though there are many standard principles of designing a system, there’s no one right approach/solution that fits all the problems, every solution is tailor-made for the problem that you’re trying to solve.</p><p class="p2" style="font-family: "Helvetica Neue"; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 13px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 0px; min-height: 15px;"><br /></p><p class="p1" style="font-family: "Helvetica Neue"; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 13px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 0px;">For those who’re stuck on the question: ’whether/if it’s good to go with the micro-service-based architecture for my system?’</p><p class="p1" style="font-family: "Helvetica Neue"; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 13px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 0px;">To them, I’d like to say this: try to come out of the peer pressure you’re having from your industry peers.<span class="Apple-converted-space"> </span></p><p class="p1" style="font-family: "Helvetica Neue"; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 13px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 0px;">Just because some X company implemented it, it doesn’t really mean that you should also go with the same approach. If you’re able to achieve the availability & scalability that your business actually needs or anticipates with whatever architecture of the system you’ve laid out, just go with that and don’t let others define what works for you based on the holistic view they might have about the business, but just believe that you already know how to make your system scalable to serve your customer base and there’s no holy grail system that does it out-of-the-box but you have to come up with solutions to optimize your system to make it adaptable to whatever un/limited number of users your business is bound to serve.</p><p class="p2" style="font-family: "Helvetica Neue"; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 13px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 0px; min-height: 15px;"><br /></p><p class="p1" style="font-family: "Helvetica Neue"; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 13px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 0px;">I wanted to put this note out there since it felt like the right thing to do, ATPIT!</p>A Passionate Technologists' Journalhttp://www.blogger.com/profile/14721983341617245683noreply@blogger.com0tag:blogger.com,1999:blog-2565897470844400901.post-1467615178999595892023-02-18T23:46:00.003-08:002023-02-18T23:46:38.633-08:00Abstractly on Flutter<p>Flutter framework is the only framework that has come closer to satisfying this adage: "Write once, Deploy anywhere"</p><p><br /></p><p>Flutter apps could be literally deployed on all the major platforms that any business wants to that includes Web, Mobile(iOS/AOS), Desktop (masOS, Windows, Linux), which covers all the major platforms and there's really no need of writing platform specific code as Flutter framework does it under the hood for you plus there are a variety of plugins written by a thriving community that makes it even easier to develop apps.</p><p>basically, with Flutter you have everything you need to develop apps without worrying about maintaining multiple platform codebases which is the main reason[read: lower costs] why companies opt for cross-platform frameworks in the first place. </p><p><br /></p><p>listing out the pros&cons on a very high level:</p><p><b>Pros:</b></p><p></p><ul style="text-align: left;"><li>good documentation</li><li>apps are fast since for ex mobile apps are not reliant on the Javascript bridge for communicating with the native layer</li><li>open sourced</li></ul><p></p><p><br /></p><p><b>Caveats:</b></p><p></p><ul style="text-align: left;"><li>Flutter apps aren't native, so still there are some build/profiling time & app size tradeoffs that we have to make, which is inevitable</li><li>Flutter is a fairly new one and hence nurturing & developing the community would take a bit of time which limits us to the available tools & libraries</li></ul><p></p><p><br /></p><p><br /></p><p>if you're planning to go with a cross-platform framework, I'm wondering why would anyone want to develop a frontend app on any platform using any other framework when Flutter could do pull that with ease beating almost all the other cross-platform/hybrid framework out there.</p><p>It's the decision maker in an organisation who decides which framework to use and if the decision maker isn't adopting & upgrading themselves, they'll surely be less informed about the differences between the frameworks and are sure to go with the sub-optimal one, which always happens with most organisations out there.</p><p>this is nothing against other frameworks(RN, Ionic, etc) but a fact that you know why its better to choose Flutter over others, if not for other reasons, at least you could rationalise yourself that it is not necessary for a popular thing to be the best.</p><p>as of today, its not totally wrong to choose React Native but if you're starting from scratch and your team has people whose expertise is not just with javascript, then there's no reason why you shouldn't choose Flutter.</p><p><br /></p><p>like my <a href="https://medium.com/gitconnected/musicly-noisli-in-react-native-efd14023bd7c" target="_blank">earlier post</a> on React Native, I've rewritten the same app using Flutter and have <a href="https://github.com/saru2020/Musicly_Flutter" target="_blank">open sourced it</a> for your perusal</p><p>note: I re-wrote this app in just about couple hours</p>A Passionate Technologists' Journalhttp://www.blogger.com/profile/14721983341617245683noreply@blogger.com0tag:blogger.com,1999:blog-2565897470844400901.post-42109146114969000002022-11-29T10:41:00.012-08:002022-11-29T10:45:22.480-08:00 WWDC 2022 Keynote - Summary<p> <b style="font-family: "Helvetica Neue"; font-size: 20px;">WWDC 2022 Keynote - Summary</b></p><p class="p2" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 15px;"><br /></p><p class="p3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Intro by Tim Cook</p><p class="p2" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 15px;"><br /></p><p class="p3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><b>iOS (Enter Craig)</b></p><p class="p3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">iOS 16 features:</p><ul class="ul1" style="list-style-type: circle;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Lock Screen updates video with loads of personalization</li><ul class="ul1"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">customization of every single element on the screen,<span class="Apple-converted-space"> </span></li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Like Watch faces, you can now have multiple lock screens, <span class="Apple-converted-space"> </span></li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Notifications are shown only at the bottom of the screen,<span class="Apple-converted-space"> </span></li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Live Activities API (real-time info like match updates, drive location updates, health metrics updates, etc)</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">a Full-screen now-playing music app view</li></ul><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Focus updates:</li><ul class="ul1"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Focus filters to focus on one single activity at a time</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Focus API to implement in the app</li></ul><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Messages Updates:</li><ul class="ul1"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">You can edit the messages that are already sent</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">You can undo/delete the messages</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Mark any thread as unread</li></ul><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Shared with You:</li><ul class="ul1"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">APIs for developers to integrate into the apps</li></ul><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">SharePlay (watch/play together with anyone)</li><ul class="ul1"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">integrated into FaceTime</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">integrated into Messages</li></ul><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Dictation updates:</li><ul class="ul1"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Voice & keyboard can be used in-conjunction</li></ul><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">App Intents API - shortcuts work with zero setup</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Live text updates:</li><ul class="ul1"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Interact with text in the video by pausing it</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Converting currency and translating a foreign language with just a tap</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Live Text API for 3rd party apps</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Visual look-up (details of objects in an image) [introduced last year] but now extended, take any object from an image and put it into the Messages app</li></ul><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Wallet updates:</li><ul class="ul1"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Keys integration with multiple products</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Apple pay:<span class="Apple-converted-space"> </span></li><ul class="ul1" style="list-style-type: circle;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">tap to pay, contactless payments with no additional hardware or payment terminals</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Apple Pay later, lets you pay in four equal payments spread over 6 weeks with 0 interest & no fees —> for developers, no extra effort is required, it just works with the standard Apple Pay integration</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Order tracking directly in the wallet by the merchants</li></ul></ul><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Maps updates:</li><ul class="ul1"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Added support for more than 20+ countries</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Multi-stop routing - add up to 15 stops</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Transit costs estimator</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">MapKit updates with light & dark modes, look around, and server-side APIs to build faster & flexible ways of building maps experience</li></ul><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Sports updates</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Family sharing, parental controls, approve requests from the Messages app, iCloud shared library (adds automatically based on the rules)</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Privacy</li><ul class="ul1"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Introducing Safety check - stop sharing locations, reset privacy permissions</li></ul><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Ecosystem:</li><ul class="ul1"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Home - automation updates</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">CarPlay updates</li></ul><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Personalized spatial audio - can now be customized/precise even further by using the true depth camera on iPhone tuned just for you</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Quick note<span class="Apple-converted-space"> </span></li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">More Memoji customizations</li></ul><p class="p2" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 15px;"><br /></p><p class="p3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><b>Apple Watch / watchOS9:</b></p><ul class="ul1" style="list-style-type: circle;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">New watch faces - shows cloud coverage around the world, lunar calendar, playtime, metropolitan</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">New Siri UI, new banner notifications, and active apps pinned to the top of the dock for quick access</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">New Share sheet & photos picker APIs, with CallKit call directly from the watch</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Fitness updates: Vertical oscillation detection using accelerometer & gyroscope (used to help wasteful vertical movements while running)+ other metrics, multi-sport workouts</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Sleep updates: sleep stages (awake, REM, core, deep),<span class="Apple-converted-space"> </span></li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">heart stroke detection (Atrial Fibrillation),<span class="Apple-converted-space"> </span></li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">medications tracker</li></ul><p class="p2" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 15px;"><br /></p><p class="p3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><b>Mac / macOS Ventura:</b></p><ul class="ul1" style="list-style-type: circle;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Introduced M2, metrics improvement in comparison with others</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Introduced new Macbook air & MacBook Pro, MagSafe is back</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Stage Manager: Focuses on the current app and organizes all the windows of a single app</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Spotlight: take a peek at the results with a tap on the space bar, live text: search text inside the image, and create a timer right from the search, this feature is also coming to iOS & iPadOS, on iOS spotlight entry point is placed just above the dock</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Mail App updates: search typo fix changes</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Safari app updates: shared tabs with live status of who’s looking now</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Passkeys (Apple’s password replacement approach): create a passkey with just the biometric, passkeys are used only for the site it was created for, passkeys can be phished/leaked since it never leaves the devices, synced only via iCloud, works cross-platform by signing in with the iPhone via QR code(presented on any other platform device)</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Gaming:<span class="Apple-converted-space"> </span></li><ul class="ul1"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Metal3: metal FX upcoming - to render complex scenes faster,<span class="Apple-converted-space"> </span>fast resource loading API - minimizes wait by providing a path from storage to the unified memory system</li></ul><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Handoff comes to FaceTime</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Continuity Camera: use the iPhone camera with a stand on top of the Mac and it gives these features: center stage, portrait mode with blur effect, studio light, desk view</li></ul><p class="p2" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 15px;"><br /></p><p class="p3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><b>iPadOS16:</b></p><ul class="ul1" style="list-style-type: circle;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">All iOS features</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Weather app - weather kit to integrate into 3rd party apps</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Collaboration - work with others across a variety of apps and it's coming to iOS & macOS as well</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Freeform app - an all-in-one app (more like a Notion competitor) for all apple platforms</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Gaming - background download API, jump into the app/game w/o creating an account via GameCenter account, GameCenter dashboard</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Desktop Class apps - undo/redo across the system, updates to Files app, redefined find & replace the experience that works inline, customizable toolbars, desktop-class app APIs</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Reference color, Reference mode<span class="Apple-converted-space"> </span></li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Stage Manager: same features as macOS, connect to an external display,<span class="Apple-converted-space"> </span></li></ul><p class="p2" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 15px;"><br /></p><p class="p3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Outro by Tim Cook</p>A Passionate Technologists' Journalhttp://www.blogger.com/profile/14721983341617245683noreply@blogger.com0tag:blogger.com,1999:blog-2565897470844400901.post-64327276849755820582021-06-07T11:55:00.000-07:002021-06-07T11:56:51.891-07:00 WWDC 2021 Keynote - Summary<p> <b style="font-family: "Helvetica Neue"; font-size: 20px;">WWDC 2021 Keynote - Summary</b></p><p class="p2" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 15px;"><br /></p><ul class="ul1" style="list-style-type: circle;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Starts with developers around the world giving out crazy ideas to start the event with a short film for it</li></ul><p class="p2" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 15px;"><br /></p><ul class="ul1" style="list-style-type: circle;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Tim Cook enters into an auditorium with a huge audience with Memoji faces</li></ul><p class="p2" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 15px;"><br /></p><h2><ul class="ul1" style="list-style-type: circle; text-align: left;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">iOS: (Enter Craig, the hero)</li></ul></h2><ul class="ul1" style="list-style-type: circle;"><ul class="ul1"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Introduces iOS15</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">FaceTime</li><ul class="ul1" style="list-style-type: circle;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Audio:</li><ul class="ul1" style="list-style-type: circle;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Spatial audio in FaceTime (Sound that comes in the position of the person in the video)</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Microphone - Voice Isolation prioritizes the audio of the person in the video talking</li></ul><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Video</li><ul class="ul1" style="list-style-type: circle;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Highlights the person talking</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Portrait mode (blurs the background)</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Facetime Link to invite for calls (anybody from the web could join the call)</li></ul><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">SharePlay - Listen to music, watch movies, share screens,<span class="Apple-converted-space"> </span></li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Share playback controls [Very much required in the post-covid world] (API’s open for 3rd part developers)</li></ul><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Messages:</li><ul class="ul1" style="list-style-type: circle;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Images collage/stack view in Messages app [News App will have a separate section that lists all the links shared by others]</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Music, Photos & other apple apps content gets linked</li></ul><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Focus:</li><ul class="ul1" style="list-style-type: circle;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Notifications Summary - A new grouping of social(depending on your usage) notifications<span class="Apple-converted-space"> </span></li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Group apps into your own categories and a time slot for them</li></ul><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Live Text - Copy/paste text by taking a pic from the camera instantaneously -<span class="Apple-converted-space"> </span></li><ul class="ul1" style="list-style-type: circle;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">A nice feature that demonstrates Deep neural network implementation [Works with many languages].<span class="Apple-converted-space"> </span></li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">You can search for objects, landmarks.<span class="Apple-converted-space"> </span></li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">You can search(spotlight) for the photos with location, people, text, numbers, landmarks, etc</li></ul><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Photos:</li><ul class="ul1" style="list-style-type: circle;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Apple Music applies to the memories with videos built on the fly with the help of ML algos</li></ul><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Wallet:</li><ul class="ul1" style="list-style-type: circle;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Remove your keys: Unlock the car, home (with partners systems)</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Driving License linked to Wallet makes to prove your identity</li></ul><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Weather:</li><ul class="ul1" style="list-style-type: circle;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">New design, animations & layout representing the real weather</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Full-screen weather/heat maps</li></ul><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Maps:</li><ul class="ul1" style="list-style-type: circle;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">3d layouts, new colors, night mode & layout for landmarks, roads, etc</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Rich annotations & roadmap for drivers</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Augmented reality-based direction for top cities to start with</li></ul><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">+ much more (not explained)</li></ul></ul><span style="font-family: Helvetica Neue;"><span style="font-size: 13px;"><br /></span></span><h2><ul class="ul1" style="list-style-type: circle; text-align: left;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">EarPods/ AirPods:</li></ul></h2><ul class="ul1" style="list-style-type: circle;"><ul class="ul1"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Helps Focus on the person talking in the front</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Announce Notifications w/o looking at the iPhone</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Find EarPods with maps’ proximity sensors</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Notifications alert when you leave your EarPods behind</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Spatial Audio with dynamic head tracking</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Dolby Almost on Apple Music for most music</li></ul></ul><span style="font-family: Helvetica Neue;"><span style="font-size: 13px;"><br /></span></span><h2><ul class="ul1" style="list-style-type: circle; text-align: left;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">iPadOS:</li></ul></h2><ul class="ul1" style="list-style-type: circle;"><ul class="ul1"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Introduces iPadOS 15</li><ul class="ul1" style="list-style-type: circle;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Widgets:</li><ul class="ul1" style="list-style-type: circle;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Widgets customization on many levels</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">App Library for better categorization/organization</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Option to Hide pages</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Option to Reorder pages</li></ul><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Multitasking:</li><ul class="ul1" style="list-style-type: circle;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Buttons to divide the screen</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Overlapping of multiple windows in the app</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Introduces Shell (= dock in Mac)</li></ul><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Notes:</li><ul class="ul1" style="list-style-type: circle;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Mention people<span class="Apple-converted-space"> </span></li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Activity view</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Add tags (Fab!, I love it)</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">QuickNote<span class="Apple-converted-space"> </span></li><ul class="ul1" style="list-style-type: circle;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Appears when dragged from the right bottom</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">I can draw or write/scribble anything</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Can copy/paste link by placing it on top of the browser</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Tapping on the Highlighted text in any given app takes me to that page</li></ul></ul><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Translate:</li><ul class="ul1" style="list-style-type: circle;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Auto translates the audio and converts it to text</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Translate text in the image</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Everything is done on-device</li></ul><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Swift Playgrounds:</li><ul class="ul1" style="list-style-type: circle;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Build apps on iPad</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Code completion</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Library of components, documentation</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Run it full screen to try/test it out</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Submit apps from the iPad itself (No need for mac to develop apps for iOS/iPadOS)</li></ul></ul></ul></ul><span style="font-family: Helvetica Neue;"><span style="font-size: 13px;"><br /></span></span><h2><ul class="ul1" style="list-style-type: circle; text-align: left;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Privacy:</li></ul></h2><ul class="ul1" style="list-style-type: circle;"><ul class="ul1"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">ATT (already into iOS 14.5)</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Mail:<span class="Apple-converted-space"> </span></li><ul class="ul1" style="list-style-type: circle;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Mail Privacy Protection:</li><ul class="ul1" style="list-style-type: circle;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Hides your IP address</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Hides your location</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Hides if your emails are open</li></ul></ul><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Safari:</li><ul class="ul1" style="list-style-type: circle;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Hides IP address</li></ul><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">App Privacy Report:<span class="Apple-converted-space"> </span></li><ul class="ul1" style="list-style-type: circle;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Reports what capabilities are used by apps and data sent to the domains by the apps</li></ul><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Siri:</li><ul class="ul1" style="list-style-type: circle;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Process all data on-device</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">On-device audio recognition (Audio never leaves device) [No internet connection is required for on-device operations]</li></ul></ul></ul><span style="font-family: Helvetica Neue;"><span style="font-size: 13px;"><br /></span></span><h2><ul class="ul1" style="list-style-type: circle; text-align: left;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">iCloud:</li></ul></h2><ul class="ul1" style="list-style-type: circle;"><ul class="ul1"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Account Recovery:</li><ul class="ul1" style="list-style-type: circle;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Calls the contacts added</li></ul><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Digital Legacy:</li><ul class="ul1" style="list-style-type: circle;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Data sent to Legacy contacts</li></ul><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">iCloud+:</li><ul class="ul1" style="list-style-type: circle;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Private Relay:</li><ul class="ul1" style="list-style-type: circle;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Browse with safari privately - No data is tracked by domain or anybody, not even apple</li></ul><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Hide My Email: Create anonymous emails</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">HomeKit secure video</li></ul></ul></ul><span style="font-family: Helvetica Neue;"><span style="font-size: 13px;"><br /></span></span><h2><ul class="ul1" style="list-style-type: circle; text-align: left;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Health:</li></ul></h2><ul class="ul1" style="list-style-type: circle;"><ul class="ul1"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Mobility:</li><ul class="ul1" style="list-style-type: circle;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Walking steadiness / Fall Risk</li><ul class="ul1" style="list-style-type: circle;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Measure how fast/slow you walk</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Balance/stability / double support</li></ul></ul><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Labs:</li><ul class="ul1" style="list-style-type: circle;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Lab results described</li></ul><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Trends:</li><ul class="ul1" style="list-style-type: circle;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Change in Steps, blood glucose, sleep</li></ul><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Share Health data with the doctors (Only supported partners)</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Family: Sharing Health data with the family members</li></ul></ul><span style="font-family: Helvetica Neue;"><span style="font-size: 13px;"><br /></span></span><h2><ul class="ul1" style="list-style-type: circle; text-align: left;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">watchOS:</li></ul></h2><ul class="ul1" style="list-style-type: circle;"><ul class="ul1"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Introduces watchOS8</li><ul class="ul1" style="list-style-type: circle;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Breath App:</li><ul class="ul1" style="list-style-type: circle;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">New animation for meditation</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Reflex: with a message</li></ul><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Sleep App:</li><ul class="ul1" style="list-style-type: circle;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Sleep time</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Respiratory Rate</li></ul><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Finess+</li><ul class="ul1" style="list-style-type: circle;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">New workout types</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Related music playlists</li></ul><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Photos:</li><ul class="ul1" style="list-style-type: circle;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Portrait photos as watch face</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Memories, featured photos, etc</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Share right from the watch with a message including dictate, scribble, emojis</li></ul></ul></ul></ul><span style="font-family: Helvetica Neue;"><span style="font-size: 13px;"><br /></span></span><h2><ul class="ul1" style="list-style-type: circle; text-align: left;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Home:</li></ul></h2><ul class="ul1" style="list-style-type: circle;"><ul class="ul1"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">HomeKit: AppleWatch or iPhone to unlock the door</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Ask Siri to watch something on Apple TV completely hands-free</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Watch TV with friends together (FaceTime features)</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Shared with you section</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">HomePod Mini for speakers (meh)</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Matter (?? Not sure)</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Home App on Apple Watch</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Cameras on Apple Watch</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Turn on the outdoor lights</li></ul></ul><span style="font-family: Helvetica Neue;"><span style="font-size: 13px;"><br /></span></span><h2><ul class="ul1" style="list-style-type: circle; text-align: left;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">macOS:</li></ul></h2><ul class="ul1" style="list-style-type: circle;"><ul class="ul1"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Introduces macOS Monterey</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Supports all the collaborative features introduced on iOS & iPadOS</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Universal Control: To move the control between Mac & iPad or/And iMac (Like multi-screen support) [this is really a WOW feature]</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">AirPlay to Mac (Airplay from other devices, play music, share content)</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Shortcuts: Automate everyday task like on iPhone [define workflow]</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Safari:<span class="Apple-converted-space"> </span></li><ul class="ul1" style="list-style-type: circle;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Redesigned layout - Tags & search bar is mixed up</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Tab groups on side panel/menu - synced across Apple devices<span class="Apple-converted-space"> </span></li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">On iPhone, the app is totally redesigned</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Safari Extensions on iPhone</li></ul></ul></ul><span style="font-family: Helvetica Neue;"><span style="font-size: 13px;"><br /></span></span><h2><ul class="ul1" style="list-style-type: circle; text-align: left;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Developer Technologies:</li></ul></h2><ul class="ul1" style="list-style-type: circle;"><ul class="ul1"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">API:</li><ul class="ul1" style="list-style-type: circle;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Shared playback controls</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Focus Notifications</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Advanced rendering</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Object Capture (macOS) -<span class="Apple-converted-space"> </span></li><ul class="ul1" style="list-style-type: circle;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Creates 3D image by combining a series of 2D images - useful to showcase objects in AR (This is a WOW feature)</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Made with Swift</li></ul><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">+ much much more</li></ul><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Swift:<span class="Apple-converted-space"> </span></li><ul class="ul1" style="list-style-type: circle;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Concurrency - async/await/actor</li></ul><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">App Store:</li><ul class="ul1" style="list-style-type: circle;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Metrics:</li><ul class="ul1" style="list-style-type: circle;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">600 million apps</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Paid $230 billion</li></ul><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Create customized pages to showcase the app</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">In-App Events - will be surfaced in the App Store product page [Like Live events, upcoming events]</li></ul><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Xcode Cloud: [WOW, WOW, WOW !!!]</li><ul class="ul1" style="list-style-type: circle;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Once changes are committed, it automatically builds the app in the server (Your Mac is free to use it up for other features)</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Anybody in the team can see the results</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Test results are displayed in Xcode</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Source code is built in the temporary built environment</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">TestFlight for Mac:</li><ul class="ul1" style="list-style-type: circle;"><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Could be used to test In-App purchases</li></ul><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Try free Beta today</li><li class="li3" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Will be available next year</li></ul></ul></ul><p class="p2" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 15px;"><br /></p><p class="p2" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 15px;"><br /></p><p class="p2" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 15px;"><br /></p><p class="p2" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 15px;"><br /></p><p class="p2" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 15px;"><br /></p><p class="p2" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 15px;"><br /></p><p class="p4" style="font-family: "Helvetica Neue"; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px 0px 0px 23px; min-height: 15px;"><br /></p>A Passionate Technologists' Journalhttp://www.blogger.com/profile/14721983341617245683noreply@blogger.com0tag:blogger.com,1999:blog-2565897470844400901.post-24587550361009549172020-06-22T12:09:00.003-07:002020-06-22T12:15:52.027-07:00WWDC 2020 Keynote - Summary<div><br /></div><p class="p2" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span class="s1" style="text-decoration-line: underline;"><b>iOS14:</b></span></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">App Library - Organisation of apps into a single page onto the home screen</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Widgets - On Home screen,<span class="Apple-converted-space"> </span>In any sizes you want</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Picture in Picture(PIP) - Across the system</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><br /></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Siri:</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">25B requests/ month</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Send messages via Siri directly</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Supports translations</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Answers to common queries by browsing through the web for you</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Calls won’t block the whole app but come with a compact notification</p><p class="p2" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Translation App:</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Language translation</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Supports audio & text</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Supports 11 langs</p><p class="p2" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Messages:</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Memoji: More ways to style/design your memories</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Inline replies (Finally)</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Member mention in the group (Notified only when you’re mentioned)</p><p class="p2" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><b>Maps:</b></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Privacy priority/matters as usual</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Looks like they’ve copied most of the features that google maps already has for years (Finally)</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Cycling/ Elevations</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">EV routing</p><p class="p2" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">CarPlay:</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">95% in the US | 80% new cars<span class="Apple-converted-space"> </span>worldwide</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">New apps: Parking, EV Charging, Food Ordering</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">iPhone is your car key: Digital version of Car keys (2021 BMW 5 Series)</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Keys can be shared with your co-drivers</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">U1 Chip - Helps with the spatial awareness that enables virtual keys possible</p><p class="p2" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p class="p2" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span class="s1" style="text-decoration-line: underline;"><b>App Store:</b></span></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">App Clip -<span class="Apple-converted-space"> </span></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Discover/Identify an app easily with just a click from the app store |<span class="Apple-converted-space"> </span></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Integrates with App Library |<span class="Apple-converted-space"> </span></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Removes the need to install the full app</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">App Clip Stickers formats that could be attached to the product</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">App Clip apps could be developed with just the required feature like payment, product search, book tickets</p><p class="p2" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p class="p2" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span class="s1" style="text-decoration-line: underline;"><b>iPad OS:</b></span></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Same redesigned widgets as on iOS14</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Capability to organise photos</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Sidebar for apps like Photos, Music to easily access the features</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Calls won’t block the whole app but come with a compact notification</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Search is not a full-screen experience but more like on macOS and it is Universal Search now</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Scribble -<span class="Apple-converted-space"> </span></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Handwriting to text</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Supports all languages</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Shape recognition - Converts the hand-drawn shape to a known shape</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Copy & Paste, auto converts the handwriting to text</p><p class="p2" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p class="p2" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span class="s1" style="text-decoration-line: underline;"><b>AirPods:</b></span></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Automatically switches between your devices contextually</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Spatial Audio - movie Theatre like experience, Tracks the motion of your head as you have it wear’ ed</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Works with 5.1, 7.1, Dolby Atmos</p><p class="p2" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p class="p2" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span class="s1" style="text-decoration-line: underline;"><b>Apple Watch: watchOS7:</b></span></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Customise watch faces as you like - High customisability</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Face Sharing - Share the watch faces from others</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Maps: directions, time</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Workouts:<span class="Apple-converted-space"> </span></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Renamed as Fitness</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Dance is a new workout, auto-detects the dance types (Hip-hop, etc)</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Core Training</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Cooldown - Stretches, etc</p><p class="p2" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Sleep:</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Wind Down: auto-setup of your phone/watch</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Provides data of how well you slept</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Wakes you up with just haptic or sounds</p><p class="p2" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Detects the timing of how long you washed your hands and could tell you about how long you should.</p><p class="p2" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p class="p2" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span class="s1" style="text-decoration-line: underline;"><b>Privacy:</b></span></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Data Minimization:</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">On-device intelligence</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Security protection</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Transparency control</p><p class="p2" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><b><i>Sign In with Apple:<span class="Apple-converted-space"> </span></i></b></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">200 million accounts</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Allows now to link your existing account with Sign in with Apple</p><p class="p2" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Location: Proximity instead of the exact location</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Camera: A new icon appears when recording is on</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Tracking: A new permission alert</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">App Privacy: See exactly how your data is tracked</p><p class="p2" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p class="p2" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span class="s1" style="text-decoration-line: underline;"><b>HOME: Apple TV:</b></span></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Interoperability with Google, Amazon and many others</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">After adding an accessory, option to automate it</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Adaptive Lightning</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Cameras:<span class="Apple-converted-space"> </span></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Activity Zones - Mark the area where you want the cameras to focus</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Face Recognition - Siri tells you who’s at your door</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Airplay auto switches b/w devices</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">A new sci-fi series: Foundation</p><p class="p2" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p class="p2" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span class="s1" style="text-decoration-line: underline;"><b>macOS: Big Sur:</b></span></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Design:</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Redesigned app icons, Rounded corners,<span class="Apple-converted-space"> </span></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">New top to bottom design</p><p class="p2" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Photos: Backed by Metal, hence the animations are smooth</p><p class="p2" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Control Centre on the top right corner</p><p class="p2" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Notification Centre: Grouped by apps, Widgets in any sizes like iOS14</p><p class="p2" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Messages: Search, Photo picker, Edit Memojis, Pin conversations, groups enhancements</p><p class="p2" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Maps: Revamped as on iOS14</p><p class="p2" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Mac Catalyst: Universal Purchase, Mac controls, keyboard shortcuts, multiple windows, etc</p><p class="p2" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Safari:<span class="Apple-converted-space"> </span></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Faster than Chrome by 50%<span class="Apple-converted-space"> </span></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Privacy, Cookie blocking</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Privacy Report: To see how a site is treating their privacy and blocks if something is following you across the sites</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Manage passwords<span class="Apple-converted-space"> </span></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Extensions:<span class="Apple-converted-space"> </span></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Discover in Mac app store</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">You decide which sites the extensions could access</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Customizable start page</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Take a peek by hovering over the tab</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Option to auto-translate the web page</p><p class="p2" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p class="p4" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 15px;"><span class="s1" style="text-decoration-line: underline;"><b></b></span><br /></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span class="s1" style="text-decoration-line: underline;"><b>Mac Hardware Changes:</b></span></p><p class="p2" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Big Change:</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Apple Silicon replacing the Intel</p><p class="p2" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Other Notes:</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">CPU on the iPhone has improved for over 100x and on iPad for over 1000x over the 10+ years</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Common architecture across apple ecosystem</p><p class="p2" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><b>Key Components:</b></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Universal 2 apps - Supports Intel & Apple Silicon</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Rosetta: Runs existing Mac OS apps</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Virtualization - To run different environments, OSes, etc</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Run iPhone & iPad apps on mac</p><p class="p2" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p class="p4" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 15px;"><span class="s1" style="text-decoration-line: underline;"><b></b></span><br /></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span class="s1" style="text-decoration-line: underline;"><b>On Betas:</b></span></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Beta for all OSes from today</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">watchOS beta from July</p><p class="p2" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p class="p2" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p class="p2" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><b>Summary:</b></p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">It looked more like watching a movie for 110mins and definitely avoided a lot of unnecessary walks/runs, instead the movie took us on a tour of the Apple’s new Space ship campus.</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Apple seems to be the besets competitor that Google could ever have as they keep on developing features that embrace privacy in everything & anything that they do.</p><p class="p3" style="font-family: "helvetica neue"; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">Mac had the most exciting features, especially for developers, IMHO.</p>A Passionate Technologists' Journalhttp://www.blogger.com/profile/14721983341617245683noreply@blogger.com3tag:blogger.com,1999:blog-2565897470844400901.post-82119587648970835462020-05-31T09:31:00.003-07:002020-05-31T10:14:35.236-07:00An unusual review of 'Upload' (TV Series)<p class="p1" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><b><font size="4">Introduction:</font></b></p><p class="p1" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><font size="2">Unlike my other blog posts, this isn't a technical blog but a review of a fictional series called '<a href="https://en.wikipedia.org/wiki/Upload_(TV_series)" target="_blank">Upload</a>' that contains so many technicalities, so many good ones indeed. Hence, I couldn't resist myself from posting it here unusually. </font></p><p class="p1" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><b><font size="2"><br /></font></b></p><p class="p1" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><b><font size="4">Summary:</font></b></p><p class="p1" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><font size="2">The whole series is set in 2033 and is a fiction/prediction of how our world will evolve and how we’ll live and is based on one simple long-lived question:</font></p><p class="p1" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><font size="2">What if we could get to live an afterlife and If so, what it’d look like? <span class="Apple-converted-space"> </span></font></p><p class="p1" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><font size="2">The whole series is based on answering this question with the digital world called ‘Upload’, where people after death have a chance to upload themselves aka their memories/brain/thoughts into a digital world from where they could have access with the people in the real world which literally means that there is no death to any conscious person unless their memories are deleted from the hardware.</font></p><p class="p1" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><font size="2">There are just so many good ideas with many interesting & fun facts sprinkled all across the episodes throughout the series.<span class="Apple-converted-space"> </span></font></p><p class="p1" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><font size="2">The whole series so nicely jells with even the current world and we could easily interlink with the current tech world as there are just so many analogies that we could easily relate to as in the fictional concepts themselves are mostly developed/based upon the current technologies.</font></p><p class="p1" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><font size="2">Who knows, this fiction could even come true with the advancements in machine learning & AI as a whole, let someone comment on this content in 2033 ;)</font></p><p class="p2" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px;"><font size="2"><br /></font></p><p class="p1" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><font size="2">If you don’t expect spoilers, please go and watch the series and come back, I’m sure you’ll get some different perspectives.</font></p><p class="p1" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><font size="2">If you’ve watched it already or don’t care about the spoiler, then proceed.</font></p><p class="p2" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px;"><font size="2"><br /></font></p><p class="p1" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><font size="2">Here’s a breakdown of each episode:</font></p><p class="p2" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px;"><font size="2"><i>[ Dates inside the braces are when I watched the episode and doesn't represent their release date, hey treat this as my diary ;) ]</i></font></p><p class="p2" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px;"><font size="2"><br /></font></p><p class="p1" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><b><font size="2">S1E1: (23-May-2020)</font></b></p><p class="p1" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><font size="2">A nice introduction of a different world(‘Upload’) where we’d live after death aka Afterlife forever.<span class="Apple-converted-space"> </span></font></p><p class="p1" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><font size="2">Our Hero, Nathan is seen having sex in his self-driving car with his GF, Ingrid.<span class="Apple-converted-space"> </span></font></p><p class="p1" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><font size="2">The protagonist dies due to the crash of a self-driving car and his memory gets uploaded to ‘Upload’, run by a company called ‘Horizon’ where he lives ever after and we’re also shown a glimpse of what afterlife aka Upload/Horizon world looks like and we’re also introduced to the female protagonist, Nora, who works as a helper/angel of that avatar/person who’s inside the Upload, as expected our heroine is the Angel(Customer representative) of our hero.</font></p><p class="p2" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px;"><font size="2"><br /></font></p><p class="p1" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><font size="2"><b>S1E2: (24-May-2020)</b></font></p><p class="p1" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><font size="2">It starts with a sex scene where the female protagonist, Nora is having it with another person in the earth/real-world and we’re shown that the safety mechanism isn’t condom but a camera embedded in a small device that they attach to their chests’ and both accept the terms that they’re doing this with their permission, all we could guess is that people in 2033 has come up with this nice solution to avoid rape accusations and falsifications, I believe and we’re also shown that the nightly app, just similar to today’s Tinder or other dating apps, where people could rate against each other like we do for the products in the marketplace now.<span class="Apple-converted-space"> </span></font></p><p class="p1" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><font size="2">Then, we’re shown with the protagonist, Nathan, inside the upload meeting a dog whose voice is again given by a real person(customer representative from Horizon) from the earth/real-world, then he meets a politician/conglomerate who says that if he was murdered after having threatened the billion-dollar Upload industry by making an app which lets users create/upload their own Upload versions for free, but our hero blindly ignores it and then we’re shown with a person/lady investigating our hero’s car crash but finds no evidence.<span class="Apple-converted-space"> </span></font></p><p class="p1" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><font size="2">Then, our heroine/Nora is shown in scenes trying to earn as many stars to get more employee rating in the company so that she could get her senior person’s approval for an employee discount for her dad’s upload loan which happens only if the rating is above 4.5stars as per the norm, who wouldn’t sign otherwise, then she gets to have a bit of an emotional convo with the hero and then she somehow gets out hero’s mysterious copied data in her ring drive, this looks like a new pen drive like device with different shape and gets to recover the files from the memory doing this on her personal transparently displayed laptop in her home and that’s the wrap of the episode.<span class="Apple-converted-space"> </span></font></p><p class="p2" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px;"><font size="2"><br /></font></p><p class="p1" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><font size="2"><b>S1E3: (26-May-2020)</b></font></p><p class="p1" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><font size="2">Starts with the news of scientists trying to download the human consciousness(Inverse of Upload) into a body and everybody tunes into the news, but the person stays alive just for 4secs and dies, then we see the funeral party of our hero where we get to know that nobody really talks about him and our heroine also attends it and is seen watching it in a room seated beside our hero’s exes, talking with them and we also notice the stunts of relationship b/w our hero and his last ex GF who pays for all his upload expenses and we also see the investigator lady in the party who talks with both of them</font></p><p class="p2" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px;"><font size="2"><br /></font></p><p class="p1" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><font size="2"><b>S1E4: (26-May-2020)</b></font></p><p class="p1" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><font size="2">Starts with our hero having a golf play with the richest man, then our heroine takes the hero to the 2Gigs which is the economy class of Upload where we’re shown with kinds of people with lower income group who’d freeze until someone from the real world pays for them, just like kindle subscription they’d only get to read the samples for free and to the extent that their avatars have to pay even to have a penis 🤪, our hero thinks that this is the one group that he ever wants to help aka serve these people in lower group aka 2Gigs, who gets only 2 Gigabits of data per month, just like our mobile recharges nowadays, the whole technology we see throughout is just so well jelled with the real world that it feels like we already know most of them which gets us so instantly connected and I kinda personally like the way this virtual world is created, but then our hero gets a call from his Ex/real-world girlfriend who has arranged for an interview with some news channel women where we’re again presented with the kinda relationship bonding they have and eventually in the consecutive scene we’re shown with our hero/heroine bond building up, then comes our hero’s ex into the upload with her sex suit on for the first time and she sees an issue with our hero’s dick not getting up which actually is an issue with our hero as he’s lost interest in her, so funnily for us, the ex calls for the tech support in the middle of the sex scene where our heroine comes in when our hero is standing in the room covering his lower half with the bedsheet and then our heroine says to check for the responsiveness of the avatar/body and touches our hero’s body for the first time with her fingers and they both are lit but the scene is not developing there yet as his ex’s avatar comes up after pausing for a while having gone to console her crazy cat, so then they make love or not is not shown but we’re shown with what our heroine feels while sharing it with her colleague who then reinstalls the nightly dating app by opening up the phone on their wrist, in fact embedded in it and she ends up meeting the same old guy and this time, it is her on top of him doing it by thinking about the hero’s body touch that she had sensed just a while back, then we’re shown with our investigating officer entering an automated shop/store where our hero bought something before he died in the car crash, then she gets to meet a human manager and sees up the CCTV footage where she sees our hero’s Ex doing something in his car behind his back just after he enters the store which later turns out unsuspicious/emotional and there it ends.</font></p><p class="p2" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px;"><font size="2"><br /></font></p><p class="p1" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><font size="2"><b>S1E5: (26-May-2020)</b></font></p><p class="p1" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><font size="2">Starts with the small boy Dylan in the ‘Upload’ world talking to her mom and getting jealous by seeing his grown up younger brother as he’s bringing his gf to his home, then we’re shown with our hero talking to his ex having argument about their relationships with some 3rd persons in it as well, then we see our heroine doing some babysitting with Dylan, then she leaves after getting calls from her dad who’s sick and admitted to the hospital, so Dylan, our hero and his friend meet-up who then goes into an another new world within the upload which is named as grey market and they explain it so nicely to us by relating it to the dark web, where we’re seen our hero’s friend getting a pass to date a real world person and Dylan gets missed, searching for whom both the adults run after and find him tattooing which’ll make him as adult after a good sleep, then they get back out of the grey market running as we see a timer on their heads counting down from 1hour window and if they don’t get back, their avatar might be considered as dead in the Upload world and would endlessly roam around inside the grey market forever, so then Dylan goes to sleep and our hero’s friend goes to date a real world person who’s then interrupted with his angel and we’re also shown that the so-called real world person are in fact connected via VR as their avatar gets stuck and we only hear the audio of the girl vomiting in the background, then we see Dylan’s body changed into an adult, a female one with boobs who then roams freely and before this we’re also shown our heroine having a convo with a medical/upload personnel about the issues with the memory of the avatar trying to fix the memory issues of our hero and gets a recovery software called memboost-turbo which retrieves all the deleted memory files of our hero, then she asks her colleague sitting opposite to her who’s shown to us for the 1st time, i guess but later we’re seen her to be running the memory shop inside Upload, whether she touched her computer anytime because she sees some files missing just from a specific folder, for which the women says that its a serious accusation and she’s ready to go with the lie detector and nobody can fake skin data, then finally we’re shown with our investigating lady drown in a lake in her self driving car after blanking out the window glasses aka killed brutally by the car after she was going to meet the guy in the upload company, i guess, whom she was suspecting in our hero’s death.<span class="Apple-converted-space"> </span></font></p><p class="p2" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px;"><font size="2"><br /></font></p><p class="p1" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><font size="2"><b>S1E6: (27-May-2020)</b></font></p><p class="p1" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><font size="2">Our heroine goes on a real/talking date during/about which our hero is thrown away but then they end up being at her office and she sees our hero drawing then the dating guy leaves and our hero & heroine spends the whole night sleeping next to each other after she shows off her office space and tells him about her memories and she gets caught by her superior, then eventually we’re shown with the family relationship of our hero’s ex Ingrid taking our hero’s niece to a sleepover where they share some sweetness&bonding, then we’re also simultaneously shown with our hero’s friend Luke fighting with his angel. Overall, this was a not so much interesting but just looked like a passing/connecting episode.<span class="Apple-converted-space"> </span></font></p><p class="p2" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px;"><font size="2"><br /></font></p><p class="p1" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><font size="2"><b>S1E7: (27-May-2020)</b></font></p><p class="p1" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><font size="2">Our hero meets our heroine’s dad and takes onto the Upload’s tour where they share something to each other and their bonding is shown, eventually, our heroine goes away and someone tries to hack the upload systems where we see all the avatars turning into pac-man when our heroine tries to find the issues or the conspiracies behind our hero’s memories, we’re also shown with our hero’s ex Ingrid sharing about her newly found affair with our hero’s friend with whom she had slept although we’re not shown with those scenes yet and she also shares about how she’s been thinking about switching off our hero for 6 days a week meaning she had also lost interest in him now, finally it ends with our heroine having some life-full matters with her dad on the way to home in the bus as they’re shown as economically contrived.<span class="Apple-converted-space"> </span></font></p><p class="p2" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px;"><font size="2"><br /></font></p><p class="p1" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><font size="2"><b>S1E8: (28-May-2020)</b></font></p><p class="p1" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><font size="2">Starts with our hero going through the memories of our heroine in the store which is run by an employee sitting just opposite to her then in the next scene her senior pulls her up and suspends her instantly and she goes into upload in her avatar to our hero where he tries to propose her but her avatar aka the senior rejects it and our hero is upset thinking that he was rejected, then he calls his mom and asks to visit other digital heavens and her mom takes him in a hard drive and leaves Horizon/Upload and goes to some other small agency where we’re shown about how there are some very cheap AR+VR versions available in the marketplace and our hero is shown up in a bulb, meanwhile our hero jumps on an economy plane after hearing from her colleague friend that our hero is departing from horizon/lake-view/upload from New York to LA and goes to our hero’s ex’s home thinking that she’d be the one taking him but later they both know that it is her mom and then she also gets to zoom to the pic of our hero in all the photo frames in her home, where we’re shown that all glass displays have got the interactivity features and are partially operable w/o software in it and also gets to smell the sweat on his jerkin in the cardboard then they both gets to LA to the same digital agency in the Ingrid’s self driving car and our hero decides to give an another chance to stay with Horizon/Lakeview(Which is an another name of the digital place, heaven) after seeing Nora/our heroine, then when they get out of that agency, a guy runs away by taking the hard drive from his ex’s hand and throws it into the water but our heroine somehow got the real hdd which has our hero’s memories and then we’re shown with both of our protagonists inside the Upload hugging and playing and we see that our heroine has taken him not to Horizon but to her place and is seen talking to him by laying on the bed and there the episode ends.</font></p><p class="p2" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px;"><font size="2"><br /></font></p><p class="p1" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><font size="2"><b>S1E9: (28-May-2020)</b></font></p><p class="p1" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><font size="2">Starts with Nora with her friend visiting a store where people are lined to get a hold onto a nearly free version of upload where they could create their own versions by themselves, a similar kinda tool which Nathan/our-hero was working on, then we’re seen Nathan having a convo with his friend, Luke by residing in the bar, then Horizon holds a meeting ordering all employees to switch off all the artificial brains in the upload tonight as they’re going to update their software aka the Upload world, in this Nora steals a pen like device from her colleague’s back pocket which is used to code and change the settings of the Upload world and also connect with the real world, which she later gifts to Nathan, then employees decorate the office for the update eve and has a convo with her senior as she got back in the office by getting approval from her boss’s boss and they also have a convo about Nathan but to cover that up Nora calls his hookup guy and he comes in to the eve and simply kisses him whenever her boss sees her during the party and she acts so nicely to keep that up, eventually people are given a task to find the egg that’s hidden in the Lakeview as part of the gameplay of the evening & eventually our hero breaks up with his ex, Ingrid and she also has a convo with her dad about Nathan in another scene at their home, I guess but that’s not very clear at all and there seems to be some conspiracy theory with his dad & Nathan’s link, then we’re also shown with our hero talking to his friend after a very long time who reveals him that he hooked up with his gf, Ingrid and that he’d been feeling guilty about it lately and that’s why he was avoiding him and our hero decides to switch to 2Gigs after getting some money from him as they both were partners in the company, then all the employees puts all the upload brains on sleep and then leaves while our heroine has a convo with the hookup guy trying to remove him from her life, then she goes by stairs and makes some hack in the door so she comes back by the back door after everyone leaves the office and we’re also shown about how she wears the sensing gloves and touches & feels the hero’s hand for the first time and they kiss too, then our hero uses his coding skills to make them transparent when the guards looks at them, then our hero is woken up just because Nora thinks that maybe if he’s awake during the update, he might remember or get back his old memories but later when she gets a notification saying that he needs to sleep to update him, she makes the choice hardly because after they wake up, he might/could forget everything including the kinda relationship that they’ve developed so far and it ends there.<span class="Apple-converted-space"> </span></font></p><p class="p2" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px;"><font size="2"><br /></font></p><p class="p1" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><font size="2"><b>S1E10: (28-May-2020)</b></font></p><p class="p1" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><font size="2">We’re shown with updated upload world, where everyone wakes up at 7 am, I believe that’s when the horizons employees come for work, when our hero is woken up, he remember’s some of the memories and the twist that he sold his code to his ex’s/Ingrid’s dad and was killed up to cover that up, this twist made it look like he was the one who cheated his partner & not the other way around and our heroine also got to know this after Nathan told her as not remembering her, falsely just to ignore her, then she cries like anything and her colleague friend tries to console her by avoiding other colleague funnily in that place, then our hero moves to 2Gigs and meets a person twice just for the sake of showing that someone does exist in that place, then both of our protagonists try to have a convo and a guy who tries to delete the hdd of Nathan’s memory sneaks in from the window of her house’s window while she into the upload wearing the VR headset and takes the knife, then she somehow manages to escape and run away from him running all over the city and this becomes the best chase/fight/save scene ever as our hero who with his hacking/coding device gets to save the heroine by locking up the bad guy in the elevator and kills him, this was just a freaking awesome scene, then she talks with Nathan over audio as his data ran out and only 0.1Gb was available during which she talks about how she feels, this was one of nicest/emotional/heart-touching dialogues ever in this whole series, but our hero is on hold/pause/blocked-out as he’s out of data now, then her dad comes over and ask to go and hide somewhere as her place is known to the people who wants to delete Nathan which is why they’re after her now as she helped him in LA, then she goes off in her hookups’ self driving car trying to escape and go off the grid, meanwhile we see Ingrid, Nathan’s Ex coming up to his room and watching him blocked out, recharges him with 1Gb and instantly we see our hero saying that he needs to call her/Nora immediately but is also shocked to see Ingrid here and when Ingrid says that she’d uploaded herself into this Upload world just for him, his whole of 1gb is consumed almost instantly, i was ROFL for sometime, then it ends after the lights are out with Ingrid shouting for tech support. This was one of the craziest episodes which make us want to watch the upcoming series.<span class="Apple-converted-space"> </span></font></p><p class="p1" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><font size="2"><span class="Apple-converted-space"><br /></span></font></p><p class="p1" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><br /></p><p class="p1" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><br /></p><p class="p1" style="font-family: "helvetica neue"; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><font size="2"><span style="background-color: white; color: rgba(0, 0, 0, 0.84); font-family: medium-content-serif-font, Georgia, Cambria, "Times New Roman", Times, serif; letter-spacing: -0.063px;">If you’d like to see/get more of my perspectives/reviews on TV series or movies, do follow me on </span><a class="cl di jk jl jm jn" href="https://www.imdb.com/user/ur66979966" rel="noopener nofollow" style="-webkit-tap-highlight-color: transparent; background-color: white; background-image: url("data:image/svg+xml;utf8,<svg preserveAspectRatio=\"none\" viewBox=\"0 0 1 1\" xmlns=\"http://www.w3.org/2000/svg\"><line x1=\"0\" y1=\"0\" x2=\"1\" y2=\"1\" stroke=\"rgba(0, 0, 0, 0.84)\" /></svg>"); background-position: 0px calc(1em + 1px); background-repeat: repeat-x; background-size: 1px 1px; box-sizing: inherit; font-family: medium-content-serif-font, Georgia, Cambria, "Times New Roman", Times, serif; letter-spacing: -0.063px; text-decoration-line: none;" target="_blank">IMDB</a><span style="background-color: white; color: rgba(0, 0, 0, 0.84); font-family: medium-content-serif-font, Georgia, Cambria, "Times New Roman", Times, serif; letter-spacing: -0.063px;"> & </span><a class="cl di jk jl jm jn" href="https://letterboxd.com/saru2020/" rel="noopener nofollow" style="-webkit-tap-highlight-color: transparent; background-color: white; background-image: url("data:image/svg+xml;utf8,<svg preserveAspectRatio=\"none\" viewBox=\"0 0 1 1\" xmlns=\"http://www.w3.org/2000/svg\"><line x1=\"0\" y1=\"0\" x2=\"1\" y2=\"1\" stroke=\"rgba(0, 0, 0, 0.84)\" /></svg>"); background-position: 0px calc(1em + 1px); background-repeat: repeat-x; background-size: 1px 1px; box-sizing: inherit; font-family: medium-content-serif-font, Georgia, Cambria, "Times New Roman", Times, serif; letter-spacing: -0.063px; text-decoration-line: none;" target="_blank">Letterboxd</a><span style="background-color: white; color: rgba(0, 0, 0, 0.84); font-family: medium-content-serif-font, Georgia, Cambria, "Times New Roman", Times, serif; letter-spacing: -0.063px;">, where I log, rate & review almost all the ones that I get to watch.</span></font></p>A Passionate Technologists' Journalhttp://www.blogger.com/profile/14721983341617245683noreply@blogger.com0tag:blogger.com,1999:blog-2565897470844400901.post-39345708621188718282020-04-12T12:26:00.001-07:002020-04-12T12:58:19.383-07:00Property Wrapper - Simplified!<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 18pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Introduction:</span></h2>
<b id="docs-internal-guid-2e0485b4-7fff-9260-c136-7881f10cbe6b" style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">There have been just so much fuzz around the Property Wrappers. Almost all the recent addition(@State, @Published, @Binding, @BindableObject, @ObservedObject, @EnvironmentObject, @Environment) to the SwiftUI framework is just based upon this single feature that was introduced in Swift 5.1 called ‘Property Wrappers’</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">There are just so many articles already written on Property Wrappers and some of them are just really great. I’m writing this piece not because I also wanted to write about it and join the bandwagon but because not everyone understands a topic written in a certain way. </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Just a different mix of words or with a different set of contextual examples, basically the point is that not everyone likes Vanilla ice cream and the majority of people prefer flavors, so please don’t consider this article as a redundant one and do give it a chance to take it up as a different flavor. Btw, mine is chocolate, what’s yours? ;)</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<h2 dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 18pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Background:</span></h2>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">From Apple’s engineers’ </span><a href="https://developer.apple.com/videos/play/wwdc2019/415" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre;">own words</span></a><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">, it looks like they realized the power of this feature only after they started using it and it was interesting to see how they started with a replacement of lazy initialized computed property and then built upon it the other layers and what we get to know them today as Property Wrappers(Initially proposed as Property Delegates, not a bad name though).</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Let’s see what problem it solves.</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">I’m pretty sure that as a developer, we all would’ve definitely come across this problem at least once in our lifetime.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">We use properties on classes or structs to store our data and we have requirements to process the data stored in the properties, immediately whenever the data in the property is changed/manipulated/modified. There are just tons of examples for this and the most popular one circulating around with property wrappers are UserDefault property wrappers mostly because it is a straight-forward use case that’s required/used by most apps and partly because Apple’s engineers demo’ed property wrapper in </span><a href="https://developer.apple.com/videos/play/wwdc2019/415" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre;">WWDC 2019</span></a><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> just using this example.</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">So, let us take another use case today(A different flavor) and see how we can apply the property wrapper to it.</span></div>
<b style="font-weight: normal;"><br /></b>
<h2 dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 18pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Example:</span></h2>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">For our example, imagine a scenario, let’s say we have a form in the app that’s not supposed to be used by kids, which means that we need to get the age of the user to verify if he/she’s an adult. </span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">struct</span><span style="background-color: transparent; color: #0b4f79; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> User {</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">var</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #0f68a0; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">age</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">: </span><span style="background-color: transparent; color: #3900a0; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Int</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">}</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">A struct that represents the object/data of the User</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">A property ‘age’ that takes in an Int value </span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Now, our goal is to get notified whenever the ‘age’ property is modified, so that we can instantly check if the user is an adult or not. </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">For that, we already have a few mechanisms like using property observers ‘willSet’/’didSet’ but they have their own drawbacks like not able to manipulate/mutate the property value or not being called during the initial value being set respectively. Although this is not directly/really applicable to our example, this is just a note here.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">With our example, ideally, we’ll have an extension on Int or a boolean variable inside the struct that’d hold the data/state of the result derived from the validation we perform on the ‘age’ property, the ideal solution with our existing API’s would look something like this:</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">struct</span><span style="background-color: transparent; color: #0b4f79; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> User {</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">var</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #0f68a0; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">age</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">: </span><span style="background-color: transparent; color: #3900a0; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Int</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: #0f68a0; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">static</span><span style="background-color: transparent; color: #0f68a0; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">func</span><span style="background-color: transparent; color: #0f68a0; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> userConfigWithoutWrapper() {</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">var</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> s1 = </span><span style="background-color: transparent; color: #1c464a; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">User</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">(age: </span><span style="background-color: transparent; color: #1c00cf; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">10</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">)</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #6c36a9; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">print</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">(</span><span style="background-color: transparent; color: #c41a16; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">"isAdult: </span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">\(s1.</span><span style="background-color: transparent; color: #326d74; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">age</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">.</span><span style="background-color: transparent; color: #326d74; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">isAdult</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">)</span><span style="background-color: transparent; color: #c41a16; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">"</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">)</span><span style="background-color: transparent; color: #5d6c79; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">//prints 'false'</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> s1.</span><span style="background-color: transparent; color: #326d74; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">age</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> = </span><span style="background-color: transparent; color: #1c00cf; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">20</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #6c36a9; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">print</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">(</span><span style="background-color: transparent; color: #c41a16; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">"isAdult: </span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">\(s1.</span><span style="background-color: transparent; color: #326d74; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">age</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">.</span><span style="background-color: transparent; color: #326d74; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">isAdult</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">)</span><span style="background-color: transparent; color: #c41a16; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">"</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">)</span><span style="background-color: transparent; color: #5d6c79; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">//prints 'true'</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> }</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">}</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<br /></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">extension</span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #3900a0; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Int</span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> {</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">var</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #0f68a0; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">isAdult</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">: </span><span style="background-color: transparent; color: #3900a0; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Bool</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> {</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">get</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> {</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">if</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">self</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #6c36a9; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">></span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #1c00cf; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">18</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> {</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">return</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">true</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> }</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">else</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> {</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">return</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">false</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> }</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> }</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> }</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">}</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">But, the problem with this approach is that it is not specific to this problem aka this validation is not bound to this specific functionality, or to put it in other words, the ‘isAdult’ property is exposed to all the Int types which are unnecessary overhead.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Now, let’s see how we can do this with a property wrapper which bounds the functionality and also encapsulates things. </span></div>
<h2 dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 18pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Enter Property Wrapper:</span></h2>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">To create a property wrapper, all we’ve to do is to annotate the struct with ‘</span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">@propertyWrapper</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">’ and all it asks for is to have a ‘wrappedValue’ to be implemented, so let’s declare our wrapper as ‘Adult’ and this is how it’d look like:</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">@propertyWrapper</span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">struct</span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #0b4f79; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Adult</span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><</span><span style="background-color: transparent; color: #0b4f79; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Value</span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">> {</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: #0f68a0; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">var</span><span style="background-color: transparent; color: #0f68a0; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> defaultValue: </span><span style="background-color: transparent; color: #1c464a; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Value //1</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">var</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #0f68a0; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">isAdult</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">: </span><span style="background-color: transparent; color: #3900a0; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Bool</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> = </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">false </span><span style="background-color: transparent; color: #1c464a; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">//2</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: #0f68a0; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">var</span><span style="background-color: transparent; color: #0f68a0; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> wrappedValue: </span><span style="background-color: transparent; color: #1c464a; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Value</span><span style="background-color: transparent; color: #0f68a0; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> { </span><span style="background-color: transparent; color: #1c464a; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">//3</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">get</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> {</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">return</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">false</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">as</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">? </span><span style="background-color: transparent; color: #1c464a; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Value</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> ?? </span><span style="background-color: transparent; color: #326d74; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">defaultValue</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> }</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">set</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> {</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">if</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> newValue </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">as</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">? </span><span style="background-color: transparent; color: #3900a0; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Int</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> ?? </span><span style="background-color: transparent; color: #1c00cf; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">0</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #6c36a9; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">></span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #1c00cf; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">18</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> {</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #326d74; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">isAdult</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> = </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">true</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> }</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">else</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> {</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #326d74; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">isAdult</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> = </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">false</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> }</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> }</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> }</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<br /></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">}</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<br /></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Value is the type that represents Int in our case, ideally, it could be generic so that any type can be used but let’s have Value for our example here.</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">1.) Notice how we have a defaultValue which is required when dealing with nonoptional wrapper but there are ways to have optional property wrapper as well, but we’ll ignore it in this article for the sake of simplicity</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">2.) ‘isAdult’ is the internal property that holds the result of our validation</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">3.) ‘wrappedValue’, this is where everything happens, all it gets to have is a getter and setter if required, and notice how we do the validation and store the result in the ‘isAdult’</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">And finally, this is how we get to use our property wrapper for the age property in the User struct:</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">struct</span><span style="background-color: transparent; color: #0b4f79; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> User {</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> @</span><span style="background-color: transparent; color: #1c464a; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Adult</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">(defaultValue: </span><span style="background-color: transparent; color: #1c00cf; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">0</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">) </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">var</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #0f68a0; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">age</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">: </span><span style="background-color: transparent; color: #3900a0; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Int</span><span style="background-color: transparent; color: #1c464a; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> //1</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<br /></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: #0f68a0; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">static</span><span style="background-color: transparent; color: #0f68a0; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">func</span><span style="background-color: transparent; color: #0f68a0; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> userConfigWithWrapper() {</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">var</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> s1 = </span><span style="background-color: transparent; color: #1c464a; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">User</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">()</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #6c36a9; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">print</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">(</span><span style="background-color: transparent; color: #c41a16; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">"isAdult: </span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">\(s1.</span><span style="background-color: transparent; color: #326d74; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">age</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">)</span><span style="background-color: transparent; color: #c41a16; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">"</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">) </span><span style="background-color: transparent; color: #5d6c79; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">//prints '0'</span><span style="background-color: transparent; color: #1c464a; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> //2</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> s1.</span><span style="background-color: transparent; color: #326d74; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">age</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> = </span><span style="background-color: transparent; color: #1c00cf; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">10</span><span style="background-color: transparent; color: #1c464a; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> //3</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #6c36a9; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">print</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">(</span><span style="background-color: transparent; color: #c41a16; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">"isAdult: </span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">\(s1.</span><span style="background-color: transparent; color: #326d74; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">_age</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">.</span><span style="background-color: transparent; color: #326d74; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">isAdult</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">)</span><span style="background-color: transparent; color: #c41a16; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">"</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">) </span><span style="background-color: transparent; color: #5d6c79; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">//prints 'false'</span><span style="background-color: transparent; color: #1c464a; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> //4</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: #5d6c79; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #6c36a9; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">print</span><span style="background-color: transparent; color: #5d6c79; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">(</span><span style="background-color: transparent; color: #c41a16; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">"isAdult: </span><span style="background-color: transparent; color: #5d6c79; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">\(s1.</span><span style="background-color: transparent; color: #326d74; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">_age</span><span style="background-color: transparent; color: #5d6c79; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">)</span><span style="background-color: transparent; color: #c41a16; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">"</span><span style="background-color: transparent; color: #5d6c79; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">) //prints 'Adult<int>(defaultValue: 0, isAdult: false)'</int></span><span style="background-color: transparent; color: #1c464a; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> //5</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> s1.</span><span style="background-color: transparent; color: #326d74; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">age</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> = </span><span style="background-color: transparent; color: #1c00cf; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">20</span><span style="background-color: transparent; color: #1c464a; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> //6</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #6c36a9; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">print</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">(</span><span style="background-color: transparent; color: #c41a16; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">"isAdult: </span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">\(s1.</span><span style="background-color: transparent; color: #326d74; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">_age</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">.</span><span style="background-color: transparent; color: #326d74; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">isAdult</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">)</span><span style="background-color: transparent; color: #c41a16; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">"</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">) </span><span style="background-color: transparent; color: #5d6c79; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">//prints 'true'</span><span style="background-color: transparent; color: #1c464a; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> //7</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: #5d6c79; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #6c36a9; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">print</span><span style="background-color: transparent; color: #5d6c79; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">(</span><span style="background-color: transparent; color: #c41a16; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">"isAdult: </span><span style="background-color: transparent; color: #5d6c79; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">\(s1.</span><span style="background-color: transparent; color: #326d74; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">_age</span><span style="background-color: transparent; color: #5d6c79; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">)</span><span style="background-color: transparent; color: #c41a16; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">"</span><span style="background-color: transparent; color: #5d6c79; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">) //prints 'Adult<int>(defaultValue: 0, isAdult: true)'</int></span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> }</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">}</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<br /></div>
<ol style="margin-bottom: 0; margin-top: 0;">
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; text-decoration: none; vertical-align: baseline; white-space: pre;"><div dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">@Adult is our property wrapper and annotating a property with it binds it with our wrapping functionality and notice how the defaultValue is being passed in the initializer which is required when dealing with non-optional</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; text-decoration: none; vertical-align: baseline; white-space: pre;"><div dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">We create a User object and print the age property</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; text-decoration: none; vertical-align: baseline; white-space: pre;"><div dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">We modify the value of the age property to a non-adult age</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; text-decoration: none; vertical-align: baseline; white-space: pre;"><div dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">We print the ‘isAdult’ property that’s placed inside the wrapper and hence we prefix it with the underscore, but we shouldn’t be doing this, I’ll be telling you why in a bit</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; text-decoration: none; vertical-align: baseline; white-space: pre;"><div dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">We print the wrapper itself, which displays all the properties and its values</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; text-decoration: none; vertical-align: baseline; white-space: pre;"><div dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">We modify the value of the age property again to an adult age</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; text-decoration: none; vertical-align: baseline; white-space: pre;"><span style="font-size: 11pt;">We print the value and then the wrapper itself, which displays all the properties and its values</span></li>
</ol>
<b style="font-weight: normal;"><br /></b>
<br />
<h3 dir="ltr" style="line-height: 1.38; margin-bottom: 4pt; margin-top: 16pt;">
<span style="background-color: transparent; color: #434343; font-family: "arial"; font-size: 13.999999999999998pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">projectedValue:</span></h3>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Now, we have created a property wrapper and have used it to validate if the user is an adult or not using the same. One thing we did wrong here was accessing the ‘_age’ property directly which is placed inside the wrapper which isn’t the ideal way to do it. Just to avoid this and overcome any issues that could arise out of this, we can use ‘projectedValue’ property of the wrapper, which typically returns the wrapper itself, so our updated wrapper should now look like this:</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">@propertyWrapper</span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">struct</span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #0b4f79; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Adult</span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><</span><span style="background-color: transparent; color: #0b4f79; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Value</span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">> {</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: #0f68a0; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">var</span><span style="background-color: transparent; color: #0f68a0; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> defaultValue: </span><span style="background-color: transparent; color: #1c464a; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Value</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">var</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #0f68a0; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">isAdult</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">: </span><span style="background-color: transparent; color: #3900a0; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Bool</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> = </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">false</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: #0f68a0; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">var</span><span style="background-color: transparent; color: #0f68a0; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> wrappedValue: </span><span style="background-color: transparent; color: #1c464a; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Value</span><span style="background-color: transparent; color: #0f68a0; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> {</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">get</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> {</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">return</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">false</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">as</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">? </span><span style="background-color: transparent; color: #1c464a; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Value</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> ?? </span><span style="background-color: transparent; color: #326d74; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">defaultValue</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> }</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">set</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> {</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">if</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> newValue </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">as</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">? </span><span style="background-color: transparent; color: #3900a0; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Int</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> ?? </span><span style="background-color: transparent; color: #1c00cf; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">0</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #6c36a9; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">></span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #1c00cf; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">18</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> {</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #326d74; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">isAdult</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> = </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">true</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> }</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">else</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> {</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #326d74; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">isAdult</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> = </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">false</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> }</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> }</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> }</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: #0f68a0; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">var</span><span style="background-color: transparent; color: #0f68a0; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> projectedValue: </span><span style="background-color: transparent; color: #1c464a; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Adult</span><span style="background-color: transparent; color: #0f68a0; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><</span><span style="background-color: transparent; color: #1c464a; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Value</span><span style="background-color: transparent; color: #0f68a0; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">> {</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">return</span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">self</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> }</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">}</span></div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">and it can be referenced by the users/clients/callee by prefixing the ‘$’ symbol and our updated User struct looks like this:</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">struct</span><span style="background-color: transparent; color: #0b4f79; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> User {</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> @</span><span style="background-color: transparent; color: #1c464a; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Adult</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">(defaultValue: </span><span style="background-color: transparent; color: #1c00cf; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">0</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">) </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">var</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #0f68a0; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">age</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">: </span><span style="background-color: transparent; color: #3900a0; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Int</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<br /></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: #0f68a0; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">static</span><span style="background-color: transparent; color: #0f68a0; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">func</span><span style="background-color: transparent; color: #0f68a0; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> userConfigWithWrapper() {</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #9b2393; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">var</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> s1 = </span><span style="background-color: transparent; color: #1c464a; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">User</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">()</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #6c36a9; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">print</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">(</span><span style="background-color: transparent; color: #c41a16; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">"isAdult: </span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">\(s1.</span><span style="background-color: transparent; color: #326d74; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">age</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">)</span><span style="background-color: transparent; color: #c41a16; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">"</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">) </span><span style="background-color: transparent; color: #5d6c79; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">//prints '0'</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: #5d6c79; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #6c36a9; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">print</span><span style="background-color: transparent; color: #5d6c79; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">(</span><span style="background-color: transparent; color: #c41a16; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">"isAdult: </span><span style="background-color: transparent; color: #5d6c79; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">\(s1.</span><span style="background-color: transparent; color: #326d74; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">$age</span><span style="background-color: transparent; color: #5d6c79; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">)</span><span style="background-color: transparent; color: #c41a16; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">"</span><span style="background-color: transparent; color: #5d6c79; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">) //prints 'Adult<int>(defaultValue: 0, isAdult: false)'</int></span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> s1.</span><span style="background-color: transparent; color: #326d74; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">age</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> = </span><span style="background-color: transparent; color: #1c00cf; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">10</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #6c36a9; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">print</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">(</span><span style="background-color: transparent; color: #c41a16; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">"isAdult: </span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">\(s1.</span><span style="background-color: transparent; color: #326d74; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">$age</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">.</span><span style="background-color: transparent; color: #326d74; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">isAdult</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">)</span><span style="background-color: transparent; color: #c41a16; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">"</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">) </span><span style="background-color: transparent; color: #5d6c79; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">//prints 'false'</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: #5d6c79; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #6c36a9; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">print</span><span style="background-color: transparent; color: #5d6c79; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">(</span><span style="background-color: transparent; color: #c41a16; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">"isAdult: </span><span style="background-color: transparent; color: #5d6c79; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">\(s1.</span><span style="background-color: transparent; color: #326d74; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">$age</span><span style="background-color: transparent; color: #5d6c79; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">)</span><span style="background-color: transparent; color: #c41a16; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">"</span><span style="background-color: transparent; color: #5d6c79; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">) //prints 'Adult<int>(defaultValue: 0, isAdult: false)'</int></span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> s1.</span><span style="background-color: transparent; color: #326d74; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">age</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> = </span><span style="background-color: transparent; color: #1c00cf; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">20</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #6c36a9; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">print</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">(</span><span style="background-color: transparent; color: #c41a16; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">"isAdult: </span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">\(s1.</span><span style="background-color: transparent; color: #326d74; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">$age</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">.</span><span style="background-color: transparent; color: #326d74; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">isAdult</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">)</span><span style="background-color: transparent; color: #c41a16; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">"</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">) </span><span style="background-color: transparent; color: #5d6c79; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">//prints 'true'</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: #5d6c79; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #6c36a9; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">print</span><span style="background-color: transparent; color: #5d6c79; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">(</span><span style="background-color: transparent; color: #c41a16; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">"isAdult: </span><span style="background-color: transparent; color: #5d6c79; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">\(s1.</span><span style="background-color: transparent; color: #326d74; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">$age</span><span style="background-color: transparent; color: #5d6c79; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">)</span><span style="background-color: transparent; color: #c41a16; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">"</span><span style="background-color: transparent; color: #5d6c79; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">) //prints 'Adult<int>(defaultValue: 0, isAdult: true)'</int></span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> }</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">}</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Just compare this with the SwiftUI’s property binding functionality where we use the $ prefix to bind the properties between 2 views to keep them synchronized. It is the same functionality that we’ve implemented with our own custom property wrapper.</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<h2 dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 18pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Conclusion:</span></h2>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">I suppose this was a very simple example with a step-by-step explanation of how you can create your own property wrappers. </span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Property-wrapper is relatively new and has its own cons </span><a href="https://nshipster.com/propertywrapper/#limitations" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre;">as said by matt</span></a><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> but the way Apple engineers have adopted it and have used it widely in the SwiftUI framework is what’s making us all follow the lead, after all, they’re the pathmakers.</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">If you’re still new or exploring </span><a href="https://medium.com/@saru2020/introduction-1e35ed989954" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre;">SwiftUI</span></a><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> or </span><a href="https://medium.com/@saru2020/combine-rxswifts-successor-64dc1befafbb" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre;">Combine</span></a><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> and </span><a href="https://medium.com/@saru2020/resume-app-with-swiftui-b83b727a6043" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre;">trying it out</span></a><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">, check out these.</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Also, these are some great resources related to this great topic - ‘Property Wrappers’:</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<a href="https://nshipster.com/propertywrapper" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre;">https://nshipster.com/propertywrapper</span></a></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<a href="https://www.swiftbysundell.com/articles/property-wrappers-in-swift/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre;">https://www.swiftbysundell.com/articles/property-wrappers-in-swift/</span></a></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<a href="https://www.avanderlee.com/swift/property-wrappers/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre;">https://www.avanderlee.com/swift/property-wrappers/</span></a></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<a href="https://github.com/SvenTiigi/ValidatedPropertyKit" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre;">https://github.com/SvenTiigi/ValidatedPropertyKit</span></a></div>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">I hope you enjoyed!</span></div>
</div>
A Passionate Technologists' Journalhttp://www.blogger.com/profile/14721983341617245683noreply@blogger.com0tag:blogger.com,1999:blog-2565897470844400901.post-55069268872611174032020-04-10T10:51:00.000-07:002020-04-10T11:12:29.013-07:00Combine - RxSwift's Successor<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 18pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Introduction:</span></h2>
<b id="docs-internal-guid-aaca2c43-7fff-0f4a-ebf7-0f65f9e08d20" style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">When I got to watch </span><a href="https://developer.apple.com/videos/play/wwdc2019/722/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre;">this WWDC video</span></a><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> where the Apple engineers introduced a brand new Combine framework that enables developers to write asynchronous </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">programs </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">effectively, I was literally taken away after watching it. </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">I will tell you the shocking story along the way.</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Let’s start by putting Apple’s definition for the Combine framework:</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">“</span><span style="background-color: white; color: #303133; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">A unified, declarative API for processing values overtime</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">”</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Combine introduces the framework’s main characteristics as:</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-b8e2664c-7fff-2874-574c-52cc572c1062"></span><br />
<ul style="margin-bottom: 0; margin-top: 0;">
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><div dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;">Generic</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><div dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;">Type-Safe</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><div dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;">Composition first</span></div>
</li>
</ul>
<div>
<span style="font-family: Arial;"><span style="font-size: 14.6667px; white-space: pre-wrap;"><br /></span></span></div>
</div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">The ‘Combine’ is Apple’s first asynchronous event-handling framework. </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">If you’ve done reactive programming earlier, you’d be already aware but </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">all you’ve done is only the imperative programming so far, then read </span><a href="https://medium.com/@saru2020/introduction-to-functional-reactive-programming-using-swift-ea30b1e38309" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre;">this</span></a><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> will serve </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">as a good starting point.</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; padding: 14pt 0pt -7pt 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">A generic definition of Reactive Programming goes like this:</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; padding: 21pt 0pt -7pt 0pt;">
<span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Reactive programming is an asynchronous programming paradigm oriented around data streams and the propagation of change. In this case, reactive programming allows changes to be modeled as they propagate through a circuit.</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; padding: 21pt 0pt -7pt 0pt;">
<br /></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: -7pt; margin-top: 0pt; padding: 21pt 0pt 0pt 0pt;">
<span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">These are the main components of the ‘Combine’ framework:</span></div>
<ul style="margin-bottom: 0; margin-top: 0;">
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><div dir="ltr" role="presentation" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 14pt;">
<span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Publishers</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><div dir="ltr" role="presentation" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Subscribers</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><div dir="ltr" role="presentation" style="background-color: white; line-height: 1.38; margin-bottom: -7pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Operators</span></div>
</li>
</ul>
<b style="font-weight: normal;"><br /></b>
<br />
<h4 dir="ltr" style="line-height: 1.38; margin-bottom: 4pt; margin-top: 14pt;">
<span style="background-color: transparent; color: #666666; font-family: "arial"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Publishers:</span></h4>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">‘Publisher’ is the most important declarative API of the ‘Combine’ framework.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Publishers are value types in Swift.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Subscribers can subscribe to the publisher to receive values emitted by the publisher</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-8adce43c-7fff-f125-0e0c-0c10008abe35"><span style="background-color: white; font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;"><span style="border: none; display: inline-block; height: 240px; overflow: hidden; width: 624px;"><img height="240" src="https://lh5.googleusercontent.com/PbmkBDD6sGzWCDBphxZVDZ_aBFdDE96Rne6UnaQxQMy73tDzPoZSCV9q2jpG9lzOBvmXdHkGFIdvu4u37pS8_tOt4UnGn-dKPkhZhcKMSMueFQEqnAGyn59nHZzjtsBJ1-4s5rx0" style="margin-left: 0px; margin-top: 0px;" width="624" /></span></span></span></div>
<h4 dir="ltr" style="line-height: 1.38; margin-bottom: 4pt; margin-top: 14pt;">
<span style="background-color: transparent; color: #666666; font-family: "arial"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Subscribers:</span></h4>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Subscribers are the ones that receive the values emitted from/by the publishers. There just can be any numbers of subscribers aka they mutatable and hence referenceable, so they are mostly classes. </span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-a3f41190-7fff-409e-0972-412cbc7974cc"><span style="background-color: white; font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;"><span style="border: none; display: inline-block; height: 268px; overflow: hidden; width: 624px;"><img height="268" src="https://lh3.googleusercontent.com/Ex7rQVBZeuN8cIrmASHRqV29e4q8-rv8Toyod1CiLsnTJfGfuoKFi4-YR8Bujbm1atLK4oyQckf4RVCeOddRdBEnVnNyFolNKpsVqMQF-uMZoV4wjhnAy0cjwcQoJ6kmncbbgFWV" style="margin-left: 0px; margin-top: 0px;" width="624" /></span></span></span></div>
<h4 dir="ltr" style="line-height: 1.38; margin-bottom: 4pt; margin-top: 14pt;">
<span style="background-color: transparent; color: #666666; font-family: "arial"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Operators:</span></h4>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">These are like middlemen that act partly like publishers and partly like subscribers and allows us to do some amazing things by providing a ton of default operators.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">For Ex: </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">‘receive(on:)’ is an operator that can be used to pass the data from a publisher that returns the data on the background thread to the subscriber on the main thread.</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Looking at this high-level design, I was stunned to see how Apple’s engineers had bluntly stolen all the core concepts of RxSwift(ReactiveCocoa as well) like Publishers, subscribers, combineLatest, zip, etc [and not even changing their names ;) ] and has created its own copy-cat version called ‘Combine’ by applying some of their own methodologies to fit into the Swift world.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Apple still seems to be following the core principles defined by the late and great Steve Jobs:</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">“</span><span style="background-color: white; color: black; font-family: "times new roman"; font-size: 16.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Good artists copy; great artists steal.</span><span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">”</span></div>
<b style="font-weight: normal;"><br /></b><br />
<h2 dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 18pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Combine Vs RxSwift:</span></h2>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Here are major counterparts:</span></div>
<b id="docs-internal-guid-3c1ccc3b-7fff-6394-6c3e-1501f99c1c5c" style="font-weight: normal;"><br /></b>
<br />
<div align="left" dir="ltr" style="margin-left: 0pt;">
<table style="border-collapse: collapse; border: none; table-layout: fixed; width: 468pt;"><colgroup><col></col><col></col></colgroup><tbody>
<tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; text-align: center;">
<span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">Combine</span></div>
</td><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; text-align: center;">
<span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">RxSwift</span></div>
</td></tr>
<tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; text-align: center;">
<span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Publisher</span></div>
</td><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; text-align: center;">
<span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Observable</span></div>
</td></tr>
<tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; text-align: center;">
<span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Subscriber</span></div>
</td><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; text-align: center;">
<span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Observer</span></div>
</td></tr>
<tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; text-align: center;">
<span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">receive(on:)</span></div>
</td><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; text-align: center;">
<span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">observeOn</span></div>
</td></tr>
</tbody></table>
</div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">This </span><a href="https://github.com/CombineCommunity/rxswift-to-combine-cheatsheet" style="text-decoration: none;"><span style="background-color: white; color: #1155cc; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre;">cheat sheet</span></a><span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> is for those who’ve used RxSwift already.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
</div>
<h2 dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 18pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Combine:</span></h2>
<b style="font-weight: normal;"><br /></b>
<br />
<h4 dir="ltr" style="line-height: 1.38; margin-bottom: 4pt; margin-top: 14pt;">
<span style="background-color: transparent; color: #666666; font-family: "arial"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Pros:</span></h4>
<ul style="margin-bottom: 0; margin-top: 0;">
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><div dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Works well with SwiftUI by modifying the model properties which lets the SwiftUI generate the views dynamically using @State, @Binding @BindableObject APIs</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><div dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Built directly into the OS</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><div dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Highly performant</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><div dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Support Cross Apple Platforms</span></div>
</li>
</ul>
<b style="font-weight: normal;"><br /></b>
<br />
<h4 dir="ltr" style="line-height: 1.38; margin-bottom: 4pt; margin-top: 14pt;">
<span style="background-color: transparent; color: #666666; font-family: "arial"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Cons:</span></h4>
<ul style="margin-bottom: 0; margin-top: 0;">
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><div dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Relatively new and hence would get minimal help with issues/documentation</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><div dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Support only iOS13 and up devices</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><div dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">RxCocoa gives us powerful API’s to streams data from UI components and works well with UIKit, Combine doesn’t provide anything as such</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><div dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Not community-driven aka closed source project</span></div>
</li>
</ul>
<b style="font-weight: normal;"><br /></b>
<br />
<h2 dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 18pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Conclusion:</span></h2>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">I suppose that RxSwift’s popularity has only gone up after Combine is released but it might eventually come to an end in the future since Combine is natively built into the OS and has way more power in comparison and is clearly a winner. </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">But, that’s not going to happen sooner because ‘Combine’ is still relatively new and the fact that it only supports iOS13 and up pales in comparison to RxSwift’s iOS8 and up and Apple’s don’t seem to have any backward compatibility plans for this.</span></div>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">If you’re still interested in learning RxSwift with the VIPER design pattern, then </span><a href="https://www.udemy.com/course/learn-functional-reactive-programming-and-viper-with-swift3/" style="text-decoration: none;"><span style="background-color: white; color: #1155cc; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre;">this</span></a><span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> course should give you a headstart which is still relevant to this date.</span></div>
</div>
A Passionate Technologists' Journalhttp://www.blogger.com/profile/14721983341617245683noreply@blogger.com0tag:blogger.com,1999:blog-2565897470844400901.post-57301288801957161882020-04-10T08:27:00.002-07:002020-04-10T08:44:07.853-07:00Resume App with SwiftUI<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 18pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Introduction:</span></h2>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">If you’re looking for an introduction to SwiftUI, <a href="https://saru2020.blogspot.com/2020/04/swiftui-uikits-successor.html" target="_blank">this</a><swiftui -="" here="" link="" s="" successor="" the="" uikit=""> serves as a good starting point.</swiftui></span></div>
<b id="docs-internal-guid-34202135-7fff-03b5-95bf-83cc5cc55d58" style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">This is about my experience learning/building the first SwiftUI app, that was built while learning </span><br />
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">the SwiftUI’s layout system.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">I tried to build out an iPad app(Since iPhone doesn’t fit well for this app) that’d display Resume </span><br />
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">based upon the content provided to it in the intended format. </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Here’s the </span><a href="https://github.com/saru2020/SwiftUIResumeApp" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre;">Github repo</span></a><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> of the open-sourced iPad app for the complete details.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">The entire app’s/resume’s template is based upon </span><a href="https://koenig-media.raywenderlich.com/downloads/Resume_RendonCepeda.pdf" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre;">this</span></a><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> resume template with just a few tweaks </span><br />
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">added to it.</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">So, now we have the UI for the app ready that we intend to develop with SwiftUI.</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">On top of it, I planned to have a couple of additions with respect to the requirements of the app:</span></div>
<ul style="margin-bottom: 0; margin-top: 0;">
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><div dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">Theming:</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> The entire app should be easily ‘Themable’ aka easy to configure/apply themes</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><div dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">Icons:</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> The app shouldn’t use any of the images and should use only the fonts so that it easily adapts to our ‘Themable’ requirement. All the fonts used in the project are from </span><a href="http://icomoon.com/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre;">here</span></a><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">.</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><div dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">Data:</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> And of course, the data should be configurable and hence we fetch the resume data from a separate json file embedded inside the project.</span></div>
</li>
</ul>
<b style="font-weight: normal;"><br /></b>
<br />
<h2 dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 18pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">My Learnings/Tryout Notes:</span></h2>
<ul style="margin-bottom: 0; margin-top: 0;">
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><div dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">SwiftUI components like View, Text, Image, etc are the basic building blocks and are supported by cross apple platforms. This </span><a href="https://github.com/SimpleBoilerplates/SwiftUI-Cheat-Sheet" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre;">cheat sheet</span></a><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">(SwiftUI Vs UIKit) should get you started quickly</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><div dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">SwitUI seems to have got heavily inspired by React’s component-based approach. It enables you to create reusable components that could be used across projects with ease.</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><div dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">The majority of my time was spent on learning the layout system of the framework, so this is where the biggest learning curve lies.</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><div dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">SwiftUI’s layout system starts from the bottom of the view hierarchy and asks each child view to position or adjust/resize itself based upon its parent’s bounds and then goes further up the stream and asks the parent or top views to position its children within its own bounds</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><div dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Views can be stacked vertically, horizontally, depth-ic-ally by using VStack, HStack & ZStack respectively.</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><div dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Modifiers like resizable, backgroundColor, etc can be used to modify the view’s properties and the best thing about them is that they all can be chained with the declarative nature of the APIs to have concise syntax to achieve complex UI with the minimal codebase.</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><div dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">‘Spacer’ is used to achieve the flexible layout aka when placed between 2 views, it occupies all the remaining space other than the space occupied by the 2 UI components in any stacks</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><div dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">‘frame’ & ‘padding’ modifiers allow us to define the view’s size and margins</span></div>
</li>
</ul>
<b style="font-weight: normal;"><br /></b>
<br />
<h3 dir="ltr" style="line-height: 1.38; margin-bottom: 4pt; margin-top: 16pt;">
<span style="background-color: transparent; color: #434343; font-family: "arial"; font-size: 13.999999999999998pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Other Notes:</span></h3>
<ul style="margin-bottom: 0; margin-top: 0;">
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><div dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">SwiftUI’s @State, @Binding, and other property wrapper and the power of using it with Combine framework are what’s most exciting here.</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><div dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">There are still </span><a href="https://github.com/saru2020/SwiftUIResumeApp/issues" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre;">some issues</span></a><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> that I’m facing, any help to this newbie is appreciated ;)</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><div dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Now, this app is also easily portable to the </span><a href="https://github.com/saru2020/SwiftUIResumeApp/issues/4" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre;">Mac</span></a><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> as well.</span></div>
</li>
</ul>
<b style="font-weight: normal;"><br /></b>
<br />
<h2 dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 18pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Conclusion:</span></h2>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">I hope this iPad app helps someone to quickly grasp the basics of layout-ing UI components using the SwiftUI framework and also serves as a tool for new job seekers as well.</span></div>
<div>
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
</div>
A Passionate Technologists' Journalhttp://www.blogger.com/profile/14721983341617245683noreply@blogger.com0tag:blogger.com,1999:blog-2565897470844400901.post-19172587869682152562020-04-10T08:27:00.000-07:002020-04-10T08:33:30.505-07:00SwiftUI - The UIKit's Successor<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 18pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Introduction</span></h2>
<h2 dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 18pt;">
<b id="docs-internal-guid-5d20cc8a-7fff-2a77-04be-1c3ff91de700" style="font-weight: normal;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Let’s start with </span><a href="https://developer.apple.com/xcode/swiftui/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre;">Apple’s Own Definition</span></a><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">:</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">“SwiftUI is an innovative, exceptionally simple way to build user interfaces across all </span><br />
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Apple platforms with the power of Swift. Build user interfaces for any Apple device using just </span><br />
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">one set of tools and APIs. With a declarative Swift syntax that’s easy to read and natural to write, </span><br />
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">SwiftUI works seamlessly with new Xcode design tools to keep your code and design perfectly in sync. </span><br />
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Automatic support for Dynamic Type, Dark Mode, localization, and accessibility means your first line </span><br />
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">of SwiftUI code is already the most powerful UI code you’ve ever written.”</span></div>
<br /><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Although it is NOT a replacement for UIKit/AppKit, take it or not, UIKit/AppKit is about to die slowly </span><br />
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">just like Objective-C and SwiftUI is going to replace UIKit/Appkit in the iOS/macOS platforms. </span></div>
</b></h2>
<h2 dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 18pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">On SwiftUI Views:</span></h2>
<h2 dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 18pt;">
<b style="font-weight: normal;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">“SwiftUI Views are functions of state and not a sequence of events like UIKit”, meaning the views </span><br />
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">are created based upon your data/model and most importantly they’re structs aka value types thus </span><br />
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">cannot be referenced meaning they’re immutable and doesn’t allow any manipulation like </span><br />
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">adding/removing subviews. </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">However, you can use certain property wrappers like @State, @Binding, @BindableObject to </span><br />
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">create the views dynamically based upon the updates to the property of your model aka whenever </span><br />
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">your data changes.</span></div>
<br /><br /><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Let’s look at the several Pros & Cons of SwiftUI:</span></div>
</b></h2>
<h3 dir="ltr" style="line-height: 1.38; margin-bottom: 4pt; margin-top: 16pt;">
<span style="background-color: transparent; color: #434343; font-family: "arial"; font-size: 13.999999999999998pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Pros:</span></h3>
<h2 dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 18pt;">
<b style="font-weight: normal;"><ul style="margin-bottom: 0; margin-top: 0;">
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><div dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">Adaptability:</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> Easy to learn and use the declarative syntax as opposed to UIKit imperative approach</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><div dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">Cross Apple Platforms:</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> Native support across Apple platforms</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><div dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">Features:</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> You get a ton of automatic support like ‘Dynamic Type, Dark Mode, Localization, Accessibility’ out of the box</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><div dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">Semantic Colors:</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> SwiftUI framework changes the colors automatically based upon the dark/light mode so that you don’t have to deal with that complexity anymore </span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><div dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">UIKit Compatible:</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> Can be used alongside UIKit with UIHostingController</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><div dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">Reactive Programming:</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> If you’re a fan of Reactive programming, you’ll love this. SwiftUI provides ways to map your data to the view’s aka data flow as streams with the help of property wrappers & the brand new Combine framework</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><div dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">Multiple Previews:</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> SwiftUI previews allow you to view multiple devices & orientation versions of the same UI with hot reloading which helps in faster UI development</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><div dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">Animations:</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> Adding animations to SwiftUI views is a breeze</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><div dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">Performance:</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> SwiftUI views are structs aka value types and thus has less performance impact while creating the views</span></div>
</li>
</ul>
</b></h2>
<h3 dir="ltr" style="line-height: 1.38; margin-bottom: 4pt; margin-top: 16pt;">
<span style="background-color: transparent; color: #434343; font-family: "arial"; font-size: 13.999999999999998pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Cons:</span></h3>
<h2 dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 18pt;">
<b style="font-weight: normal;"><ul style="margin-bottom: 0; margin-top: 0;">
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><div dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">Deployment:</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> Works only on iOS13 and up devices aka no backward compatibility to older iOS devices</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><div dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">Less support:</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> SwiftUI is relatively new and hence doesn’t offer much help with debugging</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><div dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">No Access to view hierarchy: Doesn’t allow you to debug the view hierarchy in Xcode Previews</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><div dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">UIKit/AppKit:</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> All the knowledge that you’ve gained so far for over a decade or have mastered with UIKit/AppKit is nearly obsolete now</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><div dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">AutoLayout:</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> SwiftUI doesn’t support AutoLayout. All you Auto Layout knowledge is also obsolete now and you have to learn the SwiftUI’s new layout system</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><div dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">Storyboard/Interface-Builder:</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> All the storyboarding stuff/tooling is gone, all your related knowledge is obsolete now</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><div dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">Value Types:</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> SwiftUI views are structs aka value types and thus views cannot be referenced or accessed or modified/mutated</span></div>
</li>
</ul>
</b></h2>
<h2 dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 18pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Learn by building an app:</span></h2>
<h2 dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 18pt;">
<b style="font-weight: normal;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">If you’re looking to jump-start by learning the fundamentals by building out an app with the SwiftUI framework, <a href="https://saru2020.blogspot.com/2020/04/resume-app-with-swiftui.html" target="_blank">this</a><resume app="" here="" link="" swiftui="" with=""> would be a good start.</resume></span></div>
</b></h2>
<h2 dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 18pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Conclusion:</span></h2>
<h2 dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 18pt;">
<span style="font-weight: normal;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">Though it is up to us to adapt to the SwiftUI framework or choose to stay using UIKit/AppKit. </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">For the long term sustainability and in order to stay relevant & competitive in the marketplace, you need to learn and master SwiftUI if you’re planning to keep developing apps for users on Apple’s platforms.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">After all, it is not all bad at all, fortunately, Apple engineers have done a good job with SwiftUI, adapting to use it, is the future we’re driving towards which looks well and good. </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">Always remember that: “‘Change’ is the only thing in this world that is a constant, everything/anything else is variable”, these golden words are stuck with me after having heard it from our </span><a href="https://www.youtube.com/watch?v=eim8FSUsKH8" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">Thalaivar</span></a><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">.</span></div>
<div>
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
</span></h2>
</div>
A Passionate Technologists' Journalhttp://www.blogger.com/profile/14721983341617245683noreply@blogger.com0tag:blogger.com,1999:blog-2565897470844400901.post-68663758451979177852019-06-06T02:15:00.000-07:002019-06-06T04:23:38.234-07:00WWDC 2019 Keynote - Summary<div dir="ltr" style="text-align: left;" trbidi="on">
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 17.0px 'Helvetica Neue'}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'Helvetica Neue'; min-height: 14.0px}
p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'Helvetica Neue'}
p.p4 {margin: 0.0px 0.0px 2.0px 0.0px; font: 14.0px 'Helvetica Neue'}
p.p5 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'Helvetica Neue'; min-height: 15.0px}
p.p6 {margin: 0.0px 0.0px 2.0px 0.0px; font: 14.0px 'Helvetica Neue'; min-height: 17.0px}
span.s1 {text-decoration: underline}
</style>
<br />
<h2 style="text-align: left;">
<b style="font-family: "Helvetica Neue";"><span style="font-size: large;">Introduction:</span></b></h2>
<div class="p1" style="text-align: left;">
<span style="font-size: 12px;">The <a href="https://www.apple.com/apple-events/june-2019/" target="_blank">WWDC 2019 keynote</a> starts with a nicely dedicated video just for the Apple developers, what a heartwarming one when it connects with you so instantly, just WOW!</span><span class="Apple-converted-space" style="font-size: 12px;"> </span></div>
<div class="p3" style="text-align: left;">
They bought me here itself ;) Apple definitely plays around with our emotions a lot!</div>
<div class="p2" style="text-align: left;">
<br /></div>
<div class="p3" style="text-align: left;">
These are the notes I made while watching the whole keynote and it contains a very HIGH-LEVEL summary. </div>
<div class="p3" style="text-align: left;">
I hope it helps those who don’t want to watch the whole 2+ hours length of WWDC 2019 keynote video and just wants to grab the updates on a high level. </div>
<div class="p3" style="text-align: left;">
<b>Note: </b>I might’ve missed some points/notes that didn’t interest me as well.<span class="Apple-converted-space"> </span></div>
<div style="text-align: left;">
<span class="Apple-converted-space"><br /></span><span class="Apple-converted-space"><span style="font-family: "helvetica neue"; font-size: 12px;">So, without further ado, here are my notes:</span></span></div>
<div>
<span class="Apple-converted-space"><span style="font-family: "helvetica neue"; font-size: 12px;"><br /></span></span></div>
<div class="p4">
<b><span style="font-size: small;">Apple TV:</span></b></div>
<div class="p3">
Multi-user support hence more personalized content than ever</div>
<div class="p3">
Apple Music with lyrics scrolling on the side</div>
<div class="p2">
<br /></div>
<div class="p2">
<br /></div>
<div class="p4">
<b><span style="font-size: small;">Watch OS 6:</span></b></div>
<div class="p3">
Numerous watch faces (I liked the gradient & sun location based ones)</div>
<div class="p3">
Audiobooks (Hear on the go)</div>
<div class="p3">
Voice Memos (Record on the go)</div>
<div class="p3">
Calculator (Including the ability to calculate tips and split the bill with friends)</div>
<div class="p3">
Independent watch apps (Watch apps aren’t dependent on iPhone now)</div>
<div class="p3">
Dedicated App Store</div>
<div class="p3">
Activity trends with a long term analysis. (If you’re a fitness freak and always seek to get notified about your long term progress, this is a game changer for sure)</div>
<div class="p3">
Hearing Health - It provides you the analysis of the sound in your environment embracing your hearing health and they kinda mocked Amazon Alexa saying that it doesn’t record or save any audio ;) It aroused so much laughter</div>
<div class="p3">
Menstrual cycle tracking (Also available on iPhone’s Health app) - Womens are going to love it and several 3rd party apps are going to shut down their businesses</div>
<div class="p2">
<br /></div>
<div class="p2">
<br /></div>
<div class="p2">
<br /></div>
<div class="p4">
<b><span style="font-size: small;">iOS13:</span></b></div>
<div class="p3">
<b>Pre-Note: </b>iOS12 Adoption Rate = 85% [Android 9 = 10%] (They gave this comparison and it raised some laughter)</div>
<div class="p2">
<br /></div>
<div class="p3">
50% smaller app download size</div>
<div class="p3">
60% of smaller app updates size</div>
<div class="p3">
2x faster app launches</div>
<div class="p3">
Dark Mode (As expected by many)</div>
<div class="p3">
QuickPath Keyboard - Swipe to type (Expected long back)</div>
<div class="p3">
Photos Share sheet/options shows people with the people in the photos</div>
<div class="p3">
Music app - Displaying lyrics with music time sync (This will also make other/related music apps go out of their businesses)</div>
<div class="p3">
Mail - Rich text formatting support</div>
<div class="p3">
Reminders: (This was expected a long back and this will again make other businesses to run out)</div>
<div class="p3">
Revamped from ground-up.<span class="Apple-converted-space"> </span></div>
<div class="p3">
Smart list to keep track of the tasks</div>
<div class="p3">
Create tasks with activity/image or by tagging people</div>
<div class="p3">
And so much more. [I believe that I’ll finally have to delete all those tasks/reminder apps from my phone]</div>
<div class="p2">
<br /></div>
<div class="p3">
<b>Maps: </b>(It still won’t be able to compete with Google Maps)</div>
<div class="p3">
Ways to save the places to the collections<span class="Apple-converted-space"> </span></div>
<div class="p3">
3D view of the places</div>
<div class="p3">
Share ETA with friends</div>
<div class="p2">
<br /></div>
<div class="p3">
<b>Privacy improvements:</b></div>
<div class="p3">
Location: (This change will the lives of several apps terrible)</div>
<div class="p3">
Just Allow Once - Allows the app to use the device location only once</div>
<div class="p3">
Background tracking alerts - iOS will give reports on what/when all the apps are tracking</div>
<div class="p3">
Wifi & Bluetooth protections - They’re shutting the doors on that abuse as well (I need to do see a way how they’re doing it)</div>
<div class="p2">
<br /></div>
<div class="p3">
<b>Sign in with Apple ID:</b></div>
<div class="p3">
Available on all Apple devices and the web.</div>
<div class="p3">
User can choose to reveal (or not) their email ID or any other personal information</div>
<div class="p3">
When users don’t reveal their email address, iOS generates a random email address to the app and each randomly generated address is unique to the app and the user can choose to retire/delete/disable those random email address once they’re done with those apps</div>
<div class="p2">
<br /></div>
<div class="p3">
<b>HomeKit:</b></div>
<div class="p3">
<b>HomeKit secure video</b> - Analyses in your home’s Apple devices. It saves video up to 10 days, encrypts and saves to iCloud and don’t count against the storage</div>
<div class="p3">
<b>HomeKit enabled Routers</b> - It acts as a firewall to the devices in your home</div>
<div class="p2">
<br /></div>
<div class="p3">
<b>Messages:</b></div>
<div class="p3">
It auto-detects the numbers and displays the name & photo or Memoji of the person linked to it</div>
<div class="p3">
Memoji comes with a whole pack of makeup set with numerous options to configure your hats, glasses, hairs, lipstick, tooth, eye shadows, etc….</div>
<div class="p3">
Memoji stickers - iOS generates a sticker pack for all your memoji’es and is supported on all the devices with A9 chips.</div>
<div class="p2">
<br /></div>
<div class="p3">
<b>Photos:</b></div>
<div class="p3">
Portrait Mode - Lightning effect.</div>
<div class="p3">
Edit photos with swipe option for every effect.</div>
<div class="p3">
You can now rotate, apply filters/effects to the VIDEOS, yes you heard it right, you can edit videos on your iPhone.</div>
<div class="p3">
The photos browsing experience is modified through machine learning by decluttering the screenshots and duplicates.</div>
<div class="p2">
<br /></div>
<div class="p3">
<b>Siri:</b></div>
<div class="p3">
Announce Messages - When Siri reads the message to you, you can just respond to it and it’ll send the message automatically</div>
<div class="p3">
Connect multiple AirPods to one single device to share the music/movie and watch it along with a friend.</div>
<div class="p3">
Hands-off to HomePod - It plays the music exactly from where the iPhone/HomePod left off</div>
<div class="p3">
100,000 radio stations added/supported from around the world, could be asked to Siri to play.</div>
<div class="p3">
HomePod can recognize who in the family is talking and personalize the response based off of them</div>
<div class="p3">
Dedicated Siri Shortcuts app to list/configure all of it from one place</div>
<div class="p3">
Siri voice now comes from Neural TTS[Text to Speech] aka it is more natural due to machine learning optimizations and the voice is completely generated by the system</div>
<div class="p2">
<br /></div>
<div class="p3">
<b>Few Other Hidden gems: (These weren’t introduced but they were mentioned in the slides)</b></div>
<div class="p3">
Wifi selection on Control Centre</div>
<div class="p3">
Low Data mode</div>
<div class="p3">
Separate iCloud accounts for personal & work</div>
<div class="p3">
iPhone Silences unknown callers</div>
<div class="p3">
Indian English Siri voices<br />
<br />
Xcode 11 has a mini-map<br />
<br /></div>
<div class="p3">
And so much more…</div>
<div class="p2">
<br /></div>
<div class="p2">
<br /></div>
<div class="p4">
<b><span style="font-size: large;">iPad OS:</span></b></div>
<div class="p4" style="text-align: left;">
<span style="font-size: x-small;">[This is the first time where they’re introducing a dedicated platform for iPad after nearly 10 years of its introduction]</span></div>
<div class="p3">
Pin widgets right onto the home screen</div>
<div class="p3">
Split screen improvement - Swipe up from the side panel brings up all the apps that were previously displayed onto the sidebar</div>
<div class="p3">
Multi-tab apps (yes, you can have multiple instances of the same app in multiple windows. Demo with Notes completely was fantastic)</div>
<div class="p3">
App expose to display all the open windows of the apps</div>
<div class="p5">
<b></b><br /></div>
<div class="p3">
<b>Files:</b></div>
<div class="p3">
Column view (just like on Mac)</div>
<div class="p3">
iCloud Drive folder sharing</div>
<div class="p3">
USB/SD drives can be plugged in to copy the files [ You iPad is like a mini-computer now, although this seemed to have been targeted towards Indian consumers ;) ]</div>
<div class="p5">
<b></b><br /></div>
<div class="p3">
<b>Safari:</b></div>
<div class="p3">
Desktop class browsing [You’ll see the desktop version of the sites and not iPhone sizes, but does it has any more work than to change the ‘user-agent’?]</div>
<div class="p3">
Download manager</div>
<div class="p3">
Keyboard shortcuts</div>
<div class="p2">
<br /></div>
<div class="p3">
<b>Fonts:<span class="Apple-converted-space"> </span></b></div>
<div class="p3">
Now, Custom Fonts can be downloaded from the App Store to use across all the apps</div>
<div class="p2">
<br /></div>
<div class="p3">
<b>Gestures:</b></div>
<div class="p3">
Grab the scrolling indicator to jump through the long documents</div>
<div class="p3">
Ability to drag the cursor around (Seems same as iOS experience to me)</div>
<div class="p3">
Drag for text selection (Seems same as iOS experience to me)</div>
<div class="p3">
3 finger swipe in - once/twice to copy/cut</div>
<div class="p3">
3 finger swipe out to paste</div>
<div class="p3">
3 finger left swipe to ‘undo’ (No more shaking of iPad) [And I think right swipe is to ‘redo’]</div>
<div class="p2">
<br /></div>
<div class="p3">
<b>Apple Pencil:</b></div>
<div class="p3">
Earlier it had the Industry low latency of 20ms. This is now reduced to 9ms [Drastic improvement for sure]</div>
<div class="p3">
PencilKit API opening up to 3rd party developers to improve the app/Pencil experience</div>
<div class="p2">
<br /></div>
<div class="p3">
<b>Markup mode:<span class="Apple-converted-space"> </span></b></div>
<div class="p3">
Swiping from the bottom with Pencil brings up the markup with the screenshot</div>
<div class="p2">
<br /></div>
<div class="p2">
<br /></div>
<div class="p2">
<br /></div>
<div class="p4">
<b><span style="font-size: large;">Mac Pro: </span></b></div>
<div class="p4" style="text-align: left;">
<span style="font-size: x-small;">[Mac with the highest configuration ever for powerful workstations/studios]</span></div>
<div class="p3">
28-core Intel Xeon Processor</div>
<div class="p3">
1.5 terabytes of system memory</div>
<div class="p3">
Pro Display XDR</div>
<div class="p3">
Pro Stand which is rotatable aka you can view your Mac in Portrait mode (But the cost of $999 ignited some memes ;) )</div>
<div class="p2">
<br /></div>
<div class="p2">
<br /></div>
<div class="p2">
<br /></div>
<div class="p4">
<b><span style="font-size: large;">Mac OS - Catalina:</span></b></div>
<div class="p3">
<b>iTunes:</b> (What all can iTunes do? Everybody has this Q in mind)</div>
<div class="p3">
They mocked the Q by making a screenshot with Calendar/Mail/Safari inside iTunes, ROFL, it was wonderfully mocked by Craig. (A must watch @1:44:00 for Craig fans for sure)</div>
<div class="p3">
iTunes is now 3 apps: Apple Music, Podcasts, Apple TV</div>
<div class="p3">
Device syncing now happens in Finder</div>
<div class="p2">
<br /></div>
<div class="p3">
<b>SideCar:</b><span class="Apple-converted-space"> </span></div>
<div class="p3">
Use iPad as a 2nd display for the Mac</div>
<div class="p2">
<br /></div>
<div class="p3">
<b>Accessibility:</b> (Voice Control is leveraged to a whole new level)</div>
<div class="p3">
You can now control your iOS & Mac devices with just your voice, any physical motor diseased person is going to be blown away for sure. (The demo was nice as well)</div>
<div class="p3">
Rich dictation & editing</div>
<div class="p3">
Local Voice processing - No audio recording/saving</div>
<div class="p2">
<br /></div>
<div class="p3">
<b>Find My:</b> (It works in tandem with Find My iPhone & Find My friends)</div>
<div class="p3">
It now works for Mac as well and that too in offline mode.</div>
<div class="p3">
This is how it works for Mac in Offline mode:</div>
<div class="p3">
Mac sends Bluetooth beacon signal to the nearby iOS device and theses devices in-turn sends the signal to the other nearby devices until the Apple server detects one and this whole signal relaying process is encrypted and anonymous.</div>
<div class="p2">
<br /></div>
<div class="p3">
<b>Activation Lock:</b></div>
<div class="p3">
Macs with T2 chip can be locked if stolen and it won’t reboot until done with the user’s credentials</div>
<div class="p2">
<br /></div>
<div class="p3">
<b>Screen time on Mac:</b></div>
<div class="p3">
You can now have a consolidated report of all your devices usage.</div>
<div class="p2">
<br /></div>
<div class="p3">
<b>Project Catalyst:</b></div>
<div class="p3">
<b>Pre-Note: </b>100 Million active Mac user base</div>
<div class="p3">
Developers can now develop or port the existing or new iPad apps to Mac platform with very fewer efforts. (The words described by JIRA iOS Engineer weren’t much satisfying though as it didn’t address anything specific and I think they made him speak to simply connect with the audiences)</div>
<div class="p3">
Basically, an iOS developer can now develop apps for iPhone, iPad & also the Mac. It just opens up a ton of opportunities for every app on the iOS App Store.</div>
<div class="p2">
<br /></div>
<div class="p2">
<br /></div>
<div class="p4">
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 2.0px 0.0px; font: 14.0px 'Helvetica Neue'}
</style>
</div>
<div class="p1">
<b><span style="font-size: large;">Augmented Reality:</span></b></div>
<div class="p4">
<b>RealityKit:<span class="Apple-converted-space"> </span></b></div>
<div class="p3">
Create 3D effects in a new way.<span class="Apple-converted-space"> </span></div>
<div class="p3">
Photorealistic rendering</div>
<div class="p3">
Environment & camera effects</div>
<div class="p3">
Animation, physics, audio, Native ARKit integration, Swift API</div>
<div class="p6">
<b></b><br /></div>
<div class="p4">
<b>Reality Composer:<span class="Apple-converted-space"> </span></b></div>
<div class="p3">
Design/Model/Compose 3D objects</div>
<div class="p3">
Built into Xcode but also available on iOS devices so that developers can edit, test and tune on any of them</div>
<div class="p6">
<b></b><br /></div>
<div class="p4">
<b>ARKit3:</b></div>
<div class="p3">
<b>People Occlusion:</b> Can detect people’s position on camera and you can basically create an animation scene/movie. (Minecraft demo was just fabulous)</div>
<div class="p3">
<b>Motion Tracking:</b> It can now track people’s action/motion and apps can create graphics to motion [Remember the scene from the Tamil movie: Jeans(1999), where the lead actress does a double role with the motion capture tech? You can now create the same scene from your iPhone]</div>
<div class="p2">
<br /></div>
<div class="p2">
<br /></div>
<div class="p4">
<b><span style="font-size: large;">Swift:</span></b></div>
<div class="p3">
<b>Pre-Note: </b>450,000 apps on the App Store using Swift</div>
<div class="p2">
<br /></div>
<div class="p3">
Objective-C was built on AppKit(Mac) & it eventually ignited the creation of UIKit(iOS), so when Swift was introduced, access to these frameworks were mandatory but Swift is actually meant to deal with a new UI framework and hence they introduced Swift UI, a brand new UI framework, which literally marks the end of the AppKIt & UIKit frameworks and of course Objective-C. Jeez! This is like going into a fucking whole new world for the developers.</div>
<div class="p2">
<br /></div>
<div class="p3">
<b><span style="font-size: small;">SwiftUI:</span></b></div>
<div class="p3">
All new UI framework</div>
<div class="p3">
Declarative syntax</div>
<div class="p3">
Swift Code</div>
<div class="p3">
A completely Interactive Development</div>
<div class="p3">
You can develop apps for all Apple platforms with the tool, with a common interface.</div>
<div class="p2">
<br /></div>
<div class="p2">
<br /></div>
<div class="p3">
<b><span style="font-size: large;">Conclusion:</span></b></div>
<div class="p3">
WWDC ended up with a fantastic 'SwiftUI'.</div>
<div class="p3">
And Tim Cook making a note of the Apple employees dedicated work by sacrificing their family times working on these improvements for years was a bit heartwarming for people who feel and be in the same situation most of the time.</div>
<div class="p2">
<br /></div>
<div class="p3">
Here are my interesting ones from the releases:</div>
<div class="p3">
SwiftUI</div>
<div class="p3">
Project Catalyst</div>
<div class="p3">
SideCar</div>
<div class="p3">
Login with Apple ID</div>
<div class="p3">
Dedicated iPad platform</div>
<div class="p3">
Accessibility changes</div>
<div class="p2">
<br /></div>
<div class="p3">
What are yours?</div>
<div class="p2">
<br /></div>
<div class="p2">
<br /></div>
<div class="p2">
<br /></div>
<div class="p2">
<br /></div>
<div class="p2">
<br /></div>
<div class="p2">
<br /></div>
<div class="p2">
<br /></div>
<div class="p2">
<br /></div>
<div class="p2">
<br /></div>
<div class="p2">
<br /></div>
<div class="p2">
<br /></div>
<div class="p2">
<br /></div>
<br /></div>
A Passionate Technologists' Journalhttp://www.blogger.com/profile/14721983341617245683noreply@blogger.com1tag:blogger.com,1999:blog-2565897470844400901.post-1225740491047094642018-06-19T08:24:00.001-07:002023-04-16T08:58:17.617-07:00Working out Concave/Convex Hull<div dir="ltr" style="text-align: left;" trbidi="on">
This post is nearly like a continuation of my <a href="https://saru2020.blogspot.com/2018/04/free-hand-drawing-on-apple-maps.html" target="_blank">previous post.</a> But not necessarily need to be followed.<br />
<br />
<br />
This post itself is a note on my learnings with finding out a concave hull solution for a project that I worked on recently.<br />
<br />
<b>Requirements:</b><br />
We had a requirement where the user would simply freehand draw (FHD) on a map view and we should be able to fetch the list of users located/contained in that region.<br />
<br />
<b>Our Tools:</b><br />
We used MongoDB as the backend, which provides us with <a href="https://docs.mongodb.com/manual/reference/operator/query/polygon/" target="_blank">beautiful queries/API's</a> fast enough to search the list of users(we have in our DB) within a given polygon (Polygon = Freehand drawing enclosed with the starting & ending points, hence forming a region).<br />
The only issue with MongoDB search is that it expects a perfect polygon with no intersection at all. If a single point in the polygon intersects then it'll simply throw out <a href="https://jira.mongodb.org/browse/SERVER-31412" target="_blank">an error</a>. Not sure if MongoDB guys did this intentionally, but it leaves its users with a huge burden/workaround to handle & implement their own solution for it.<br />
<br />
<b>Our Story:</b><br />
So, to solve this particular issue, we started looking around for the concave hull solutions.<br />
When we came across this <a href="https://github.com/AndriiHeonia/hull" target="_blank">hull</a> library, we felt that EUREKA moment, and eventually tried its <a href="https://github.com/SanyM/ConcaveHull" target="_blank">Swift counterpart</a>. But only after trying it out, we saw that it didn't work for us as we expected it to be.<br />
Definitely, the hull lib is fantastically done and works very well for convex hull by adjusting the 'concavity' parameter to adjust it based upon your need/requirement/satisfaction but certainly doesn't generate a perfect Concave hull, actually not even close to what we wanted, so we literally wasted/invested days to even try it out.<br />
<br />
But, later we decided to move on.<br />
To be noted here that we didn't have the resources to implement our own Concave hull solution.<br />
We even looked around btw and met <a href="https://github.com/locationtech/jts" target="_blank">JTS</a>, which had its <a href="https://github.com/GEOSwift/GEOSwift" target="_blank">Swift Counterpart</a>, which again didn't have the concave hull solution, only after this we decided that the Concave hull was a much bigger problem set that was even tried & failed by masters/giants in the industry.<br />
So after a very long time, we decided to go with our own custom/hybrid implementation, which seemed as the only feasible option for us at this stage.<br />
<br />
<br />
<br />
<h3 style="text-align: left;">
<b>This was the final solution that we ended up doing:</b></h3>
<div>
<b><br /></b></div>
When the user draws FHD on the map view, we'd create an imaginary(In the background) convex hull polygon, which is a valid region that our MongoDB server would accept to search for the users contained in that particular region and after the results are fetched, at the client end, we would loop through every result/user from the results list and check whether the user is contained within the user's drawn FHD region (which can be easily done with API's provided by Apple Maps framework or MapKit framework or even using the <a href="https://github.com/GEOSwift/GEOSwift" target="_blank">GEOSwift</a> API's) and ignore any user that doesn't contain within the user's FHD region.<br />
The major Caveat here is that the solution is not a scalable one, as it has to loop through every user to see if they fall into the region or not and hence has the performance of O(n), which is not ideal in case of scalable systems.<br />
But, unfortunately, we're stuck with this solution for now with this problem set.<br />
But, there are other ways to handle it like <a href="https://eng.uber.com/go-geofence/" target="_blank">Uber's approach</a> of categorizing users with country/city wise, which seems to be a good one and have also been looking out for other approaches that we'll be tackling in the near future.<br />
<br />
So, if there's any betterment that can be done/applied here, please don't hesitate to comment it out as it might be of a great help to us and If you find this information helpful, please do share the same across and please show some gratitude in the comments below ;)<br />
<br />
<br />
<br />
<br />
<br /></div>
A Passionate Technologists' Journalhttp://www.blogger.com/profile/14721983341617245683noreply@blogger.com0tag:blogger.com,1999:blog-2565897470844400901.post-28550912458689813312018-04-07T09:46:00.001-07:002023-04-16T08:58:16.310-07:00Free Hand Drawing on Apple Maps<div dir="ltr" style="text-align: left;" trbidi="on">
This is kinda a note based on the learning I've had working with the Free Hand Drawing(FHD in short) on all the major Maps(Google, Mapbox & Apple Maps) on the market.<br />
<br />
So, If you'd like to have an in-depth technical understanding, please refer <a href="https://saru2020.blogspot.in/2015/05/free-hand-drawing-on-googles-map-view.html" target="_blank">this</a> post which was my first experience with FHD on Google Maps that delves deep into the Google Maps SDK explaining the FHD functionality & its implementation.<br />
And to get a context on the Mapbox based FHD solution, please do refer <a href="https://saru2020.blogspot.in/2018/03/SARMapBoxDrawView.html" target="_blank">this</a> blog.<br />
<br />
<b>What I learned with Apple Maps:</b><br />
Apple Maps iOS SDK doesn't differ much from Mapbox iOS SDK, most of the API's has almost the same signatures/pattern, it almost looks like a copy-paste from a developer(API User)'s perspective, Not sure if Apple Copied from Mapbox or vice-versa(I pick this), but the mapping system works totally different internally especially w.r.t the FHD features like polylines, polygons etc. The FHD works smoother on Apple Maps and there are some major differences specifically while drawing a polygon on Apple Maps & Mapbox.<br />
<br />
<i><b><br /></b></i> <i><b>Here's the gist of it:</b></i><br />
<br />
I tried drawing the polygon(Nearly the same) on both the maps and here's result on the Apple Maps:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-O2B5AV3Uvuc/Wsjyeygb5MI/AAAAAAABS9o/5sBtw-DXW-0jhGfVsZT3FbbLtM6B8dlAwCLcBGAs/s1600/Apple%2BMaps%2B-%2BPolygon.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1530" data-original-width="864" height="640" src="https://1.bp.blogspot.com/-O2B5AV3Uvuc/Wsjyeygb5MI/AAAAAAABS9o/5sBtw-DXW-0jhGfVsZT3FbbLtM6B8dlAwCLcBGAs/s640/Apple%2BMaps%2B-%2BPolygon.png" width="361" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
And this is the result of the Mapbox:</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-mZICRQkIYGY/Wsjyd99VJCI/AAAAAAABS9k/jGsMpNjqQDADlyhOLW1AKpJeWgXgwcyswCLcBGAs/s1600/Mapbox%2B-%2BPolygon.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1474" data-original-width="830" height="640" src="https://3.bp.blogspot.com/-mZICRQkIYGY/Wsjyd99VJCI/AAAAAAABS9k/jGsMpNjqQDADlyhOLW1AKpJeWgXgwcyswCLcBGAs/s640/Mapbox%2B-%2BPolygon.png" width="360" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<b>Are you seeing the difference?</b><br />
<br />
When you get the Polygon object from the Mapbox, it gives you all the intersecting & overlapping polygons altogether, so it is your job to decide on which one you want & omit others, which is unnecessary work in most of the use cases, where you'd end up wasting your valuable time re-inventing the wheel by writing a lot of algorithms just to get rid of those intersecting/overlapping areas in the polygon drawn.<br />
<br />
However, the Apple Maps polygon does all those tedious work for you and gives you the polygon by omitting those intersecting/overlapping polygon and also does a pretty good job of displaying the same on the Map View as well.<br />
<br />
Google Maps also behaves similar to the Apple Maps in most of the FHD use cases.<br />
<br />
<br />
For some reason, If you're stuck/planning to use Mapbox, then stay tuned for more updates in my next blog as I've done some good amount of work in that area of deciphering the polygon coordinates to phase out those intersecting/overlapping polygons.<br />
<br />
<a href="https://github.com/saru2020/SARAppleMapsCanvas" target="_blank">Here's</a> the open-source sample code that does all those amazing stuff.<br />
<br />
Share it across, if you've found it useful, let the needy rejoice.<br />
<br />
Have Fun!<br />
<br />
<br />
<br /></div>
A Passionate Technologists' Journalhttp://www.blogger.com/profile/14721983341617245683noreply@blogger.com0tag:blogger.com,1999:blog-2565897470844400901.post-17552575421199257232018-04-07T00:50:00.000-07:002018-04-07T00:55:35.057-07:00What I Learned While Building my Noisli Clone Musicly in React Native and Expo<div dir="ltr" style="text-align: left;" trbidi="on">
This is only a note on the <a href="https://levelup.gitconnected.com/musicly-noisli-in-react-native-efd14023bd7c" target="_blank">Blog post</a> I wrote on Medium <i>(that's getting garnered with a huge view counts & some claps, which I see it as a gratitude from the community)</i> on the stuff I learned while developing the Noisli clone app in React Native.<br />
I think there's no such tutorial/blog that explains the Pros & Cons and the different ways of developing the React Native apps, hence I think the blog post serves several kinds of people starting from a Fresher to even an Experienced developer who hasn't developed/tried all the approaches. I consider this article as a unique one as some of the people have conveyed/thanked me personally the same way that I had thought of and wrote it initially.<br />
<br />
I always feel it's better to have multiple touch points to some great posts/articles, hence adding a note here as well for those who haven't seen & would be interested to take a look at.<br />
<br />
Enjoy!<br />
<br />
<br /></div>
A Passionate Technologists' Journalhttp://www.blogger.com/profile/14721983341617245683noreply@blogger.com0tag:blogger.com,1999:blog-2565897470844400901.post-54441147841674317072018-03-25T04:35:00.000-07:002018-03-25T04:39:06.709-07:00iOS: Playing with Static Libs, Fat Frameworks, Static/Dynamic Frameworks with Swift & Objective-C classes mixed up<div dir="ltr" style="text-align: left;" trbidi="on">
Recently, I got to know few facts on how exactly Static Library(SL), Fat Frameworks(FF), Static/Dynamic Frameworks(SDF) actually works while I was working on a legacy code base which had a ton of all of the above stuff working altogether.<br />
<br />
This article is to log the few notes on the struggles we faced with having all these above things mixed up altogether with both Swift & Objective-C mixed up.<br />
<br />
<b><br /></b>
<b>Static Library(SL):</b><br />
Static Libraries was the initial(Way too Older now) way of code distribution where any project integrating the library would include .a file(Which contains the implementation classes) and all the header '.h' files separately along with the .a file in order for them to work in conjunction.<br />
<b><br /></b>
<b><br /></b>
<b>Fat Frameworks(FF):</b><br />
Fat Frameworks are nothing but just the Static Library compressed as a framework, which was a means of distributing the code before Xcode6 when Apple introduced Static/Dynamic Frameworks(SDF).<br />
<b><br /></b>
<b><br /></b>
<b>Static/Dynamic Frameworks(SDF):</b><br />
<i><b><br /></b></i>
<i><b>In Frameworks world, Umbrella Header file serves 2 purposes:</b></i><br />
<i>It acts as the Bridging header between Swift & Objective-C.</i><br />
<i>It acts as the interface between the Framework itself & other modules/projects.</i><br />
<br />
In order to create a SDF, you simply expose all the header files in the Framework's Umbrella Header file and Integrate the Framework into the other projects/modules and start using/accessing the Framework classes/files.<br />
<br />
But, in order to integrate non-modular frameworks(SL or FF) with both Swift & Objective-C files in it, you need to have a custom .modulemap file where you should explicitly expose all the headers that you're willing to expose to the user of the Framework. These changes applies with recent <a href="https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW936" target="_blank">Xcode9+ updates</a>.<br />
<br />
And there is a caveat even with this approach when you're dealing with SL or FF.<br />
We've seen it working very well when you have to deal with just one level deeper encapsulation like this:<br />
<i>Project --> FF </i><br />
<br />
But, when you're in a situation such as below:<br />
<i>Project --> FF --> SL</i><br />
or<br />
<i>Project --> FF --> FF --> SL</i><br />
or<br />
any other combinations of deeper layer that goes with SL or FF, then it becomes so much complicated and you'd have to do a lot unneccesary hard work to make them work altogether.<br />
<br />
At any bigger cost, it is always better to get out of that older techniques(SL or FF), since they're kinda becoming a burden to maintain the legacy code bases because it literally costs you more energy/time/money to have SL or FF going forward rather than switching to the SDF.<br />
Thus, going with the new SDF way is the wise advise to make the code bases less vulnerable, easily scalable and futuristic.<br />
<br />
Hope it helps someone struggling in that way. Cheers!<br />
<br />
<br /></div>
A Passionate Technologists' Journalhttp://www.blogger.com/profile/14721983341617245683noreply@blogger.com0tag:blogger.com,1999:blog-2565897470844400901.post-7855362025343027382018-03-09T22:57:00.001-08:002023-04-16T08:58:22.233-07:00Free Hand Drawing on Maps with MapBox SDK<div dir="ltr" style="text-align: left;" trbidi="on">
Recently, I got to work on the <a href="https://www.mapbox.com/" target="_blank">MapBox</a> SDK for iOS. So, this is a short journal of my experience with it.<br />
<br />
Basically, it's a MapBox SDK based freehand drawing article.<br />
For those who are here for Google Maps based solution, then please refer this <a href="https://saru2020.blogspot.in/2015/05/free-hand-drawing-on-googles-map-view.html" target="_blank">blog</a> which is again based on <a href="https://github.com/saru2020/SARMapDrawView" target="_blank">this lib</a>.<br />
<br />
<b>This is not a Google Maps Vs MapBox debate as well, please make up your mind before starting up.</b><br />
<i>[Note: Am not aware of the updates to the Google Maps SDK since 2015]</i><br />
<br />
So, let's start with what I've got to say.<br />
<br />
I've already created a Freehand Drawing(FHD, in short) tool, implemented way back in 2015, which was based on the Google Maps SDK, hence for MapBox based FHD solution, I was already 50% done.<br />
In the existing implementation, I have the touch detection and coordinates collection, polyline drawing & polygon drawing logics already implemented and in place, but all of them were using the GoogleMaps API's.<br />
So, the 2 main parts/API's that I'll need to look in MapBox SDK were:<br />
1.) Polyline<br />
2.) Polygon<br />
<i><br /></i> But, it was not straight-forward though, since the way Google Maps Polyline/Polygon API's designed were just around adding them directly as annotation/kinda directly on the map,<br />
<i>For Ex:</i><br />
You just have to reference your map object to the polyline object like this:<br />
<i> "polyline.map = mapView"</i><br />
So, the hierarchy kinda looks like this:<br />
<i>MapView --> Polyline</i><br />
<br />
but with MapBox, there are a few encapsulated layer which allows you to do multiple layers of customization. For example, in order to add a polyline, you can add directly as an annotation just like you do with the Google Maps API (As mentioned above)<br />
Or<br />
You can create a style layer(MGLLineStyleLayer) by assigning an MGLPolylineSource object to which the polyline(MGLPolylineFeature) object is added/referred.<br />
So, here the hierarchy looks something like this:<br />
<i>MapView --> StyleLayer --> Polyline</i><br />
<br />
And, the same goes with respect to the Polygon(MGLPolygon) as well.<br />
<br />
So, with MapBox, I can add the polyline/polygon in 2 different ways (As far as I've explored)<br />
<br />
Hence, it was quite simple to replace the GMSPolyline API's with respective MapBox polyline API's in the same <a href="https://github.com/saru2020/SARMapBoxDrawView/tree/SARMapBoxDrawView_ObjC" target="_blank">Objective-C project</a><add here="" reference=""> simply by removing the Google Maps SDK, but I faced an issue, with the implementation, where the Polygon was not getting displayed for dynamically calculated coordinates but was working very well for static coordinates.</add><br />
I raised an <a href="https://github.com/mapbox/mapbox-gl-native/issues/11376" target="_blank">issue on their Github page</a> and got a reply asking me to raise it to their support team, which I didn't expect, and when I emailed to their support team, I got a response back after a day saying that they won't be able to help me debug the issue and suggested to raise it on StackOverflow, so they are basically relying on the community out there for issues, probably since they have a very small team.<br />
But, they pointed me in the code where I was also skeptical about. It was around the CLLocationCoordinates2D array, where the issue might be, but I didn't mind to even fix that because I decided to re-write the whole implementation in Swift by then and thankfully the issue was resolved when I finished writting it up completely in Swift.<br />
<br />
So, finally, <a href="https://github.com/saru2020/SARMapDrawView" target="_blank">SARMapDrawView</a> was re-implemented/written in Swift and is open-sourced now as <a href="https://github.com/saru2020/SARMapBoxDrawView" target="_blank">SARMapBoxDrawView</a>.<br />
<br />
<br />
<b>Am still looking out for the solution of these 2 major issues with MapBox:</b><br />
<br />
<b>1.) Encrypted Path String:</b><br />
Google Maps SDK has one fantastic API(GMSPath) where they'd just give us the path in a string format (around 10chars, I think). So, basically they have an algorithm working behind the scenes that generates this string based upon the given coordinates of the Polygon(GMSPolygon) object, which is very much helpful when there is a huge coordinates list and any user of the SDK can simply use this encrypted string instead of handling those huge arrays of coordinates, just in case the user is not really cared about the coordinates data but just expects a simple polygon handling mechanism. It works really well and is a very efficient polygon handling approach.<br />
<br />
<b>2.) Overlapping/Crossing Polygons:</b><br />
In FHD, when a user draws multiple overlapping or crossing or inner-circling polygon, then Google Maps polygon(GMSPolygon) simply creates a polygon object by marking with just outer coordinates of all the drawn polygons and it looks like a whole single region drawn, whereas, in MapBox, the Polygon object is not manipulated or moderated but simply drawn on lines of wherever the user drew or wherever the polylines were drawn, it simply looks like a polyline drawn on user's touch path(which we already do), not like a real polygon like in Google Maps - GMSPolygon.<br />
<br />
<br />
I hope you found this as an Interesting read. Please lemme know in the comments below for anything.<br />
<br />
Thanks for your time!</div>
A Passionate Technologists' Journalhttp://www.blogger.com/profile/14721983341617245683noreply@blogger.com0tag:blogger.com,1999:blog-2565897470844400901.post-11568649152560894972018-02-24T23:59:00.000-08:002018-03-25T01:04:00.870-07:00Learning/Notes on Deploying a NodeJS app on Heroku, Amazon-AWS and Docker<div dir="ltr" style="text-align: left;" trbidi="on">
<i><b>Note/</b></i><i><b>Warning:</b> Am not going to go deeper/step-by-step into the deployment process and I'm not going to go deeper into the Pros & Cons by comparing them against each other, as well. </i><br />
<i>I just wanted to share my learnings/difficulties faced in the process of deploying my server app to Heroku, Amazon-AWS & Docker-Cloud.</i><br />
<br />
<span style="color: #0b5394; font-size: large;"><b>Heroku:</b></span><br />
This is very straight-forward where you have different options:<br />
<br />
<a href="https://devcenter.heroku.com/articles/getting-started-with-nodejs#deploy-the-app" target="_blank">Deploying with Git:</a><br />
Just like how you use Git to push code to your Git repo, you can push your Heroku app onto their server using the very similar commands. This is easiest/simplest way to deploy apps on Heroku.<br />
<br />
<a href="https://devcenter.heroku.com/articles/github-integration" target="_blank">GitHub Integration:</a><br />
If your repo is hosted on GitHub, then this is like a piece of cake, you can simply automate your whole deployment process.<br />
<br />
<a href="https://devcenter.heroku.com/articles/dropbox-sync" target="_blank">Dropbox Sync:</a><br />
If you're not hosting your repo for any reason and just saving them into your Dropbox folder, then also you're covered with the Heroku's easiest Deployment process. You can simply connect your Heroku account to the source in your Dropbox folder and it will take care of the deployment for you.<br />
<br />
And there are also several other options as well, but these are the very simplest ones that I found while creating quick prototypes during Hackathons and for other purposes.<br />
Like Steve Jobs says: "It just works!"<br />
<br />
But, there are several debates as to why most of the big-shot guys/companies don't prefer to use it, so probably this might not be the best solution when it comes to deploying your production apps that have the potentiality to take over the world.<br />
<br />
<br />
<span style="color: #0b5394; font-size: large;"><b>Docker Cloud & AWS:</b></span><br />
There are several great <a href="https://www.youtube.com/watch?v=0diH_f0V41o&t=1s&list=PLYV9Uass7pCJaG2CYESTz3jMzmAXD2T7j&index=2" target="_blank">tuts</a> on <a href="https://www.youtube.com/watch?v=rVj3zc30-8E" target="_blank">Youtube</a> to guide you on how to deploy your Node/React JS app onto AWS and also there are some <a href="https://www.youtube.com/watch?v=dmW0Xi4D3WU" target="_blank">good</a> ones to deploy on Docker.<br />
<br />
<b>Deploying on Docker:</b><br />
Docker is basically a container that's OS independent, which means it runs on any given platform. So, presume that your app will work on any given platform.<br />
Just like the Heroku's Git command lines, Docker also provides a similar CLI which is very straight-forward to push your Docker images to the <a href="https://cloud.docker.com/" target="_blank">Docker Cloud</a>.<br />
There is something called as 'Swarm mode', where the Docker cloud will take care of creating instances/clusters for your server, but for some reason it was not working for me(Maybe it had some issues, since I'm using it in its Beta mode), so I turned off the Swarm mode and connected my AWS account using ARN ID(that acts as the API key b/w Docker cloud & AWS) in the Service providers section of the portal and after starting up the EC2 Instance on AWS, the docker image was hosted on the cloud.<br />
<br />
<b>AWS:</b><br />
After launching the AWS Instance, I was just so much puzzled on how & where to access my app hosted onto it.<br />
In the EC2 Instances summary page, you will be presented with a Public DNS address, which looks something like this: "<span style="background-color: white; color: #444444; font-family: "helvetica neue" , "roboto" , "arial" , sans-serif; font-size: 14px; font-weight: 700;">ec2-18-221-199-55.us-east-2.compute.amazonaws.com</span>", this is where your hosted app can be accessed.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-Pp3g2Bg_kpc/WpJlzLH7DjI/AAAAAAABRvc/kfGwlDm7w30KMgBx3as4XxYFrGbWX9PRwCLcBGAs/s1600/AWS%2B-%2BPublic%2BDNS.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="794" data-original-width="1600" height="158" src="https://2.bp.blogspot.com/-Pp3g2Bg_kpc/WpJlzLH7DjI/AAAAAAABRvc/kfGwlDm7w30KMgBx3as4XxYFrGbWX9PRwCLcBGAs/s320/AWS%2B-%2BPublic%2BDNS.png" width="320" /></a></div>
<br />
And, Amazon has this process of network filtering, so you basically have the option to filter out or restrict the request from a certain set of IP addresses or you've to add your IP address from which you're trying to access this URL to connect with your app.<br />
<br />
<br />
<span style="color: #0b5394; font-size: large;"><b>Conclusion:</b></span><br />
This post might look absurd with much lesser information here & there, but I still think that this will help someone who gets started up and just wanted to have a summary and the few tidbits on the difficulties I faced would certainly help someone person like me to get beyond it.<br />
<br />
That's all I had to say. Hope you've got something out of it.<br />
Thanks for your time!<br />
<br /></div>
A Passionate Technologists' Journalhttp://www.blogger.com/profile/14721983341617245683noreply@blogger.com1tag:blogger.com,1999:blog-2565897470844400901.post-11754614395436497132017-07-17T05:08:00.000-07:002017-07-17T05:13:49.022-07:00What’s New in Swift<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: left;">
<span style="font-family: "georgia" , "times new roman" , serif; font-size: small; font-weight: normal;">This article is just a short overview of <a href="https://developer.apple.com/videos/play/wwdc2017/402/" target="_blank">this</a> WWDC session.</span></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<h3 style="text-align: left;">
Here are the few things that were discussed as part of the session:</h3>
</div>
<div>
<br /></div>
<h4 style="text-align: left;">
<span style="font-family: "georgia" , "times new roman" , serif; font-size: small;">1.) Private variables are now accessible to all the extensions of the class in the same file.</span></h4>
<div class="p1">
<span style="font-family: "georgia" , "times new roman" , serif; font-size: small;"><br /></span></div>
<h4 style="text-align: left;">
<span style="font-family: "georgia" , "times new roman" , serif; font-size: small;">2.) Composing a class with any number of protocols.</span></h4>
<div class="p1">
<span style="font-family: "georgia" , "times new roman" , serif; font-size: small;">Example :<span class="Apple-converted-space"> </span></span></div>
<blockquote class="tr_bq">
<div class="p1" style="font-family: Helvetica;">
<span style="color: black; font-family: "georgia" , "times new roman" , serif; font-size: small;"><span class="s1">protocol</span><span class="s2"> Shakeable {</span></span></div>
<div class="p1" style="font-family: Helvetica;">
<span style="font-family: "georgia" , "times new roman" , serif; font-size: small;"><span class="s2"><span class="Apple-converted-space"> </span></span><span class="s1">func</span><span class="s2"> shake()</span></span></div>
<div class="p1" style="font-family: Helvetica;">
<span class="s2"><span style="font-family: "georgia" , "times new roman" , serif; font-size: small;">}</span></span></div>
<div class="p2" style="font-family: Helvetica;">
<span style="font-family: "georgia" , "times new roman" , serif; font-size: small;"><span class="s2"><span style="color: #ba2da2;">extension</span></span><span class="s3" style="color: #4f8187;"> </span><span class="s4">UIButton</span><span class="s3" style="color: #4f8187;">: </span><span class="s5" style="color: #d12f1b;">Shakeable</span><span class="s3" style="color: #4f8187;"> {}</span></span></div>
<div class="p2" style="font-family: Helvetica;">
<span style="font-family: "georgia" , "times new roman" , serif; font-size: small;"><span class="s3" style="color: #4f8187;"><span style="color: #ba2da2;">extension</span> </span><span class="s4">UISlider</span><span class="s3" style="color: #4f8187;">: </span><span class="s5" style="color: #d12f1b;">Shakeable</span><span class="s3" style="color: #4f8187;"> {}</span></span></div>
<div class="p1" style="font-family: Helvetica;">
<span style="color: black; font-family: "georgia" , "times new roman" , serif; font-size: small;"><span class="s1">func</span><span class="s2"> shakeControls(controls: <span style="background-color: yellow;">[</span></span><span style="background-color: yellow;"><span class="s4">UIControl</span><span class="s2"> & </span><span class="s5" style="color: #d12f1b;">Shakeable</span></span><span class="s2"><span style="background-color: yellow;">]</span>) {</span></span></div>
<div class="p1" style="font-family: Helvetica;">
<span style="font-family: "georgia" , "times new roman" , serif; font-size: small;"><span class="s2"><span class="Apple-converted-space"> </span></span><span class="s1">for</span><span class="s2"> control </span><span class="s1">in</span><span class="s2"> controls </span><span class="s1">where</span><span class="s2"> control.state.isEnabled {</span></span></div>
<div class="p1" style="font-family: Helvetica;">
<span class="s2"><span style="font-family: "georgia" , "times new roman" , serif; font-size: small;"><span class="Apple-converted-space"> </span>control.shake()</span></span></div>
<div class="p1" style="font-family: Helvetica;">
<span class="s2"><span style="font-family: "georgia" , "times new roman" , serif; font-size: small;"><span class="Apple-converted-space"> </span>}</span></span></div>
<div class="p2" style="font-family: Helvetica;">
</div>
<div class="p1" style="font-family: Helvetica;">
<span class="s2"><span style="font-family: "georgia" , "times new roman" , serif; font-size: small;">}</span></span></div>
</blockquote>
<div class="p2">
<br /></div>
<h4 style="text-align: left;">
<span style="color: black; font-family: "georgia" , "times new roman" , serif; font-size: small;">3.) Swift Versions:</span></h4>
<div class="p1">
<span style="font-family: "georgia" , "times new roman" , serif; font-size: small;">Swift 4 is source-compatible with Swift3.</span></div>
<div class="p1">
<span style="font-family: "georgia" , "times new roman" , serif; font-size: small;">Swift3.2 introduced that contains most of the Swift4 syntax changes.</span></div>
<div class="p1">
<span style="font-family: "georgia" , "times new roman" , serif; font-size: small;">So, there will be 2 Swift versions in Xcode9: Swift3.2<span class="Apple-converted-space"> </span>& Swift4.</span></div>
<div class="p1">
<span style="font-family: "georgia" , "times new roman" , serif; font-size: small;"><br /></span></div>
<div class="p1">
<span style="font-family: "georgia" , "times new roman" , serif; font-size: small;">The end result is: If you open a Swift 3 project in Xcode9 and build the project with Swift3.2, it should work as it is, i.e., without any code changes.</span></div>
<div class="p1">
<span style="font-family: "georgia" , "times new roman" , serif; font-size: small;">This is mainly to give the developers time to adopt to the new Swift changes, so that the project dependencies can migrate asynchronously.</span></div>
<div class="p2">
<span style="color: black; font-family: "georgia" , "times new roman" , serif; font-size: small;"><br /></span></div>
<h4 style="text-align: left;">
<span style="font-family: "georgia" , "times new roman" , serif; font-size: small;">4.) New faster Build system:</span></h4>
<div class="p1">
<span style="font-family: "georgia" , "times new roman" , serif; font-size: small;">Includes these:</span></div>
<div class="p1">
<span style="font-family: "georgia" , "times new roman" , serif; font-size: small;"><b>(i) </b>The <b>pre-compiled header</b> is the default option for compatibility between Obj-C & Swift classes.</span></div>
<div class="p1">
<span style="font-family: "georgia" , "times new roman" , serif; font-size: small;">The Bridging headers are build each time when a build is run, whereas the Xcode9’s default ‘Pre-Compiled header’ is build only once, which improves the build time for projects that contains huge amount of Legacy Objective-C classes.</span></div>
<div class="p2">
<span style="color: black; font-family: "georgia" , "times new roman" , serif; font-size: small;"><br /></span></div>
<div class="p1">
<span style="font-family: "georgia" , "times new roman" , serif; font-size: small;"><b>(ii) Code Coverage:</b> Xcode8 runs a separate build, where Xcode 9 will use the same last build when you run a test with Code Coverage, which eventually reduces the test execution time.</span></div>
<div class="p2">
<span style="color: black; font-family: "georgia" , "times new roman" , serif; font-size: small;"><br /></span></div>
<div class="p1">
<span style="font-family: "georgia" , "times new roman" , serif; font-size: small;"><b>(iii) </b>Indexing is not a separate background process now, it is done along with the build process that has a small overhead to the build, of course.</span></div>
<div class="p2">
<span style="color: black; font-family: "georgia" , "times new roman" , serif; font-size: small;"><br /></span></div>
<div class="p1">
<span style="font-family: "georgia" , "times new roman" , serif; font-size: small;"><b>(iv) </b>No unused code is build, the compiler just omits it. (It doesn’t mean that we should have unused code in our projects ;) )</span></div>
<div class="p2">
<span style="color: black; font-family: "georgia" , "times new roman" , serif; font-size: small;"><br /></span></div>
<div class="p2">
<span style="color: black; font-family: "georgia" , "times new roman" , serif; font-size: small;"><br /></span></div>
<div class="p2">
<span style="color: black; font-family: "georgia" , "times new roman" , serif; font-size: small;"><b>5.) Strings:</b></span></div>
<div class="p1">
<span style="font-family: "georgia" , "times new roman" , serif; font-size: small;"><b>(i) </b>String collections can be directly manipulated without using the internal ‘characters’ collection.</span></div>
<div class="p1">
<span style="font-family: "georgia" , "times new roman" , serif; font-size: small;"><br /></span></div>
<div class="p1">
<span style="font-family: "georgia" , "times new roman" , serif; font-size: small;">Example:</span></div>
<blockquote class="tr_bq">
<span class="s1" style="font-family: "menlo"; font-size: 11px;">let</span><span class="s2" style="font-family: "menlo"; font-size: 11px;"> values = </span><span class="s3" style="font-family: "menlo"; font-size: 11px;">"one, two, three…"</span></blockquote>
<div class="p1">
<style type="text/css"> p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #d12f1b} span.s1 {font-variant-ligatures: no-common-ligatures; color: #ba2da2} span.s2 {font-variant-ligatures: no-common-ligatures; color: #000000} span.s3 {font-variant-ligatures: no-common-ligatures} </style>
</div>
<div class="p1">
<br /></div>
<div class="p1">
<span style="font-family: "georgia" , "times new roman" , serif; font-size: small;">//To get index after the ‘,’ char from the ‘values’ string</span></div>
<div class="p1">
<span style="font-family: "georgia" , "times new roman" , serif; font-size: small;">Swift 3:</span></div>
<blockquote class="tr_bq">
<div class="p1">
<span class="s1">while</span><span class="s2"> </span><span class="s1">let</span><span class="s2"> comma = </span><span class="s3">values</span><span class="s2">[</span><span class="s3">i</span><span class="s2">..<</span><span class="s3">values</span><span class="s2">.endIndex].index(of: </span><span class="s4">","</span><span class="s2">) {</span></div>
<div class="p1">
<span class="s2"> </span><span class="s1">let</span><span class="s2"> index = </span><span class="s3">values</span><span class="s2">.index(after: comma)</span></div>
<div class="p1">
<span style="font-variant-ligatures: no-common-ligatures;">}</span></div>
<div>
<span style="font-variant-ligatures: no-common-ligatures;"><br /></span></div>
</blockquote>
<div class="p1">
<span style="font-family: "georgia" , "times new roman" , serif; font-size: small;">Swift4:</span></div>
<blockquote class="tr_bq">
<div class="p1">
<span class="s1">while</span><span class="s2"> </span><span class="s1">let</span><span class="s2"> comma = </span><span class="s3">values</span><span class="s2">[</span><span class="s3">i</span><span class="s2">..<</span><span class="s3">values</span><span class="s2">.endIndex].index(of: </span><span class="s4">","</span><span class="s2">) {</span></div>
<div class="p1">
<span class="s2"> </span><span class="s1">let</span><span class="s2"> index1 = </span><span class="s3">values</span><span class="s2">.characters.index(after: comma)</span></div>
<div class="p1">
</div>
<div class="p1">
<span class="s2">}</span></div>
</blockquote>
<div class="p1">
<br /></div>
<div class="p1">
<span style="font-family: "georgia" , "times new roman" , serif; font-size: small;"><b>(ii) </b>String ‘characters’ collection iteration can be iterated without using ‘values.endIndex’ in the below example.</span></div>
<div class="p1">
<span style="font-family: "georgia" , "times new roman" , serif; font-size: small;"><br /></span></div>
<div class="p1">
<span style="font-family: "georgia" , "times new roman" , serif; font-size: small;">Swift 3:</span></div>
<blockquote class="tr_bq">
<div class="p3">
<span style="color: black; font-family: "georgia" , "times new roman" , serif; font-size: small;"><span class="s1">var</span><span class="s2"> i = </span><span class="s3">values</span><span class="s2">.</span><span class="s4">startIndex</span></span></div>
<div class="p4">
<span style="color: black; font-family: "georgia" , "times new roman" , serif; font-size: small;"><span class="s1">while</span><span class="s4"> </span><span class="s1">let</span><span class="s4"> comma = </span><span class="s3">values</span><span class="s4">[</span><span class="s3">i</span><span class="s4">..<</span><span class="s3">values</span><span class="s4">.endIndex].index(of: </span><span class="s5">","</span><span class="s4">) {</span></span></div>
<div class="p4">
<span class="s4"><span style="color: black; font-family: "georgia" , "times new roman" , serif; font-size: small;">}</span></span></div>
<div>
<span class="s4"><span style="color: black; font-family: "georgia" , "times new roman" , serif; font-size: small;"><br /></span></span></div>
</blockquote>
<div class="p1">
<span style="font-family: "georgia" , "times new roman" , serif; font-size: small;">Swift 4:</span></div>
<blockquote class="tr_bq">
<div class="p3">
<span style="color: black; font-family: "georgia" , "times new roman" , serif; font-size: small;"><span class="s1">var</span><span class="s2"> i = </span><span class="s3">values</span><span class="s2">.</span><span class="s4">startIndex</span></span></div>
<div class="p4">
<span style="color: black; font-family: "georgia" , "times new roman" , serif; font-size: small;"><span class="s1">while</span><span class="s4"> </span><span class="s1">let</span><span class="s4"> comma = </span><span class="s3">values</span><span class="s4">[</span><span class="s3">i</span><span class="s4">...].index(of: </span><span class="s5">","</span><span class="s4">) {</span></span></div>
<div class="p4">
<span class="s4"><span style="color: black; font-family: "georgia" , "times new roman" , serif; font-size: small;">}</span></span></div>
<div>
<span class="s4"><span style="color: black; font-family: "georgia" , "times new roman" , serif; font-size: small;"><br /></span></span></div>
</blockquote>
<div class="p1">
<span style="font-family: "georgia" , "times new roman" , serif; font-size: small;"><b>(iii) </b>Substring cannot be used as it is from Swift 4. It needs to be copied before using it further, this is to overcome an issue of memory leak with Substring before Swift4.</span></div>
<div class="p2">
<span style="color: black; font-family: "georgia" , "times new roman" , serif; font-size: small;"><br /></span></div>
<div class="p6">
<span class="s4"><span style="color: black; font-family: "georgia" , "times new roman" , serif; font-size: small;">Example:</span></span></div>
<blockquote class="tr_bq">
<div class="p4">
<span style="color: black; font-family: "georgia" , "times new roman" , serif; font-size: small;"><span class="s1">let</span><span class="s4"> big = downloadHugeString()</span></span></div>
<div class="p4">
<span style="color: black; font-family: "georgia" , "times new roman" , serif; font-size: small;"><span class="s1">let</span><span class="s4"> small = extractTinyString(from: </span><span class="s3">big</span><span class="s4">)</span></span></div>
<div>
<span style="color: black; font-family: "georgia" , "times new roman" , serif; font-size: small;"><span class="s4"><br /></span></span></div>
</blockquote>
<div class="p6">
<span class="s4"><span style="color: black; font-family: "georgia" , "times new roman" , serif; font-size: small;">Swift 3:</span></span></div>
<blockquote class="tr_bq">
<span class="s4">
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #008400}
span.s1 {font-variant-ligatures: no-common-ligatures; color: #000000}
span.s2 {font-variant-ligatures: no-common-ligatures; color: #4f8187}
span.s3 {font-variant-ligatures: no-common-ligatures}
</style>
</span><br />
<div class="p1">
<span class="s4"><span class="s1">myLabel.text = </span><span class="s2">small</span><span class="s1"> </span><span class="s3">// This leads to the memory leak, since the 'big' text is being holded by the internal String classes that does the process of extracting the substring from the given 'big' string.</span></span></div>
<span class="s4">
</span></blockquote>
<div class="p6">
<span style="color: black; font-family: "georgia" , "times new roman" , serif; font-size: small; font-variant-ligatures: no-common-ligatures;">Swift 4:</span></div>
<blockquote class="tr_bq">
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #008400}
span.s1 {font-variant-ligatures: no-common-ligatures; color: #000000}
span.s2 {font-variant-ligatures: no-common-ligatures; color: #703daa}
span.s3 {font-variant-ligatures: no-common-ligatures; color: #4f8187}
span.s4 {font-variant-ligatures: no-common-ligatures}
</style>
<br />
<div class="p1">
<span class="s1">myLabel.text = </span><span class="s2">String</span><span class="s1">(</span><span class="s3">small</span><span class="s1">)</span><span class="s4">//Hence, this is the recommended/only way to use the substring going forward.</span></div>
</blockquote>
<div class="p1">
<span style="font-family: "georgia" , "times new roman" , serif; font-size: small;">This mainly affects huge string operation. Doesn’t majorly have any great effect on the small string manipulations.</span></div>
<div class="p5">
<span style="color: black; font-family: "georgia" , "times new roman" , serif; font-size: small;"><span class="s4"></span><br /></span></div>
<div class="p5">
<span style="color: black; font-family: "georgia" , "times new roman" , serif; font-size: small;"><span class="s4"></span><br /></span></div>
<div class="p5">
<span style="color: black; font-family: "georgia" , "times new roman" , serif; font-size: small;"><span class="s4"></span><br /></span></div>
<div class="p4">
<span class="s4"><span style="color: black; font-family: "georgia" , "times new roman" , serif; font-size: small;"><b>(iv) </b>Multi line strings literals are easier to write now.</span></span></div>
<div class="p7">
<span style="color: black; font-family: "georgia" , "times new roman" , serif; font-size: small;"><span class="s4"></span><br /></span></div>
<div class="p6">
<span class="s4"><span style="color: black; font-family: "georgia" , "times new roman" , serif; font-size: small;">Swift 3:</span></span></div>
<blockquote class="tr_bq">
<span class="s4"></span><br />
<div class="p8">
<span class="s4"><span style="color: black; font-family: "georgia" , "times new roman" , serif; font-size: small;"><span class="s1">let</span><span class="s2"> longString = </span><span class="s4">"Q1: Why does </span><span class="s2">\</span><span class="s4">(</span><span class="s2">name</span><span class="s4">) have </span><span class="s2">\</span><span class="s4">(</span><span class="s2">n</span><span class="s4">) </span><span class="s2">\</span><span class="s4">(</span><span class="s2">characters</span><span class="s4">)'s in their name?\nA: I don't know.Q2: H r u?\nA: I am </span><span class="s2">\</span><span class="s4">(</span><span class="s2">name</span><span class="s4">)"</span></span></span></div>
<span class="s4">
</span></blockquote>
<div class="p8">
<span style="color: black; font-family: "georgia" , "times new roman" , serif; font-size: small; font-variant-ligatures: no-common-ligatures;">Swift 4:</span></div>
<blockquote class="tr_bq">
<div class="p4">
<span style="color: black; font-family: "georgia" , "times new roman" , serif; font-size: small;"><span class="s1">let</span><span class="s4"> longString = </span><span class="s5">""</span><span class="s4">"</span></span></div>
<div class="p4">
<span class="s4"><span style="color: black; font-family: "georgia" , "times new roman" , serif; font-size: small;"><span class="Apple-converted-space"> </span>Q1: Why does \(name) have \(n) \(characters)'s in their name?</span></span></div>
<div class="p4">
<span class="s4"><span style="color: black; font-family: "georgia" , "times new roman" , serif; font-size: small;"><span class="Apple-converted-space"> </span>A: I don't know.</span></span></div>
<div class="p4">
<span class="s4"><span style="color: black; font-family: "georgia" , "times new roman" , serif; font-size: small;"><span class="Apple-converted-space"> </span>Q2: H r u?</span></span></div>
<div class="p4">
<span class="s4"><span style="color: black; font-family: "georgia" , "times new roman" , serif; font-size: small;"><span class="Apple-converted-space"> </span>A: I am \(name)</span></span></div>
<div class="p4">
<span style="color: black; font-family: "georgia" , "times new roman" , serif; font-size: small;"><span class="s4"><span class="Apple-converted-space"> </span></span><span class="s5">""</span><span class="s4">"</span></span></div>
</blockquote>
<div class="p4">
<br /></div>
<style type="text/css"> p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000} p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #ba2da2} span.s1 {font-variant-ligatures: no-common-ligatures; color: #ba2da2} span.s2 {font-variant-ligatures: no-common-ligatures} span.s3 {font-variant-ligatures: no-common-ligatures; color: #000000} span.s4 {font-variant-ligatures: no-common-ligatures; color: #703daa} span.s5 {font-variant-ligatures: no-common-ligatures; color: #4f8187} </style><style type="text/css"> p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000} span.s1 {font-variant-ligatures: no-common-ligatures; color: #ba2da2} span.s2 {font-variant-ligatures: no-common-ligatures} span.s3 {font-variant-ligatures: no-common-ligatures; color: #4f8187} span.s4 {font-variant-ligatures: no-common-ligatures; color: #d12f1b} </style><style type="text/css"> p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000} span.s1 {font-variant-ligatures: no-common-ligatures; color: #ba2da2} span.s2 {font-variant-ligatures: no-common-ligatures} span.s3 {font-variant-ligatures: no-common-ligatures; color: #4f8187} span.s4 {font-variant-ligatures: no-common-ligatures; color: #d12f1b} </style><style type="text/css"> p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica} p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px} p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #703daa} p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000} p.p5 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; min-height: 13.0px} p.p6 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #008400} p.p7 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #008400; min-height: 13.0px} p.p8 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #d12f1b} span.s1 {font-variant-ligatures: no-common-ligatures; color: #ba2da2} span.s2 {font-variant-ligatures: no-common-ligatures; color: #000000} span.s3 {font-variant-ligatures: no-common-ligatures; color: #4f8187} span.s4 {font-variant-ligatures: no-common-ligatures} span.s5 {font-variant-ligatures: no-common-ligatures; color: #d12f1b} span.s6 {font-variant-ligatures: no-common-ligatures; color: #703daa} </style></div>
A Passionate Technologists' Journalhttp://www.blogger.com/profile/14721983341617245683noreply@blogger.com0tag:blogger.com,1999:blog-2565897470844400901.post-78006979291002360582017-06-24T11:15:00.000-07:002017-06-25T00:50:45.338-07:00My MOOC course on FRP<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="font-family: HelveticaNeue; font-size: 12px;">
<div>
Hey Guys,</div>
<div>
<br /></div>
<div>
Recently the Functional Reactive Programming(FRP) is getting a lot of traction, hence i started doing it and ended up getting addicted to it so much that Now i’m unable to go back and do the imperative programming at all.</div>
<div>
<br /></div>
<div>
<div>
So i ended up creating a MOOC course on it, because i saw none of the course on this topic at all.</div>
<div>
Also, i’ve made sure to cover the best practices (Like VIPER, TDD, POP) followed in the industry to have an added bonus for those who enrol into this course.</div>
<div>
I’m pretty sure that it will help many people to adopt this awe-somatic way of writing the code.</div>
<div>
<br /></div>
<div>
Here’s the <a href="https://www.udemy.com/learn-functional-reactive-programming-and-viper-with-swift3/" target="_blank">link</a> to my course. </div>
<div>
For those who prefer to enrol, i can provide offer codes to take it up for a better/lesser price.</div>
</div>
<div>
<span style="font-family: "helveticaneue";">I would basically like to trade it off for a rating/review on Udemy’s course page.</span><br />
<span style="font-family: "helveticaneue";"><br /></span></div>
<div>
I hope that you’d also share it with your friends and everyone around. Please get the word out. Even if they’re new to iOS programming, i’m pretty sure that it will help them grasp the knowledge on FRP, which i think is the future of programming.</div>
</div>
<div style="font-family: HelveticaNeue; font-size: 12px;">
<br /></div>
<div style="font-family: HelveticaNeue; font-size: 12px;">
Critics are very welcome!<br />
<span style="font-family: HelveticaNeue;"><br /></span>
<span style="font-family: HelveticaNeue;">Thank you for your valuable time!</span></div>
<div style="font-family: HelveticaNeue; font-size: 12px;">
<br /></div>
<div style="font-family: HelveticaNeue; font-size: 12px;">
See you! Bye, until next time! Have Fun!</div>
</div>
A Passionate Technologists' Journalhttp://www.blogger.com/profile/14721983341617245683noreply@blogger.com0tag:blogger.com,1999:blog-2565897470844400901.post-36209817228488085462017-06-08T16:29:00.001-07:002017-06-08T16:31:29.760-07:00WWDC 2017 Updates<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="color: #454545; font-family: UICTFontTextStyleBody; font-size: 16px; text-decoration: -webkit-letterpress;">
<div>
Todays WWDC 2017 has started with the message for developers “Keep making apps, the world is depending on you”.</div>
<div>
<div>
<br /></div>
<div>
<b><u>Some of keynotes:</u></b></div>
<div>
<br /></div>
<div>
<b>Mac:</b></div>
<div>
1. High Sierra macOS releases.</div>
<div>
2. Safari improvement - 80% faster than chrome now.</div>
<div>
3. Split screen support.</div>
<div>
4. Machine Learning in Chrome</div>
<div>
5. Apple File System for Mac</div>
<div>
6. Metal2 improves graphics potential more. 80% graphics speed improved.</div>
<div>
7. Metal support VR</div>
<div>
<br /></div>
<div>
<b>Watch:</b></div>
<div>
1. watch OS4 releases.</div>
<div>
2. Play music while workout.</div>
<div>
3. Siri based new watch faces.</div>
<div>
<br /></div>
<div>
<b>iOS:</b></div>
<div>
1. iOS 11 releases.</div>
<div>
2. Message app - end to end encryption. iCloud Sync (Synced across all iOS devices)</div>
<div>
3. Apple pay - Person to person easy transaction. (Free with Debit card ; 3% charge on Credit Card transactions)</div>
<div>
4. Machine Learning in Siri, it understands the context and your interests too.</div>
<div>
5. Multi Language Translation support.</div>
<div>
6. Loop/Bounce effects on Photos. </div>
<div>
7. Spot light search on handwritten text - Notes app.</div>
<div>
8. Virtual object placements on Live photo.</div>
<div>
9. Core ML - Machine Learning Kit.</div>
<div>
10. Image recognition improves 6x faster than Google pixel.</div>
<div>
11. Maps inside Malls.</div>
<div>
12. Do not disturb while driving.</div>
<div>
13. Provided AR Kit for development. Becomes world largest AR platform.</div>
<div>
<br /></div>
<div>
<b>iPad pro:</b></div>
<div>
1. sizes 10.5” and 12.9”.</div>
<div>
2. Camera 12Mp rear and 7Mp front.</div>
<div>
3. 40% graphics performance improved. A10x fusion 6 core processor.</div>
<div>
4. Drag drop files/datas among multiple apps.</div>
<div>
5. Apple pencil is hugely promoted.</div>
<div>
6. File management application, integrates other 3rd party FS services too.</div>
<div>
<br /></div>
<div>
<b>tvOS:</b></div>
<div>
1. Amazon prime is joining Apple.</div>
<div>
<br /></div>
<div>
<b>HomePod:</b></div>
<div>
1. Home kit enabled siri support.</div>
<div>
2. Inbuild speakers/woofers/A8 processor chip.</div>
</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
# Xcode 9 with Swift 4 released. </div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<b>Other Features: </b></div>
<div>
Photos App support GIF</div>
<div>
Automatically send WIFI passwords to nearby devices. </div>
<div>
One Hand keyboard support, which will move the keyboard keys to the left/right with less spacing b/w keys)</div>
<div>
Airplay 2 - Multi room audio & shared playlists. </div>
<div>
Music App: Its a social network now. Find people & playlists. </div>
<div>
Leaves behind iPhone 5, iPhone 5c, 4th gen iPad by dropping support for 32-bit apps. </div>
<div>
iOS removed native Social networks(fb, twitter, Vimeo, Flickr) integrations. </div>
<div>
Auto fill passwords for Apps, just like it is in Safari. </div>
<div>
<br /></div>
</div>
</div>
A Passionate Technologists' Journalhttp://www.blogger.com/profile/14721983341617245683noreply@blogger.com0tag:blogger.com,1999:blog-2565897470844400901.post-74839047240191963162017-04-17T11:54:00.000-07:002017-04-17T11:54:21.775-07:00Memory Management in Objective-C<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="margin-bottom: 0cm; text-align: center;">
<i style="font-family: Tahoma, sans-serif; text-align: left;">Note: This article was written a very long back in the period of Xcode 6.</i></div>
<div style="margin-bottom: 0cm;">
<br /></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">Any
application that runs on a device needs some sort of space in
memory(RAM) during runtime in order to store any necessary data to be
displayed or handled in the app. Any program that runs on the device
needs to manage their memory based on the system resources(RAM
Memory) by controlling or managing the lifetime of all the objects
created for the app. </span></span>
</div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">iOS
Applications does this through a process called 'Object Life Cycle
Management' Or Otherwise called as 'Object Ownership'. </span></span>
</div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">This
Ownership scheme is handled through a 'Reference Counting' mechanism,
which uses a tracking mechanism internally to detect the number of
owners for each object.</span></span></div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><u><b>Reference
Counting Rules:</b></u></span></span></div>
<ul>
<li><div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">Reference
Count = 1, when an object is created and the Creator is the owner
here.</span></span></div>
</li>
<li><div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">Reference
Count +1, whenever a new owner is added.</span></span></div>
</li>
<li><div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">Reference
Count -1, whenever an owner releases its reference.</span></span></div>
</li>
<li><div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">When
Reference Count == 0, then the object is destroyed by automatically
calling the dealloc() method. You never have to call the dealloc()
manually, calling release on an object does it automatically.</span></span></div>
<div style="margin-bottom: 0cm;">
</div>
</li>
</ul>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">Memory
Management in Objective C is basically defined as “<i>the process
of allocating memory during your program’s runtime, using it, and
freeing it when you are done with it</i>”.</span></span></div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i><b>There
are 2 ways to accomplish it:</b></i></span></span></div>
<ul>
<li><div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">MRR
(<i>Manual Retain Release</i>)</span></span></div>
</li>
<li><div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">ARC
(<i>Automatic Reference Count</i>)</span></span></div>
</li>
</ul>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><u><b>MRR
(<i>Manual Retain Release</i>):</b></u></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><b>iOS
Version:</b> iOS 4.3 and below</span></span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><b>Xcode
Version:</b> 4</span></span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">Using
this method you can explicitly manage your memory by keeping track of
all the objects you own using the Reference Counting mechanism.</span></span></div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><u><b><span style="font-style: normal;">ARC</span><i>
(Automatic Reference Count):</i></b></u></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><b>iOS
Version:</b> iOS 5 and above</span></span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><b>Xcode
Version:</b> 4.2</span></span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">This
method also uses the Reference Counting mechanism, but does it
automatically by inserting the memory management method calls on
behalf of you at the compile time. Thus, ARC uses MRR behind the bars
and handles the dirty stuff of managing the memory for you.</span></span></div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">So,
before iOS5 was introduced, developers used MRR to manually manage
their memory to use the system resources efficiently.</span></span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">Even
after iOS5 and Xcode4.2, Apple provided its developers with the
ability to use the MRR method by setting a Boolean value in Build
Configuration of the project to “Objective C Automatic Reference
Counting”. Hence setting it to Yes means, the app uses ARC and NO
means, the app uses MRR method.</span></span></div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">This
is a screenshot of how to set the variable of Memory Management
method in Xcode6:</span></span></div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<img src="webkit-fake-url://ba752ccf-497a-489f-a8f5-53b8bf19b9a7/image.tiff" />
</div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">Let's
take a look at the MRR method.</span></span></div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: large;"><u><b>MRR
(<i>Manual Retain Release</i>):</b></u></span></span></div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">In
Manual Retain Release method, it is completely your own
responsibility to claim and relinquish the ownership of any object
you create in your program, which can be done by the following memory
management methods:</span></span></div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<table border="1" bordercolor="#000000" cellpadding="4" cellspacing="0" style="width: 100%px;">
<colgroup><col width="73*"></col>
<col width="183*"></col>
</colgroup><tbody>
<tr valign="TOP">
<td width="28%">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><b>Method</b></span></span><br />
</td>
<td width="72%">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><b>Behaviour</b></span></span><br />
</td>
</tr>
<tr valign="TOP">
<td width="28%">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">Alloc</span></span><br />
</td>
<td width="72%">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">Creates
an object and claims ownership of it.</span></span><br />
</td>
</tr>
<tr valign="TOP">
<td width="28%">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">Retain</span></span><br />
</td>
<td width="72%">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">Claims
ownership of an already existing object.</span></span><br />
</td>
</tr>
<tr valign="TOP">
<td width="28%">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">Copy</span></span><br />
</td>
<td width="72%">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">Copies
an object and claims ownership.</span></span><br />
</td>
</tr>
<tr valign="TOP">
<td width="28%">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">Assign</span></span><br />
</td>
<td width="72%">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">Assigns
an object without owning it.</span></span><br />
</td>
</tr>
<tr valign="TOP">
<td width="28%">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">Release</span></span><br />
</td>
<td width="72%">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">Relinquish
ownership of it and destroys it immediately.</span></span><br />
</td>
</tr>
<tr valign="TOP">
<td width="28%">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">Autorelease</span></span><br />
</td>
<td width="72%">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">Does
same as Release, but postpones it after its use.</span></span><br />
</td>
</tr>
</tbody></table>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">In
Objective C, an object is Created or Initialised as follows:</span></span></div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="font-weight: normal; margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>NSString
*string = [[NSString alloc] initWithFormat:@”String Variable
holding content”];</i></span></span></div>
<div style="font-weight: normal; margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">When
an object is initialised with any memory management methods(alloc,
copy, retain), it is not just created but it's Reference Count is
also increased by 1.</span></span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">Thus,
the above 'string' object now has a Reference Count of 1.</span></span></div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">Now,
if the same object is retained as follows:</span></span></div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="font-weight: normal; margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>[string
retain];</i></span></span></div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">Now,
the Reference Count is increased to 2.</span></span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">Thus,
it needs to be released twice to destroy the 'string' object
completely from the memory, which could be done as follows:</span></span></div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="font-weight: normal; margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>[string
release];</i></span></span></div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">The
basic idea behind the MRR method is that, you need to balance between
the memory allocation and deallocation methods in order to free up
the memory.</span></span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">Suppose,
if you forget to deallocate the object, then the object remains there
until your application quits, thus it means there is a “Memory
Leak”. It wont have any severe effect, if the object occupies tiny
space, but if your program keeps on doing this spontaneously, then
the system may run out of memory and your application might crash.</span></span></div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">Also,
if you try to release an object too many times, which is called as
“Dangling Pointer”, means the pointer of an object refers to an
invalid memory address, since the object is already deallocated thus
freeing up from the memory. This situation means that your program
will most likely crash.</span></span></div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">Let's
have a look at an example:</span></span></div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="font-weight: normal; margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>{</i></span></span></div>
<div style="font-weight: normal; margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>Person
*aPerson = [[ Person alloc] init];</i></span></span></div>
<div style="font-weight: normal; margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>//
...</i></span></span></div>
<div style="font-weight: normal; margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>NSString
*name = aPerson.name;</i></span></span></div>
<div style="font-weight: normal; margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>//
...</i></span></span></div>
<div style="font-weight: normal; margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>[aPerson
release]</i></span></span></div>
<div style="font-weight: normal; margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>}</i></span></span></div>
<div style="font-weight: normal; margin-bottom: 0cm; margin-left: 1.25cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">Here,
since we create an object for Person model/class, we take ownership
of it, hence we deallocate/release it after its use. Whereas, we
don't take ownership of the string object, hence we don't release it.</span></span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">When
you don't release 'aPerson' object, then it creates a memory leak,
which could be detected by using the tools provided within Xcode.
Just tap on Product --> Analyze, you will be pointed to the exact
line of code of where it causes the leak.</span></span></div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><u><b>dealloc()
Method:</b></u></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">When
we release an object, <i>dealloc()</i> method is called and thus we
can release the instance variables of any custom classes as follows:</span></span></div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>@interface
Person : NSObject</i></span></span></div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>@property (retain)
NSString *name;</i></span></span></div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>@property (retain)
NSString *age;</i></span></span></div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>@end</i></span></span></div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<br />
</div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>@implementation
Person</i></span></span></div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>- (void)dealloc</i></span></span></div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>{</i></span></span></div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>[_name release];</i></span></span></div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>[_age release];</i></span></span></div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>[super dealloc];</i></span></span></div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>}</i></span></span></div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>@end</i></span></span></div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>dealloc()</i>
method releases and frees up the memory of those instance variables.</span></span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">Also,
you need to call the dealloc method of the super class.</span></span></div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">Explaining
Assign:</span></span></div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">Let's
have a look at the following example:</span></span></div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">We
have two models:</span></span></div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>//
Car.h</i></span></span></div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>#import
<foundation oundation.h=""></foundation></i></span></span></div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>#import
"Person.h"</i></span></span></div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>@interface
Car : NSObject</i></span></span></div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<br />
</div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>@property
(nonatomic) NSString *model;</i></span></span></div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>@property
(nonatomic, retain) Person *driver;</i></span></span></div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<br />
</div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>@end</i></span></span></div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<br />
</div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<br />
</div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<br />
</div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>//
Person.h</i></span></span></div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>#import
<foundation oundation.h=""></foundation></i></span></span></div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<br />
</div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>@class
Car;</i></span></span></div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<br />
</div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>@interface
Person : NSObject</i></span></span></div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<br />
</div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>@property
(nonatomic) NSString *name;</i></span></span></div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>@property
(nonatomic, retain) Car *car;</i></span></span></div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<br />
</div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>@end</i></span></span></div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="font-style: normal; margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">@class
Car, says the compiler that there is a class called Car that already
exists, thus it wont keep importing the class again & again,
since we have already imported Person class in Car.</span></span></div>
<div style="font-style: normal; margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="font-style: normal; margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">In
the main.m class:</span></span></div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>//
main.m</i></span></span></div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>#import
<foundation oundation.h=""></foundation></i></span></span></div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>#import
"Car.h"</i></span></span></div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>#import
"Person.h"</i></span></span></div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<br />
</div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>int
main(int argc, const char * argv[]) {</i></span></span></div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>@autoreleasepool {</i></span></span></div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>Person *john =
[[Person alloc] init];</i></span></span></div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>john.name =
@"John";</i></span></span></div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
</div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>Car *honda =
[[Car alloc] init];</i></span></span></div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>honda.model =
@"Honda Civic";</i></span></span></div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>honda.driver =
john;</i></span></span></div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
</div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>NSLog(@"%@
is driving the %@", honda.driver, honda.model);</i></span></span></div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>}</i></span></span></div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>return 0;</i></span></span></div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>}</i></span></span></div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">This
says that i have initialised a Person object and assgined it to the
driver of the Car object, which means Car object holds an ownership
of Person object.</span></span></div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">Now,
add this line:</span></span></div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>john.car
= honda;</i></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">after
this line:</span></span></div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>honda.driver
= john;</i></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">in
main.m class, which means that the Person object also owns the Car
object, which means that both the objects owns each other and the
memory management system wont be able to destroy them even if they
are no longer needed. This is called as the “Retain Cycle”, which
is a bad memory leak.</span></span></div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">Fortunately,
it is also easy to fix by just setting a weak reference to any of the
properties holding back the other object.</span></span></div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">So,
now let's do it for the Car object in Person class as follows:</span></span></div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><i>@property
(nonatomic, weak) Car *car;</i></span></span></div>
<div style="margin-bottom: 0cm; margin-left: 1.25cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">Now,
the Person object has a non-owing relationship to the Car object.</span></span></div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">Thus,
the basic idea behind the bar is that No 2 objects must have retained
relationship when they are linked to each other, thus avoiding the
Retain Cycle.</span></span></div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="font-style: normal; margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: large;"><u><b>ARC
(<i>Automatic Reference Count</i>):</b></u></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">ARC
introduces new @property attributes. You should use strong in case of
retain and weak in case of assign.</span></span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">You
don't have to keep/maintain the Reference Count of any objects, and
all the memory management methods are inserted into the code during
the compile time on your behalf.</span></span></div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="font-style: normal; margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;"><u><b>dealloc()
method:</b></u></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">You
don't need to release the instance variables and call the super
class's dealloc() method as we did in MRR method, which is
automatically done for you by ARC.</span></span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">That
means there is no need for you to include the dealloc() method in the
class at all.</span></span></div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="font-style: normal; margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: large;"><u><b>Summary:</b></u></span></span></div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">To
develop modern applications, developers must choose ARC to leave the
headache of Memory Management to the system and thus focus on the app
features in order to get the best out of it.</span></span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Tahoma, sans-serif;"><span style="font-size: small;">ARC
handles all the memory management stuff except that you have to play
carefully with the Retain Cycles.</span></span></div>
<div align="CENTER" style="margin-bottom: 0cm;">
</div>
<div style="margin-bottom: 0cm;">
<br />
</div>
</div>
A Passionate Technologists' Journalhttp://www.blogger.com/profile/14721983341617245683noreply@blogger.com0tag:blogger.com,1999:blog-2565897470844400901.post-9296585669149778032017-04-16T09:08:00.001-07:002017-04-16T09:14:38.550-07:00Linking my Imaginea profile here<div dir="ltr" style="text-align: left;" trbidi="on">
My <a href="https://blog.imaginea.com/author/saravanan-vijayakumar-vijayakumar/" target="_blank">profile</a> on the Imaginea blogger has the following posts which are based upon the libraries that i developed for the Fontli app:<br />
<br />
<a href="https://blog.imaginea.com/sparkbutton-for-fontli/" target="_blank">SparkButton</a><br />
<a href="https://blog.imaginea.com/plainloaderview/" target="_blank">PlainLoaderView</a><br />
<br />
<br /></div>
A Passionate Technologists' Journalhttp://www.blogger.com/profile/14721983341617245683noreply@blogger.com0tag:blogger.com,1999:blog-2565897470844400901.post-58945342675361007582016-11-17T01:43:00.003-08:002016-11-17T01:51:23.119-08:00Swift 3 Updates<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="font-family: "verdana" , sans-serif;">Hey there,</span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;">I just went through the list changes in Swift3 and i'll log an abstract of those changes here.</span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<br />
<div>
<span style="font-family: "verdana" , sans-serif;"><b>1.) First parameter label: </b>Now, all the function params have labels.</span></div>
<div>
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div>
<b><span style="font-family: "verdana" , sans-serif;">2.) Omitted needless words:</span></b></div>
<div>
<span style="font-family: "verdana" , sans-serif;">Some Examples from <u>Swift2</u> -> <u>Swift3</u>:</span></div>
<div>
<ul style="text-align: left;">
<li><span style="font-family: "verdana" , sans-serif;">UIColor.blueColor() -> UIColor.blue,</span></li>
<li><span style="font-family: "verdana" , sans-serif;">numbers.minElement() -> numbers.min(),</span></li>
<li><span style="font-family: "verdana" , sans-serif;">"Hi there".lowercaseString -> "Hi there".lowercased,</span></li>
<li><span style="font-family: "verdana" , sans-serif;">Similarly 'uppercased' for 'uppercaseString'</span></li>
</ul>
</div>
<div>
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "verdana" , sans-serif;"><b>3</b><b>.) </b><b>UpperCamelCase has been replaced with lowerCamelCase for enums and properties:</b></span></div>
<div>
<ul style="text-align: left;">
<li><span style="font-family: "verdana" , sans-serif;">NSURLRequest(URL: someURL) -> URLRequest(url: someURL)</span></li>
<li><span style="font-family: "verdana" , sans-serif;">NSTextAlignment.Left -> NSTextAlignment.left</span></li>
<li><span style="font-family: "verdana" , sans-serif;">UIInterfaceOrientationMask.Portrait -> UIInterfaceOrientationMask.portrait</span></li>
</ul>
</div>
<div>
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div>
<div style="font-size: 16px; line-height: normal;">
<span style="font-family: "verdana" , sans-serif;"><span style="font-kerning: none;"><b>4</b></span><b>.) </b><b>GCD and CoreGraphics API's are changed from C style to Swift:</b></span></div>
<div style="font-size: 16px; line-height: normal; min-height: 19px;">
<span style="font-family: "verdana" , sans-serif;"><span style="font-kerning: none;"><b></b></span><br /></span></div>
<div style="font-size: 16px; line-height: normal;">
<span style="font-kerning: none;"><b><span style="font-family: "verdana" , sans-serif;"><u>GCD:</u></span></b></span></div>
<div style="font-size: 16px; line-height: normal;">
<span style="font-kerning: none;"><u><span style="font-family: "verdana" , sans-serif;">In Swift2:</span></u></span></div>
<div style="font-size: 16px; line-height: normal;">
<span style="font-kerning: none;"><span style="font-family: "verdana" , sans-serif;">"dispatch_after(dispatch_time, dispatch_get_main-queue(), {})"</span></span></div>
<div style="font-size: 16px; line-height: normal; min-height: 19px;">
<span style="font-family: "verdana" , sans-serif;"><span style="font-kerning: none;"></span><br /></span></div>
<div style="font-size: 16px; line-height: normal;">
<span style="font-kerning: none;"><u><span style="font-family: "verdana" , sans-serif;">In Swift3:</span></u></span></div>
<div style="font-size: 16px; line-height: normal;">
<span style="font-kerning: none;"><span style="font-family: "verdana" , sans-serif;">"DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {}"</span></span></div>
<div style="font-size: 16px; line-height: normal; min-height: 19px;">
<span style="font-family: "verdana" , sans-serif;"><span style="font-kerning: none;"></span><br /></span></div>
<div style="font-size: 16px; line-height: normal;">
<span style="font-kerning: none;"><b><span style="font-family: "verdana" , sans-serif;"><u>CoreGraphics:</u></span></b></span></div>
<div style="font-size: 16px; line-height: normal;">
<span style="font-kerning: none;"><u><span style="font-family: "verdana" , sans-serif;">In Swift2:</span></u></span></div>
<div style="font-size: 16px; line-height: normal;">
<span style="font-kerning: none;"><span style="font-family: "verdana" , sans-serif;">guard let context: CGContext = UIGraphicsGetCurrentContext() else { return }</span></span></div>
<div style="font-size: 16px; line-height: normal;">
<span style="font-kerning: none;"><span style="font-family: "verdana" , sans-serif;">CGContextSetStrokeColorWithColor(context, UIColor.redColor().CGColor)</span></span></div>
<div style="font-size: 16px; line-height: normal;">
<span style="font-kerning: none;"><span style="font-family: "verdana" , sans-serif;">CGContextSetLineWidth(context, 2)</span></span></div>
<div style="font-size: 16px; line-height: normal;">
<span style="font-kerning: none;"><span style="font-family: "verdana" , sans-serif;">CGContextDrawPath(context, .Stroke)</span></span></div>
<div style="font-size: 16px; line-height: normal;">
<span style="font-kerning: none;"><span style="font-family: "verdana" , sans-serif;"><br /></span></span></div>
<div style="font-size: 16px; line-height: normal;">
<span style="font-kerning: none;"><u><span style="font-family: "verdana" , sans-serif;">In Swift3:</span></u></span></div>
<div style="font-size: 16px; line-height: normal;">
<span style="font-kerning: none;"><span style="font-family: "verdana" , sans-serif;">guard let context: CGContext = UIGraphicsGetCurrentContext() else { return }</span></span></div>
<div style="font-size: 16px; line-height: normal;">
<span style="font-kerning: none;"><span style="font-family: "verdana" , sans-serif;">context.strokeColor = UIColor.red().cgColor</span></span></div>
<div style="font-size: 16px; line-height: normal;">
<span style="font-kerning: none;"><span style="font-family: "verdana" , sans-serif;">context.lineWidth = 2</span></span></div>
<div style="font-size: 16px; line-height: normal;">
<span style="font-kerning: none;"><span style="font-family: "verdana" , sans-serif;">context.drawPath(mode: .Stroke)</span></span></div>
<div style="font-size: 16px; line-height: normal;">
<span style="font-kerning: none;"><span style="font-family: "verdana" , sans-serif;"><br /></span></span></div>
<div style="font-size: 16px; line-height: normal;">
<span style="font-kerning: none;"><span style="font-family: "verdana" , sans-serif;"><br /></span></span></div>
</div>
<div>
<span style="font-family: "verdana" , sans-serif;"><b>5</b><b>.) </b><b>Avoid calling with class names:</b> </span></div>
<div>
<span style="font-family: "verdana" , sans-serif;"><i>'Self'</i> to call class methods & <i>'self'</i> to call instance methods. (Previously we'd to use class name to call class methods)</span></div>
<div>
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div>
<pre class="swift" style="background-position: 0px 0px; border: none; clear: none; line-height: 1.333; outline: 0px; overflow: visible; padding: 0px; vertical-align: baseline; width: auto; word-wrap: break-word;"><span style="background-color: rgba(255, 255, 255, 0); font-style: inherit; white-space: normal;"><b><span style="font-family: "verdana" , sans-serif;">6.) Class prefixes removed:</span></b></span></pre>
<pre class="swift" style="background-position: 0px 0px; border: none; clear: none; line-height: 1.333; outline: 0px; overflow: visible; padding: 0px; vertical-align: baseline; width: auto; word-wrap: break-word;"><span style="font-family: "verdana" , sans-serif;"><span style="background-color: rgba(255, 255, 255, 0); white-space: normal;"><span style="border: 0px; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">NS removed from Timer, UserDefaults, FileManager, Data, Date, </span></span><span style="background-color: rgba(255, 255, 255, 0); font-style: inherit; white-space: normal;">Calendar, URL, URLRequest, UUID, NotificationCenter and more</span></span></pre>
<pre class="swift" style="background-position: 0px 0px; border: none; clear: none; line-height: 1.333; outline: 0px; overflow: visible; padding: 0px; vertical-align: baseline; width: auto; word-wrap: break-word;"><span style="background-color: rgba(255, 255, 255, 0); white-space: normal;"><span style="border: 0px; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"><span style="font-family: "verdana" , sans-serif;">
</span></span></span></pre>
<pre class="swift" style="background-position: 0px 0px; border: none; clear: none; line-height: 1.333; outline: 0px; overflow: visible; padding: 0px; vertical-align: baseline; width: auto; word-wrap: break-word;"><span style="font-family: "verdana" , sans-serif;"><span style="background-color: rgba(255, 255, 255, 0); white-space: normal;"><span style="border: 0px; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"><b>7.</b></span></span><b style="background-color: rgba(255, 255, 255, 0); font-style: inherit; white-space: normal;">) </b><b style="background-color: rgba(255, 255, 255, 0); font-style: inherit; white-space: normal;">Swift Package Manager:</b><span style="background-color: rgba(255, 255, 255, 0); font-style: inherit; white-space: normal;"> Official dependency manager</span></span></pre>
<pre class="swift" style="background-position: 0px 0px; border: none; clear: none; line-height: 1.333; outline: 0px; overflow: visible; padding: 0px; vertical-align: baseline; width: auto; word-wrap: break-word;"><span style="background-color: rgba(255, 255, 255, 0); white-space: normal;"><span style="border: 0px; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"><span style="font-family: "verdana" , sans-serif;">
</span></span></span></pre>
<pre><div>
<b><span style="font-family: "verdana" , sans-serif;">8.) Inline Sequences:</span></b></div>
<span style="font-family: "verdana" , sans-serif;"><u>In Swift2:</u>
sequence(first: someView, next: { $0.superview }) {
// someView, someView.superview, someView.superview.superview,...
}
<u>In Swift3:</u>
for x in sequence(first: 0.1, next: { $0 * 2 })
.prefix(while: { $0 < 4 })
{
// 0.1, 0.2, 0.4, 0.8, 1.6, 3.2
}</span></pre>
</div>
</div>
A Passionate Technologists' Journalhttp://www.blogger.com/profile/14721983341617245683noreply@blogger.com0tag:blogger.com,1999:blog-2565897470844400901.post-84445577606543118752016-11-06T10:23:00.000-08:002016-11-17T05:53:27.080-08:00Hybrid Mobile App Filepath Case-Sensitive Issue<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-decoration: -webkit-letterpress;">
<div>
<span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">I have been yearning to learn Hybrid App Development for a very long time. To get started, i wanted to be good at fundamentals in 20+years old web technology - HTML/CSS/JS. Hence, i did <a href="https://www.coursera.org/learn/html-css-javascript-for-web-developers/" target="_blank">this course</a> in Coursera first and then did a round of R&D for the Hybrid frameworks and decided to start with Ionic, as i found Ionic framework to be the best in the industry as far as i know. Hence, did <a href="https://www.udemy.com/ionic-by-example/" target="_blank">this Ionic course</a> in Udemy, which is good starter for programmers. </span></div>
<div>
<span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">Enough of my story. </span><br />
<div>
<span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">Jumping into the context; After finishing up the course(not really finished, just watched the On-Demand videos as usual), i tried to create an app during which i faced an issue which was very weird, i.e., everything was working fine on the browser, but it wasn't working on the actual mobile devices, both iOS & Android, which were supposed to be the target devices. </span></div>
</div>
<div>
<span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">First, the catch i made was that the issue was consistent on both (iOS&Android) these devices, so definitely its not an OS specific issue. </span></div>
<div>
<span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">Next, i tried to print logs around all the code where the issue was producing and found that one <a href="https://github.com/davidmerfield/randomColor" target="_blank">specific library(randomColor.js)</a> was the cause of the issue, which was added at last (as far as i remembered), so i put logs around the code used in my JS file which were printed in the device console and noticed that none of my code written after that library's code was getting executed. </span></div>
<div>
<span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">To confirm that the randomColor.js is the cause, i just commented out all the library related code from my JS file & everything was working fine on all the devices, so the culprit was that library. Now, i wanted to find out if the issue was in my code or in the lib code. I saw that the lib had hundreds of stars & active contributors, so there's less chance of having any such critical issue left out in the prod version. </span></div>
<div>
<span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">So, finally, i decided to check the lib integration process from the start again & found out that a very minor mistake i did was the ROOT Cause of this major issue. </span></div>
<div>
<span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">The issue was that there was a case-sensitive file name typo i made in the import statement in my "index.html" file. </span></div>
<div>
<span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">This was the path of "randomColor.js" file in my project:</span></div>
<div>
<i style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">"Lib/randomcolor/randomColor.js"</i></div>
<div>
<span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">But, i imported this lib in "index.html", like this:</span></div>
<div>
<i style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">"Lib/random<b>C</b>olor/randomColor.js"</i></div>
<div>
<span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);"><br /></span></div>
<div>
<span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">Did you notice?</span></div>
<div>
<span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">Yes, that Su**ing CAPITAL 'C' (Have marked in Bold above) was the culprit. </span></div>
<div>
<span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);"><br /></span></div>
<div>
<span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">Since, <b>browsers does <i>case-insensitive</i> search for JS file</b>s, whereas both the <b>native mobile platforms does <i>case-sensitive</i> file search</b>, hence i was faced with the issue after integrating "randomColor.js" with typo in file import code. </span></div>
<div>
<span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);"><br /></span></div>
<div>
<span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">It might not be a very big issue, but it wasted a lot of my time, hence thought of logging it here, thus hoping to save someone else time with this crap. </span></div>
<div>
<span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);"><br /></span></div>
<div>
<span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">Thanks for taking out your time to read my stuff. 😊</span></div>
</div>
</div>
A Passionate Technologists' Journalhttp://www.blogger.com/profile/14721983341617245683noreply@blogger.com0tag:blogger.com,1999:blog-2565897470844400901.post-86511835554761472862016-06-13T23:55:00.002-07:002016-06-14T23:42:05.305-07:00Apple’s WWDC 2016 Summary<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="font-family: Helvetica; font-size: 18px; line-height: normal;">
<b><u>Apple’s WWDC 2016 Summary:</u></b></div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal; min-height: 22px;">
<br /></div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal; min-height: 22px;">
<br /></div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal;">
<b><u>iOS:</u></b></div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal;">
<i>iOS 10 - </i></div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal;">
* New Home app with HomeKit support to control all the smart home devices.</div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal;">
* Game Centre being ditched away. GameKit to be introduced to replace it.</div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal;">
* Stocks, Compass and other unused pre-installed apps can be deleted now.</div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal;">
* Interactive Lock Screen.</div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal;">
* 3D to interact with apps w/o unlocking phone.</div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal;">
* App widgets with 3D touch.<br />
<div style="font-family: Helvetica; line-height: normal;">
* Raise to wake feature w/o having to unlock the screen.</div>
<div style="font-family: Helvetica; line-height: normal;">
* VoIP apps can create extensions and integrate into Phone App.</div>
</div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal; min-height: 22px;">
<br /></div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal;">
<b><u>OS X:</u></b></div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal;">
* OS X renamed to macOS and the new next OS named <b><i>“macOS Seirra”</i></b>.</div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal;">
* Auto-Unlock when you are near the mac with phone/watch.</div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal;">
* Siri Integration(Search files, play music, send messages, search the web)</div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal;">
* Apple Pay Integration</div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal;">
* Universal Clipboard (That could be used to copy/paste across Apple devices)</div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal;">
* Picture In Picture (PIP) view(You can watch video in a separate box while you browse)</div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal; min-height: 22px;">
<br /></div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal;">
<b><u>Apple tvOS:</u></b></div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal;">
* DarkMode</div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal;">
* Single SignOn</div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal;">
* Auto-syncing of apps b/w iPhone & TV</div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal;">
* iPhone can be used as a Remote now.</div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal; min-height: 22px;">
<br /></div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal;">
<b><u>WatchOS3:</u></b></div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal;">
* Instant Apps Launch </div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal;">
* Scribble (Send messages by hand written letter-by-letter on the watch screen)</div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal; min-height: 22px;">
<br /></div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal;">
<b><u>Siri Upgrades:</u></b></div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal;">
* Voice mail transcription</div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal;">
* Image search</div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal;">
* Opened up to 3rd party developers</div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal; min-height: 22px;">
<br /></div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal;">
<b><u>iMessage:</u></b></div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal;">
* Invisible ink(Message is visible only when the screen is swiped)</div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal;">
* Replace words with Emoji in a Single Tap</div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal;">
* Access given to 3rd party developers (For Transactions, Services, bots)</div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal; min-height: 22px;">
<br /></div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal;">
<b><u>Photos App:</u></b></div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal;">
* Gets/Copies more updates from Google Photos.</div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal;">
* Creates Movies/Moments from the library.</div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal; min-height: 22px;">
<br /></div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal;">
<b><u>Apple Maps App:</u></b></div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal;">
* Checks for locations from Calendar app.</div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal;">
* Checks for places close to you.</div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal; min-height: 22px;">
<br /></div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal;">
<b><u>Compatible Devices:</u></b></div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal;">
* From iPhone5.</div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal;">
* From iPad Air & iPad mini 2.</div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal;">
* From iPod Touch 6th gen onwards.</div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal;">
<b><i>Devices being removed from last update are:</i></b></div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal;">
<i>iPhone4s, iPad 2/3, iPad mini</i></div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal; min-height: 22px;">
<br /></div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal;">
<b><u>QuickType Updates:</u></b></div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal;">
Offers relevant contact info, location details, and other intelligent suggestions.</div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal; min-height: 22px;">
<br /></div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal;">
<b><u>Other Updates:</u></b></div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal;">
* There 2million apps in Apple’s app store and downloaded 130billion times.</div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal;">
* Apple Pay comes to web with authentication from iPhone/iWatch</div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal;">
* Swift Playground App (To make everyone learn Swift)</div>
<div style="font-size: 18px; line-height: normal; min-height: 22px;">
<span style="font-family: helvetica;">* </span><span style="font-family: Helvetica;">Xcode8 with Swift3</span></div>
<div>
<br /></div>
<div style="font-family: Helvetica; font-size: 18px; line-height: normal; min-height: 22px;">
<div style="font-family: Helvetica; line-height: normal;">
<b><u>Search Ads:</u></b></div>
<div style="font-family: Helvetica; line-height: normal;">
You can advertise your apps in the App Store apps now.</div>
<div>
<br /></div>
<div>
<div style="font-family: Helvetica; line-height: normal;">
<b><u>App Subscriptions:</u></b></div>
<div style="font-family: Helvetica; line-height: normal;">
* Any app can opt for In-App Subscriptions.</div>
<div style="font-family: Helvetica; line-height: normal;">
* With new policy, any app that has crossed an year will have the benefit of 85/15 share, despite the standard 70/30 revenue share.</div>
</div>
<div>
<br /></div>
</div>
</div>
A Passionate Technologists' Journalhttp://www.blogger.com/profile/14721983341617245683noreply@blogger.com0