RichieBackgroundTaskSource
Objective-C
@protocol RichieBackgroundTaskSource
-(UIBackgroundTaskIdentifier) beginBackgroundTaskWithName:(NSString *)taskName
expirationHandler:(void(^)(void))handler;
-(void) endBackgroundTask:(UIBackgroundTaskIdentifier)identifier;
/**
Returns a lifetime token. Background task is ended when token object is deallocated or -endTask is called explicitly.
There is not expiration handler, because we don't do anything in them.
*/
-(id<RichieBackgroundTask>) backgroundTaskWithName:(NSString *)name;
@end
Swift
protocol RichieBackgroundTaskSource
Undocumented
-
Undocumented
Declaration
Objective-C
-(UIBackgroundTaskIdentifier) beginBackgroundTaskWithName:(NSString *)taskName expirationHandler:(void(^)(void))handler;
Swift
func beginBackgroundTask(withName taskName: String!, expirationHandler handler: (() -> Void)!) -> UIBackgroundTaskIdentifier
-
Undocumented
Declaration
Objective-C
-(void) endBackgroundTask:(UIBackgroundTaskIdentifier)identifier;
Swift
func endBackgroundTask(_ identifier: UIBackgroundTaskIdentifier)
-
Returns a lifetime token. Background task is ended when token object is deallocated or -endTask is called explicitly. There is not expiration handler, because we don’t do anything in them.
Declaration
Objective-C
- (id<RichieBackgroundTask>)backgroundTaskWithName:(NSString *)name;
Swift
func backgroundTask(withName name: String!) -> (any RichieBackgroundTask)!