// // CBPeripheral+ADName.m // Unity-iPhone // // Created by duowan123 on 2021/11/8. // #import "CBPeripheral+ADName.h" #import @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