···11+/*
22+ * This file is part of Darling.
33+ *
44+ * Copyright (C) 2023 Darling Developers
55+ *
66+ * Darling is free software: you can redistribute it and/or modify
77+ * it under the terms of the GNU General Public License as published by
88+ * the Free Software Foundation, either version 3 of the License, or
99+ * (at your option) any later version.
1010+ *
1111+ * Darling is distributed in the hope that it will be useful,
1212+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1313+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1414+ * GNU General Public License for more details.
1515+ *
1616+ * You should have received a copy of the GNU General Public License
1717+ * along with Darling. If not, see <http://www.gnu.org/licenses/>.
1818+ */
1919+2020+#import <CloudKit/CKContainer.h>
2121+2222+typedef void (^CKContainerDeviceIDCompletionHandler)(NSString* deviceID, NSError* error);
2323+2424+@interface CKContainer (Private)
2525+2626+- (void)fetchCurrentDeviceIDWithCompletionHandler: (CKContainerDeviceIDCompletionHandler)completionHandler;
2727+2828+@end
···77#import <Foundation/Foundation.h>
88#import <CoreFoundation/CoreFoundation.h>
99#import <dispatch/dispatch.h>
1010+#include <dlfcn.h>
10111112// certain aspects of this file (such as framework, function, and constant loading)
1213// can be implemented in plain C, but because it can also load Objective-C classes,
···67686869#define SOFT_LINK_CONSTANT(_framework, _name, _type) \
6970 static _type get ## _name () { \
7070- static _type* constant = NULL; \
7171+ static _type const* constant = NULL; \
7172 static dispatch_once_t once_handle; \
7273 dispatch_once(&once_handle, ^{ \
7374 CFBundleRef bundle = softlink_get_cfbundle_ ## _framework (); \
7475 if (bundle) \
7575- constant = CFBundleGetDataPointerForName(bundle, SOFT_LINK_CFSTRINGIFY(_name)); \
7676+ constant = (_type const*)CFBundleGetDataPointerForName(bundle, SOFT_LINK_CFSTRINGIFY(_name)); \
7677 }); \
7778 /*
7879 i'm not sure what to do if the symbol can't be found since