CLUDataWriter
@interface CLUDataWriter : NSObject <CLUWritable, NSStreamDelegate>
CLUDataWriter
class which responsible for all writing and saving process for regular data stream into final .json file (inside .clue report file)
Used with all Recordable Modules (like View Structure, Network and User Interactions) to add data while report recording is active
-
URL of the file where
CLUDataWriter
will save recorded dataDeclaration
Objective-C
@property (readonly, nonatomic) NSURL *outputURL;
Swift
var outputURL: URL! { get }
-
Create new instance of Data Writer with specific output URL
Declaration
Objective-C
- (instancetype)initWithOutputURL:(NSURL *)outputURL;
Swift
init!(outputURL: URL!)
Parameters
outputURL
URL of the file where
CLUDataWriter
will save recorded dataReturn Value
New instance of Data Writer with configured properties
-
Add
NSData
with entity’s properties json dictionary to file atCLUDataWriter.outputURL
URLDeclaration
Objective-C
- (void)addData:(NSData *)data;
Swift
func add(_ data: Data!)
Parameters
data
NSData
object with entity’s properties json dictionary (Network entity dictionary, View Structure dictionary or User Interaction dictionary)