mirror of
https://github.com/zoriya/react-native-background-downloader.git
synced 2026-06-05 10:59:51 +00:00
forgot task config
This commit is contained in:
@@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
/* Begin PBXFileReference section */
|
/* Begin PBXFileReference section */
|
||||||
134814201AA4EA6300B7C361 /* libRNBackgroundDownload.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNBackgroundDownload.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
134814201AA4EA6300B7C361 /* libRNBackgroundDownload.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNBackgroundDownload.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
|
565BF70F208F2C7C00F66231 /* TaskConfig.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TaskConfig.h; sourceTree = "<group>"; };
|
||||||
B3E7B5881CC2AC0600A0062D /* RNBackgroundDownload.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNBackgroundDownload.h; sourceTree = "<group>"; };
|
B3E7B5881CC2AC0600A0062D /* RNBackgroundDownload.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNBackgroundDownload.h; sourceTree = "<group>"; };
|
||||||
B3E7B5891CC2AC0600A0062D /* RNBackgroundDownload.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNBackgroundDownload.m; sourceTree = "<group>"; };
|
B3E7B5891CC2AC0600A0062D /* RNBackgroundDownload.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNBackgroundDownload.m; sourceTree = "<group>"; };
|
||||||
/* End PBXFileReference section */
|
/* End PBXFileReference section */
|
||||||
@@ -50,6 +51,7 @@
|
|||||||
58B511D21A9E6C8500147676 = {
|
58B511D21A9E6C8500147676 = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
565BF70F208F2C7C00F66231 /* TaskConfig.h */,
|
||||||
B3E7B5881CC2AC0600A0062D /* RNBackgroundDownload.h */,
|
B3E7B5881CC2AC0600A0062D /* RNBackgroundDownload.h */,
|
||||||
B3E7B5891CC2AC0600A0062D /* RNBackgroundDownload.m */,
|
B3E7B5891CC2AC0600A0062D /* RNBackgroundDownload.m */,
|
||||||
134814211AA4EA7D00B7C361 /* Products */,
|
134814211AA4EA7D00B7C361 /* Products */,
|
||||||
@@ -197,7 +199,7 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
HEADER_SEARCH_PATHS = (
|
HEADER_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||||
"$(SRCROOT)/../../../React/**",
|
"$(SRCROOT)/../../../React/**",
|
||||||
"$(SRCROOT)/../../react-native/React/**",
|
"$(SRCROOT)/../../react-native/React/**",
|
||||||
|
|||||||
@@ -0,0 +1,51 @@
|
|||||||
|
//
|
||||||
|
// TaskConfig.h
|
||||||
|
// EkoApp
|
||||||
|
//
|
||||||
|
// Created by Elad Gil on 21/11/2017.
|
||||||
|
// Copyright © 2017 Eko. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
@interface TaskConfig : NSObject <NSCoding>
|
||||||
|
|
||||||
|
@property NSString * _Nonnull id;
|
||||||
|
@property NSString * _Nonnull destination;
|
||||||
|
@property BOOL reportedBegin;
|
||||||
|
|
||||||
|
- (id _Nullable )initWithDictionary: (NSDictionary *_Nonnull)dict;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation TaskConfig
|
||||||
|
|
||||||
|
- (id _Nullable )initWithDictionary: (NSDictionary *_Nonnull)dict {
|
||||||
|
self = [super init];
|
||||||
|
if (self) {
|
||||||
|
self.id = dict[@"id"];
|
||||||
|
self.destination = dict[@"destination"];
|
||||||
|
self.reportedBegin = NO;
|
||||||
|
}
|
||||||
|
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)encodeWithCoder:(nonnull NSCoder *)aCoder {
|
||||||
|
[aCoder encodeObject:self.id forKey:@"id"];
|
||||||
|
[aCoder encodeObject:self.destination forKey:@"destination"];
|
||||||
|
[aCoder encodeBool:self.reportedBegin forKey:@"reportedBegin"];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (nullable instancetype)initWithCoder:(nonnull NSCoder *)aDecoder {
|
||||||
|
self = [super init];
|
||||||
|
if (self) {
|
||||||
|
self.id = [aDecoder decodeObjectForKey:@"id"];
|
||||||
|
self.destination = [aDecoder decodeObjectForKey:@"destination"];
|
||||||
|
self.reportedBegin = [aDecoder decodeBoolForKey:@"reportedBegin"];
|
||||||
|
}
|
||||||
|
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
Reference in New Issue
Block a user