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}) {
  final _$$ref = object$.ref;
  final _$$ref$1 = taskName?.ref;
  final _$$ref$2 = expirationHandler?.ref;
  objc.checkOsVersionInternal(
    'UIApplication.beginBackgroundTaskWithName:expirationHandler:',
    iOS: (false, (7, 0, 0)),
  );
  return _objc_msgSend_jkkt9d(
    _$$ref.pointer,
    _sel_beginBackgroundTaskWithName_expirationHandler_,
    _$$ref$1?.pointer ?? ffi.nullptr,
    _$$ref$2?.pointer ?? ffi.nullptr,
  );
}