Please update this tutorial for Swift 3. I feel like the content is very useful, but some of the language changes (the dispatch functions in particular) are not explained well (not explained at all, to be honest) and make a roadblock into getting the code to run.
you need to update UI on main thread so you access the main thread by dispatch_sync(dispatch_get_main_queue() and inside the block , you update the imageViewโs image and save image to disk.