// Copyright (C) 2022 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 #pragma once #include #include namespace Ios { template struct CFRefDeleter { using pointer = CFType; void operator()(CFType ref) { CFRelease(ref); } }; inline QString toQStringRelease(CFStringRef str) { QString result = QString::fromCFString(str); CFRelease(str); return result; } using CFString_t = std::unique_ptr>; using CFUrl_t = std::unique_ptr>; using CFPropertyList_t = std::unique_ptr>; using CFBundle_t = std::unique_ptr>; using CFDictionary_t = std::unique_ptr>; using CFArray_t = std::unique_ptr>; } // namespace Ios