We recently held our State of Swift 2020 webinar which was an absolute success! Panelists Kaya Thomas, Daniel Steinberg, and Vincent Pradeilles shared their favorite tips & tricks(-or-treats 🍬🎃) in Swift for you to try.
This article was brought to you as a sneak peak into the videos these amazing creators put together before the webinar. You can check out the full videos on YouTube.
- Keep up with Swift evolution
With the stability we’ve got in Swift development, the code you wrote yesterday still works, but it looks different from the code we write today. Keeping up with the changes will also keep your code more in sync with the code that we see from Apple. - Test push notifications on the simulator
From Xcode 11.4, Apple has made it possible to drag APNs files to the simulator to test how the notifications will look and respond. All you need to do is drag & drop the .apns file from your Finder to the bundle identifier to simulate a real-time push notification. - Be mindful of the iOS 14 Widget memory
If you are experiencing crashes when your widgets loads, check your image sizes! The new iOS 14 has a 30 MB widget memory limit. Checking out how much memory your widget uses and adjusting image sizes may solve your crashing problems. - Use the Accessibility Inspector
With the Accessibility Inspector, you can navigate in your app in a simulator as you would using voiceover on a device. Here you can also see the properties of each element in your app and review the element types and labels (that will be read out loud to users). I highly recommend going through your app to ensure that all the elements that you expect to be, are indeed accessible. - Use extensions liberally & embrace ResultBuilders
Watch Daniel walk you through how he uses extensions and ResultBuilders in his code from 2:05. - Check out Vincent’s YouTube channel for bite-sized Swift videos
Vincent launched a Swift Tips video series on his Youtube channel — check out his videos to learn more about Swift through his short examples.
Don’t miss out!
You can still watch our webinar to learn more from Kaya, Daniel, Vincent, and our host, Alex Logan. ✨ We talked about iOS 14 announcements to best practices, challenges, and the community behind Swift. Watch it on-demand!