beginBackgroundTaskWithName method

int beginBackgroundTaskWithName(
  1. NSString? taskName, {
  2. ObjCBlock<Void Function()>? expirationHandler,
})

beginBackgroundTaskWithName:expirationHandler:

Implementation

int beginBackgroundTaskWithName(objc.NSString? taskName, {objc.ObjCBlock<ffi.Void Function()>? expirationHandler}) {
  objc.checkOsVersionInternal(
    'UIApplication.beginBackgroundTaskWithName:expirationHandler:',
    iOS: (false, (7, 0, 0)),
  );
  return _objc_msgSend_jkkt9d(
    this.ref.pointer,
    _sel_beginBackgroundTaskWithName_expirationHandler_,
    taskName?.ref.pointer ?? ffi.nullptr,
    expirationHandler?.ref.pointer ?? ffi.nullptr,
  );
}