123456789101112131415161718192021222324 |
- //
- // CBPeripheral+ADName.m
- // Unity-iPhone
- //
- // Created by duowan123 on 2021/11/8.
- //
- #import "CBPeripheral+ADName.h"
- #import <objc/runtime.h>
- @implementation CBPeripheral (ADName)
- static void *strKey = &strKey;
- -(void)setAdvertiseName:(NSString *)advertiseName{
- objc_setAssociatedObject(self, &strKey, advertiseName, OBJC_ASSOCIATION_COPY);
- }
- -(NSString*)advertiseName{
- return objc_getAssociatedObject(self, &strKey);
- }
- @end
|