lpw
2024-09-25 b967348d7f23fac77c85a3164b696eab09d834a8
commit | author | age
e0ec42 1 /*
L 2  * Copyright (c) Meta Platforms, Inc. and affiliates.
3  * All rights reserved.
4  *
5  * This source code is licensed under the license found in the
6  * LICENSE file in the root directory of this source tree.
7  */
8
9 #import <Foundation/Foundation.h>
10
11 #import <FBSDKCoreKit_Basics/FBSDKLinking.h>
12
13 NS_ASSUME_NONNULL_BEGIN
14
15 /// An internal protocol used to describe a simple data store
16 NS_SWIFT_NAME(DataPersisting)
17 @protocol FBSDKDataPersisting
18
19 - (void)fb_setInteger:(NSInteger)integer
20                forKey:(NSString *)key;
21 - (void)fb_setObject:(id)object
22               forKey:(NSString *)key;
23 - (nullable NSData *)fb_dataForKey:(NSString *)key;
24 - (NSInteger)fb_integerForKey:(NSString *)key;
25 - (nullable NSString *)fb_stringForKey:(NSString *)key;
26 - (nullable id)fb_objectForKey:(NSString *)key;
97fc0a 27 - (BOOL)fb_boolForKey:(NSString *)key;
L 28 - (void)fb_setBool:(BOOL)value forKey:(NSString *)key;
e0ec42 29 - (void)fb_removeObjectForKey:(NSString *)key;
L 30
31 @end
32
33 FB_LINK_CATEGORY_INTERFACE(NSUserDefaults, DataPersisting)
34 @interface NSUserDefaults (DataPersisting) <FBSDKDataPersisting>
35
36 @end
37
38 NS_ASSUME_NONNULL_END