def apns_send_bulk_message(registration_ids, alert, **kwargs):
 certfile = kwargs.get('certfile', None)
 with closing(_apns_create_socket_to_push(certfile)) as socket:
  for (identifier, registration_id) in enumerate(registration_ids):
   res = _apns_send(registration_id, alert, identifier=identifier, socket=socket, **kwargs)
  _apns_check_errors(socket)
  return res

def apns_send_bulk_message ( registration_ids , alert , ** kwargs ) : certfile = kwargs . get ( 'certfile' , None ) with closing ( _apns_create_socket_to_push ( certfile ) ) as socket : for ( identifier , registration_id ) in enumerate ( registration_ids ) : res = _apns_send ( registration_id , alert , identifier = identifier , socket = socket , ** kwargs ) _apns_check_errors ( socket ) return res
sends an apns notification to one or more registration_ids .