12345678910111213141516171819202122232425262728293031 |
- //
- // LineSDKJSONWebToken+RawString.m
- // TYSocialLine
- //
- // Created by JiaNa on 2021/1/21.
- //
- #import "LineSDKJSONWebToken+RawString.h"
- #import <TYFoundationKit/NSObject+TYSwizzle.h>
- #import <TYFoundationKit/NSObject+TYAssociate.h>
- @implementation LineSDKJSONWebToken (RawString)
- + (void)load {
- static dispatch_once_t onceToken;
- dispatch_once(&onceToken, ^{
- [self ty_swizzleInstanceMethod:@selector(initWithString:) with:@selector(ty_initWithString:)];
- });
- }
- - (instancetype)ty_initWithString:(NSString *)string {
- id instance = [self ty_initWithString:string];
- [instance ty_setAssociate:string withKey:@"rawString"];
- return instance;
- }
- - (NSString *)rawString {
- return [self ty_getAssociateWithKey:@"rawString"];
- }
- @end
|