The worst problems that happen in software development are the ones that happen behind the curtains. Use the memory profiler in Xcode to examine the performance of your camera in different situations, and then introduce a deliberate memory leak into the camera so you can see what a memory leak looks like, how to debug it, and how to make sure you write clean code—protecting your framework against situations like that.
- [Instructor] Before we get ready…to start shipping our framework,…and make it releasable, it's very, very important…to make sure that you're always checking for memory leaks…in any application or framework that you work with.…Let's go over how to enable the memory debugger in Xcode 9.…Go up to your schemes, and click on Edit Scheme…for your SampleApplication.…In the Run tab, you'll initially end up…on the Info screen here.…Go to the right and click on Diagnostics.…Go down to where it says Logging,…click on Malloc Stack, and under the options…you have here, click on Live Allocations Only.…
The reason we're choosing Live Allocations Only…is because automatic resource counting…will take care of most of our work for us.…We'll need to focus on what's live…on the stack that we're working with.…Click on Close, and go ahead and run your application.…As we've been working on this,…we've actually built in a retain cycle…into our application, that we know how to debug…now that we have the memory debugger.…Let's go ahead and show that so we can access…
Along the way, he explains the differences and nuances between writing code for an application and for a reusable framework, as well as some of the fundamentals of AVFoundation, one of the core camera frameworks in iOS. David also shows how to refactor your code, understand Swift access control, develop an interface, and handle memory leaks, so your framework is ready to share with other developers.
- Creating your first build
- Making the camera work
- Creating a framework delegate
- Adding media
- Capturing images
- Correcting orientation
- Versioning and tagging releases in Git
Skill Level Intermediate
Learning Server-Side Swift with Vaporwith Ron Buencamino1h 30m Intermediate
Swift 4: Protocol-Oriented Programmingwith Károly Nyisztor1h 44m Intermediate
1. Let's Make It Work
2. Let's Keep It Clean
3. Putting It All Together
4. Track It
Tagging releases in Git2m 36s
Next steps1m 47s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.