Closed Sashom closed 7 years ago
Have the app delegate maintain a strong reference to the SD object?
You do this by calling beginBackgroundTaskWithExporationHandler:
, for example:
if ([[UIDevice currentDevice] isMultitaskingSupported]) {
self.backgroundRecordingID = [[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler:^{
// If the task expires, just end it to avoid having the app terminated
[[UIApplication sharedApplication] endBackgroundTask:self.backgroundRecordingID];
self.backgroundRecordingID = UIBackgroundTaskInvalid;
NSLog(@"ERROR: recording background task timed out");
}];
}
Eh there should probably be a weakSelf
in there, but you get the idea
Hi, is there a way to make this work (at least in the allowed 3 minutes) in the background in case I hit the home button while export is being made?