cs193p – Assignment #6 Extra Tasks #5 and #6

cs193p – assignment #6 extra task #5 and #6

Please note, this blog entry is from a previous course. You might want to check out the current one.

Assignment #6 Extra Task #5

Adding the fetch for place and region information is going to break the way background fetching updates the app-switcher. Can you figure out why? Fix this problem. Hint: It is the background fetch completion handler that tells iOS to update the UI in the app-switcher. You can simulate a background fetch while running in the Simulator using the “Simulate Background Fetch” menu item in Xcode’s Debug menu.

… seems we took care of this problem … it’s working

Assignment #6 Extra Task #6

Switching to UIManagedDocument for our NSManagedObjectContext is going to break launching due to a background fetch event. Can you figure out why that is? Fix it. Remember that you can launch your application as if it were happening due to a background fetch by choosing Edit Scheme from the popup in the upper left corner of Xcode (near the run and stop buttons), then turning on “Launch due to a background fetch event” in the Options tab of the window that appears. You can also create a new scheme there that has that switch always on for easy background fetch launching during debugging.

… it’s also working …

What did we do wrong, that it works? We took care encapsulating Core Data requests (e.g. performing blocks in the managed-object context). We made sure that there is a single managed doucment which – while it is opening or getting created – is only accessed by a single process …

The complete code for all extra tasks is available on github.


Flattr this!

Leave a Reply

Your email address will not be published. Required fields are marked *