maxgoedjen/Shakedown — pull request #13 by jeanregisser (2013-05-07 11:47:39+00:00)
Title: Add ability to attach any type of attachments in a bug report

Hi again,

In my apps I would like to upload additional files with bug reports (for instance custom data generated by the app).

Here's a draft of what I see:

```objc
@interface SHDBugReport : NSObject

@property (nonatomic, strong) NSString *title;
@property (nonatomic, strong) NSString *generalDescription;
@property (nonatomic, strong) NSString *reproducability;
@property (nonatomic, strong) NSArray *steps;
@property (nonatomic, strong) NSMutableArray *screenshots;

@property (nonatomic, strong) NSDictionary *userInformation;
@property (nonatomic, readonly) NSDictionary *deviceDictionary;

@property (nonatomic, strong) NSString *log;

@property (nonatomic, readonly) NSString *formattedReport;

@property (nonatomic, readonly) NSArray *attachments; // Array of SHDAttachment

- (void)appendAttachmentWithData:(NSData *)data
name:(NSString *)name
fileName:(NSString *)fileName
mimeType:(NSString *)mimeType;

@end

@interface SHDAttachment : NSObject

@property (nonatomic, strong) NSString *name;
@property (nonatomic, strong) NSString *fileName;
@property (nonatomic, strong) NSString *mimeType;
@property (nonatomic, strong) NSData *data;

@end
```

In fact `log` and `screenshots` would be added to the attachments array.

Then all reporters would simply process all attachments and upload them on the service if it's supported.

What do you think?