You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: GULKeychainUtils.m
    path of file: ./repos/XcodeBenchmark/Pods/GoogleUtilities/GoogleUtilities/Environment/SecureStorage
    
    the code of the file until where you have to start completion: /*
 * Copyright 2019 Google
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * Yo
    
function = existingItem ? @"SecItemUpdate" : @"SecItemAdd";
  if (outError) {
    *outError = [self keychainErrorWithFunction:function status:status];
  }
  return NO;
}

+ (BOOL)removeItemWithQuery:(NSDictionary *)query error:(NSError *_Nullable *_Nullable)outError {
  NSDictionary *deleteItemQuery = [[self class] multiplatformQueryWithQuery:query];

  OSStatus status = SecItemDelete((__bridge CFDictionaryRef)deleteItemQuery);

  if (status == noErr || status == errSecItemNotFound) {
    if (outError) {
      *outError = nil;
    }
    return YES;
  }

  if (outError) {
    *outError = [self keychainErrorWithFunction:@"SecItemDelete" status:status];
  }
  return NO;
}

#pragma mark - Private

/// Returns a `NSDictionary` query that behaves the same across all platforms.
/// - Note: In practice, this API only makes a difference to keychain queries on macOS.
/// See go/firebase-macos-keychain-popups for details.
/// - Parameter query: A query to create the protected keychain query with.
+ (NSDictionary *)multiplatformQueryWithQuery:(NSDictionary *)query {
  NSMutableDictionary *multiplatformQuery = [query mutableCopy];
  if (@available(iOS 13.0, macOS 10.15, macCatalyst 13.0, tvOS 13.0, watchOS 6.0, *)) {
    multiplatformQuery[(__bridge id)kSecUseDataProtectionKeychain] = (__bridge id)kCFBooleanTrue;
  }
  return [multiplatformQuery copy];
}

#pragma mark - Errors

+ (NSError *)keychainErrorWithFunction:(NSString *)keychainFunction status:(OSStatus)status {
  NSString *failureReason = [NSString stringWithFormat:@"%@ (%li)", keychainFunction, (long)status];
  NSDictionary *userInfo = @{NSLocalizedFailureReasonErrorKey : failureReason};
  return [NSError errorWithDomain:kGULKeychainUtilsErrorDomain code:0 userInfo:userInfo];
}

@end