mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00

git-subtree-dir: submodules/HockeySDK-iOS git-subtree-mainline: 085acd26c4432939403765234266e3c1be0f3dd9 git-subtree-split: c7d0c7026303253e2ac576c02655691e5d314fe2
40 lines
1.0 KiB
Objective-C
40 lines
1.0 KiB
Objective-C
#import "BITInternal.h"
|
|
|
|
/// Data contract class for type Internal.
|
|
@implementation BITInternal
|
|
|
|
///
|
|
/// Adds all members of this class to a dictionary
|
|
/// @returns dictionary to which the members of this class will be added.
|
|
///
|
|
- (NSDictionary *)serializeToDictionary {
|
|
NSMutableDictionary *dict = [super serializeToDictionary].mutableCopy;
|
|
if (self.sdkVersion != nil) {
|
|
[dict setObject:self.sdkVersion forKey:@"ai.internal.sdkVersion"];
|
|
}
|
|
if (self.agentVersion != nil) {
|
|
[dict setObject:self.agentVersion forKey:@"ai.internal.agentVersion"];
|
|
}
|
|
return dict;
|
|
}
|
|
|
|
#pragma mark - NSCoding
|
|
|
|
- (instancetype)initWithCoder:(NSCoder *)coder {
|
|
self = [super init];
|
|
if(self) {
|
|
_sdkVersion = [coder decodeObjectForKey:@"self.sdkVersion"];
|
|
_agentVersion = [coder decodeObjectForKey:@"self.agentVersion"];
|
|
}
|
|
|
|
return self;
|
|
}
|
|
|
|
- (void)encodeWithCoder:(NSCoder *)coder {
|
|
[coder encodeObject:self.sdkVersion forKey:@"self.sdkVersion"];
|
|
[coder encodeObject:self.agentVersion forKey:@"self.agentVersion"];
|
|
}
|
|
|
|
|
|
@end
|