#MetricKit
Explore tagged Tumblr posts
Text
The secrets hidden under the screen curtains
We must always know that an application, on any platform, requires many lines of code tailored by the developers, a well-built interface made by the designers, among other things, that may include many other professionals (even from other areas!), they had to carefully think, prototype and validate to ensure that I am here able to write and publish this post! 📝✍️
With that many elements at the table, of course, we might not be able to think of every scenario that our application will misbehave, these are the famous hangs and delays that can be critical (we hope not!) and make a weird impression on whoever is using them.
That the session of WWDC21 from this Thursday that I chose to comment on and bring some insights trying to be as less technical as possible so that this post is readable for anyone.
What comes after the tap? 👆
When the user tries to make some kind of interaction on the application (the most common being a tap) there is a whole process behind performing some action and displaying it back to the user, it should be interpreted and properly translated to the application to handle.
When the finger interacts with the screen 👉📲, for the common user it may seem like nothing really happened, but by looking under the curtains, it becomes evident that each iteration has a beginning, an execution sequence, and an end to it, this behaviour is what we call "thread", meaning an execution of a specific sequence of tasks in the given context.
In this interval, there are several threads that are consulted on the code and work together to execute everything they need to guarantee the answer. This process, which isn't visible to the end-user, shouldn't be too time-consuming, and should never delay the response feedback. 🗣
Delays can occur when this queue is full and the extra seconds make the user repeat the interaction, which consequently repeats the query process, thus generating the hang, and the answer is shown after a brief moment, at that point in the championship, the "good experience" was already lost.
That could be worse 💢! Threads cannot always happen together, sometimes communication must be asynchronous, that is, run one thread at a time, because they have dependencies. When this error occurs it's not just a delay, it's a block! 🚫
When requesting a network or when using hardware resources that access files, for example, they should be coded with scenarios in mind that should guarantee good performance and prevent directly impacting user interactions.
How to minimize hangs from our apps?
The main tip is: reduce work on the main thread. It's always recommended that we optimize the work of the main thread and delegate functions to other ones to improve execution time.
Some implementation suggestions and best practices from the WWDC session that make these threads responsive and ensure good performance.
Caching 📲
Notification Observers 👀
Asynchronous API 🔃
Grand Central Dispatch (GCD)🚦
Even though they are good options, it's necessary to be aware of the tradeoffs 🚨 that each one can offer.
Communicating with the end-user ⭐️
Although these are things that happen within the application system, it's always necessary to communicate in some way with the user! This is part of a good design that can predict these kinds of events.
by: @victoriafaria
#wwdc#wwdc21#WWDC21#performance#hangs#apps#mobile apps#system#no crash#background#instruments#MetricKit#tools#iOS#OS
8 notes
·
View notes
Text
Week 384
Happy Thursday! I’ve seen this tweet saying that Swift has been around for more than half of iOS development and I was amazed by that. I started my iOS dev journey in the Objective-C days. I even remember writing some retain and release back when I started, even though I probably wasn’t very sure how that worked back then. All that seems so long ago. However, Swift somehow almost still feels like “that new thing” to me, when that’s clearly not the case anymore. I remember in 2014 when it was announced that I realised immediately this was something big. I just didn’t realise how big it would be. I’m looking forward to this WWDC. I don’t expect anything big or revolutionary, but I also wasn’t expecting that in 2014 when Swift was announced or in 2019 when SwiftUI and Combine were announced. I don’t want to get your hopes up and I really don’t have any inside information 😂. I’m just excited for WWDC 2021 😄.
Marius Constantinescu
Articles
Announcing the Swift Mentorship Program, by The Diversity in Swift work group
A TextFieldStyle API preview!, by @zntfdr
Chaining publishers with Combine in Swift, by @mecid
I Spend 1 Hour to Remove an UIImageView Rounded Corners, and Here’s Why, by @Lee_Kah_Seng
How to set up iOS environments: develop, staging, and production, by @sarunw
Decoupling Dependencies in Swift, by @kilo_loco
Swift Actors: A practical example part 1 and part 2, by @icanzilb
Monitoring for iOS with MetricKit: Getting Started, by @adam9rush
Tools/Controls
ExtensionKit - Helpful extensions for iOS app development 🚀, by 2f6ary
Business/Career
How to Craft the Perfect ATT (App Tracking Transparency) Prompt and Pre-Prompt Copy, by @arielmichaeli
Videos
UIKit Xcode Live Preview - Demo, by @ZiadeMarcus
Contributors
zntfdr, mecid, LeeKahSeng, rel, sarunw
1 note
·
View note
Text
Week 356
Happy Thursday! The iPhone event was on Tuesday, and Apple unveiled 4 new iPhones and HomePod mini. I’m most likely not going to upgrade my phone, as I did it last year, but I really love the blue color of the iPhone 12 and 12 mini 🤩. We also got the GM seed of Xcode 12.1, which comes with support for the new devices, also explaining why it was apparently skipped when Apple jumped to Xcode 12.2 beta after 12.0.
Marius Constantinescu
Articles
How iOS Apps Adapt to the various iPhone 12 Screen Sizes, by @geoffhackworth
Debugging on iOS 14 with Xcode 11, by @hybridcattt
Transactions in SwiftUI, by @mecid
@warn_unqualified_access, by @zntfdr
Building Accessible iOS Apps, by @RobRWAPP
@How to test push notifications in simulator and production iOS apps, by @onmyway133
Creating generic networking APIs in Swift, by @swiftbysundell
Crash Reporting with MetricKit, Part 2, by @mattie
Swift deinit is (sometimes) not called for throwing or failable initializers, by @jesse_squires
Business/Career
Launching an Indie App - Part 2: Finding my niche, by @michael_tigas
How to be a good developer, by @gmoraleda_
UI/UX
Tap to Navigate - Systemizing interactive labels for maps, by @taptodismiss
Behind the scenes of Instagram’s 10 year anniversary app icon easter egg, by @GK3
Credits
mecid, gmoraleda, rel, zntfdr, onmyway133, pmusolino, sarunw, michael_tigas
0 notes
Text
Week 341
Happy Thursday! It’s the week after WWDC, content about the new APIs is starting to pop up more and more, and if you think you’re falling behind because you haven’t watched as many sessions as you were hoping, just remember that you don’t need to know all this now. In most cases, you don’t need to know this in autumn either, because a lot of what was announced is iOS 14 only. It’s ok not to rush into the new APIs and it’s ok not to install the betas. However, if you do want to watch more WWDC20 sessions, but you’re not sure which ones, the WWDC 2020 Viewing Guide by @kharrison will surely come in handy.
Marius Constantinescu
Articles
iOS 14: Create a widget using WidgetKit, by @j_zonneveld
New property wrappers in SwiftUI, by @mecid
Adding optional @Bindings to SwiftUI views, by @zntfdr
Grouping Array Elements With Dictionary in Swift, by @Lee_Kah_Seng
A first look at matchedGeometryEffect, by @sarunw
Crash Reporting with MetricKit, by @mattie
Getting Started With Widgets, by mataharimau
Introducing App Clips, by Tom Müller
10 Code Snippets from WWDC 2020, by @fraancessco
Tools/Controls
Cirrus - Simple CloudKit sync for Codable Swift models, by @jayhickey
Mockingbird - macOS HTTP(s) Mocking Tool on top of mitmproxy by @erickjung
Business/Career
Why AnyList Won’t Be Supporting Sign In with Apple, by @jeffhunterx
UI/UX
The Comeback of Fun in Visual Design, by @flarup
Bringing the Spotify Heart to Life, by @heikowinter and @marmelroy
Videos
UICollectionView Compositional List Layout, by @kilo_loco
Credits
jeroenzonneveld, mecid, @jayhickey, @zntfdr, LeeKahSeng, sarunw, crsantos, francesc-o
0 notes