Skip to content
This repository has been archived by the owner on Feb 19, 2020. It is now read-only.

Commit

Permalink
Merge pull request #413 from bitstadium/release/4.1.5
Browse files Browse the repository at this point in the history
Release/4.1.5
  • Loading branch information
Benjamin Scholtysik (Reimold) authored Apr 29, 2017
2 parents 52ff733 + e54ce73 commit ddda084
Show file tree
Hide file tree
Showing 78 changed files with 302 additions and 503 deletions.
12 changes: 8 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
language: objective-c
osx_image: xcode8
osx_image: xcode8.3

env:
global:
Expand All @@ -8,11 +8,15 @@ env:
- CONFIGURATION="DEBUG"

matrix:
- SCHEME="HockeySDK" DESTINATION="OS=8.1,name=iPad Air" RUN_TESTS="YES"
- SCHEME="HockeySDK" DESTINATION="OS=8.2,name=iPhone 6 Plus" RUN_TESTS="YES"
- SCHEME="HockeySDK" DESTINATION="OS=8.3,name=iPad 2" RUN_TESTS="YES"
- SCHEME="HockeySDK" DESTINATION="OS=8.4,name=iPhone 4s" RUN_TESTS="YES"
- SCHEME="HockeySDK" DESTINATION="OS=9.0,name=iPad Air" RUN_TESTS="YES"
- SCHEME="HockeySDK" DESTINATION="OS=9.1,name=iPhone 6 Plus" RUN_TESTS="YES"
- SCHEME="HockeySDK" DESTINATION="OS=9.2,name=iPad Pro" RUN_TESTS="YES"
- SCHEME="HockeySDK" DESTINATION="OS=9.3,name=iPhone 6s" RUN_TESTS="YES"
- SCHEME="HockeySDK Framework" DESTINATION="platform=iOS Simulator,OS=9.3,name=iPhone 6" RUN_TESTS="YES"
- SCHEME="HockeySDK" DESTINATION="OS=10.2,name=iPad Pro (9.7-inch)" RUN_TESTS="YES"
- SCHEME="HockeySDK" DESTINATION="OS=10.3,name=iPhone 6s" RUN_TESTS="YES"
- SCHEME="HockeySDK Framework" DESTINATION="platform=iOS Simulator,OS=10.3,name=iPhone 6" RUN_TESTS="YES"
- SCHEME="HockeySDK Distribution" RUN_TESTS="NO" LINT="YES"

before_install:
Expand Down
16 changes: 0 additions & 16 deletions Classes/BITAppStoreHeader.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,26 +35,10 @@
#define __IPHONE_6_1 60100
#endif


/**
* Header style depending on the iOS version
*/
typedef NS_ENUM(NSUInteger, BITAppStoreHeaderStyle) {
/**
* Default is iOS 6 style
*/
BITAppStoreHeaderStyleDefault = 0,
/**
* Draw header in the iOS 7 style
*/
BITAppStoreHeaderStyleOS7 = 1
};

@interface BITAppStoreHeader : UIView

@property (nonatomic, copy) NSString *headerText;
@property (nonatomic, copy) NSString *subHeaderText;
@property (nonatomic, strong) UIImage *iconImage;
@property (nonatomic, assign) BITAppStoreHeaderStyle style;

@end
36 changes: 10 additions & 26 deletions Classes/BITAppStoreHeader.m
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ - (instancetype)initWithFrame:(CGRect)frame {
if ((self = [super initWithFrame:frame])) {
self.autoresizingMask = UIViewAutoresizingFlexibleWidth;
self.backgroundColor = kWhiteBackgroundColorDefault;
self.style = BITAppStoreHeaderStyleDefault;
}
return self;
}
Expand All @@ -70,25 +69,14 @@ - (instancetype)initWithFrame:(CGRect)frame {

- (void)drawRect:(CGRect)rect {
CGRect bounds = self.bounds;
CGContextRef context = UIGraphicsGetCurrentContext();

if (self.style == BITAppStoreHeaderStyleDefault) {
// draw the gradient
NSArray *colors = [NSArray arrayWithObjects:(id)kDarkGrayColor.CGColor, (id)kLightGrayColor.CGColor, nil];
CGGradientRef gradient = CGGradientCreateWithColors(CGColorGetColorSpace((__bridge CGColorRef)[colors objectAtIndex:0]), (__bridge CFArrayRef)colors, (CGFloat[2]){0, 1});
CGPoint top = CGPointMake(CGRectGetMidX(bounds), bounds.size.height - 3);
CGPoint bottom = CGPointMake(CGRectGetMidX(bounds), CGRectGetMaxY(bounds));
CGContextDrawLinearGradient(context, gradient, top, bottom, 0);
CGGradientRelease(gradient);
} else {
// draw the line
CGContextRef ctx = UIGraphicsGetCurrentContext();
CGContextSetLineWidth(ctx, 1.0);
CGContextSetStrokeColorWithColor(ctx, kDarkGrayColor.CGColor);
CGContextMoveToPoint(ctx, 0, CGRectGetMaxY(bounds));
CGContextAddLineToPoint( ctx, CGRectGetMaxX(bounds), CGRectGetMaxY(bounds));
CGContextStrokePath(ctx);
}

// draw the line
CGContextRef ctx = UIGraphicsGetCurrentContext();
CGContextSetLineWidth(ctx, 1.0);
CGContextSetStrokeColorWithColor(ctx, kDarkGrayColor.CGColor);
CGContextMoveToPoint(ctx, 0, CGRectGetMaxY(bounds));
CGContextAddLineToPoint( ctx, CGRectGetMaxX(bounds), CGRectGetMaxY(bounds));
CGContextStrokePath(ctx);

// icon
[_iconImage drawAtPoint:CGPointMake(kImageLeftMargin, kImageTopMargin)];
Expand All @@ -98,8 +86,7 @@ - (void)drawRect:(CGRect)rect {


- (void)layoutSubviews {
if (self.style == BITAppStoreHeaderStyleOS7)
self.backgroundColor = kWhiteBackgroundColorOS7;
self.backgroundColor = kWhiteBackgroundColorOS7;

[super layoutSubviews];

Expand Down Expand Up @@ -151,10 +138,7 @@ - (void)setIconImage:(UIImage *)anIconImage {

// scale, make borders and reflection
_iconImage = bit_imageToFitSize(anIconImage, CGSizeMake(kImageHeight, kImageHeight), YES);
CGFloat radius = kImageBorderRadius;
if (self.style == BITAppStoreHeaderStyleOS7)
radius = kImageBorderRadiusiOS7;
_iconImage = bit_roundedCornerImage(_iconImage, radius, 0.0);
_iconImage = bit_roundedCornerImage(_iconImage, kImageBorderRadiusiOS7, 0.0);

[self setNeedsDisplay];
}
Expand Down
1 change: 0 additions & 1 deletion Classes/BITApplication.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ @implementation BITApplication

///
/// Adds all members of this class to a dictionary
/// @param dictionary to which the members of this class will be added.
///
- (NSDictionary *)serializeToDictionary {
NSMutableDictionary *dict = [super serializeToDictionary].mutableCopy;
Expand Down
1 change: 1 addition & 0 deletions Classes/BITAuthenticationViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N

if (0 == [indexPath row]) {
textField.placeholder = BITHockeyLocalizedString(@"HockeyAuthenticationViewControllerEmailPlaceholder");
textField.accessibilityHint = BITHockeyLocalizedString(@"HockeyAccessibilityHintRequired");
textField.text = self.email;
_emailField = textField;

Expand Down
2 changes: 1 addition & 1 deletion Classes/BITBase.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ @implementation BITBase

///
/// Adds all members of this class to a dictionary
/// @param dictionary to which the members of this class will be added.
/// @returns dictionary to which the members of this class will be added.
///
- (NSDictionary *)serializeToDictionary {
NSMutableDictionary *dict = [super serializeToDictionary].mutableCopy;
Expand Down
3 changes: 1 addition & 2 deletions Classes/BITChannelPrivate.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,14 @@ FOUNDATION_EXPORT NSString *const BITChannelBlockedNotification;
/**
* A C function that serializes a given dictionary to JSON and appends it to a char string
*
* @param dictionary A dictionary which will be serialized to JSON and then appended to the string.
* @param string The C string which the dictionary's JSON representation will be appended to.
*/
void bit_appendStringToSafeJsonStream(NSString *string, char *__nonnull*__nonnull jsonStream);

/**
* Reset BITSafeJsonEventsString so we can start appending JSON dictionaries.
*
* @param string The string that will be reset.
* @param jsonStream The string that will be reset.
*/
void bit_resetSafeJsonStream(char *__nonnull*__nonnull jsonStream);

Expand Down
27 changes: 24 additions & 3 deletions Classes/BITCrashManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -1154,10 +1154,18 @@ - (void)invokeDelayedProcessing {
}
}

- (void)startManagerInXamarinEnvironment {
[self startManagerInSdkEnvironment:BITSdkEnvironmentXamarin];
}

- (void)startManager {
[self startManagerInSdkEnvironment:BITSdkEnvironmentNative];
}

/**
* Main startup sequence initializing PLCrashReporter if it wasn't disabled
*/
- (void)startManager {
- (void)startManagerInSdkEnvironment:(BITSdkEnvironment)sdkEnvironment {
if (_crashManagerStatus == BITCrashManagerStatusDisabled) return;

[self registerObservers];
Expand All @@ -1179,8 +1187,21 @@ - (void)startManager {
symbolicationStrategy = PLCrashReporterSymbolicationStrategyAll;
}

BITPLCrashReporterConfig *config = [[BITPLCrashReporterConfig alloc] initWithSignalHandlerType: signalHandlerType
symbolicationStrategy: symbolicationStrategy];
BITPLCrashReporterConfig *config;

switch (sdkEnvironment) {
case BITSdkEnvironmentXamarin:
config = [[BITPLCrashReporterConfig alloc] initWithSignalHandlerType: signalHandlerType
symbolicationStrategy: symbolicationStrategy
shouldRegisterUncaughtExceptionHandler:NO];

break;
default:
config = [[BITPLCrashReporterConfig alloc] initWithSignalHandlerType: signalHandlerType
symbolicationStrategy: symbolicationStrategy];
break;
}

self.plCrashReporter = [[BITPLCrashReporter alloc] initWithConfiguration: config];

// Check if we previously crashed
Expand Down
2 changes: 2 additions & 0 deletions Classes/BITCrashManagerPrivate.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@

- (instancetype)initWithAppIdentifier:(NSString *)appIdentifier appEnvironment:(BITEnvironment)environment hockeyAppClient:(BITHockeyAppClient *)hockeyAppClient NS_DESIGNATED_INITIALIZER;

- (void)startManagerInXamarinEnvironment;

- (void)cleanCrashReports;

- (NSString *)userIDForCrashReport;
Expand Down
6 changes: 3 additions & 3 deletions Classes/BITCrashReportTextFormatter.m
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ @implementation BITCrashReportTextFormatter
* the formatted result as a string.
*
* @param report The report to format.
* @param textFormat The text format to use.
* @param crashReporterKey The crash reporter key.
*
* @return Returns the formatted result on success, or nil if an error occurs.
*/
Expand Down Expand Up @@ -628,7 +628,7 @@ + (NSString *)stringValueForCrashReport:(BITPLCrashReport *)report crashReporter
*
* @param regName The name of the register to use for getting the address
* @param thread The crashed thread
* @param images NSArray of binary images
* @param report The crash report.
*
* @return The selector as a C string or NULL if no selector was found
*/
Expand Down Expand Up @@ -901,7 +901,7 @@ + (NSString *)bit_formatStackFrame: (BITPLCrashReportStackFrameInfo *) frameInfo
* This is only necessary when sending crashes from the simulator as the path
* then contains the username of the Mac the simulator is running on.
*
* @param processPath A string containing the username
* @param path A string containing the username.
*
* @return An anonymized string where the real username is replaced by "USER"
*/
Expand Down
2 changes: 1 addition & 1 deletion Classes/BITData.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ @implementation BITData

///
/// Adds all members of this class to a dictionary
/// @param dictionary to which the members of this class will be added.
/// @returns dictionary to which the members of this class will be added.
///
- (NSDictionary *)serializeToDictionary {
NSMutableDictionary *dict = [super serializeToDictionary].mutableCopy;
Expand Down
2 changes: 1 addition & 1 deletion Classes/BITDevice.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ @implementation BITDevice

///
/// Adds all members of this class to a dictionary
/// @param dictionary to which the members of this class will be added.
/// @returns dictionary to which the members of this class will be added.
///
- (NSDictionary *)serializeToDictionary {
NSMutableDictionary *dict = [super serializeToDictionary].mutableCopy;
Expand Down
2 changes: 1 addition & 1 deletion Classes/BITDomain.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ - (instancetype)init {

///
/// Adds all members of this class to a dictionary
/// @param dictionary to which the members of this class will be added.
/// @returns dictionary to which the members of this class will be added.
///
- (NSDictionary *)serializeToDictionary {
NSMutableDictionary *dict = [super serializeToDictionary].mutableCopy;
Expand Down
2 changes: 1 addition & 1 deletion Classes/BITEnvelope.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ - (instancetype)init {

///
/// Adds all members of this class to a dictionary
/// @param dictionary to which the members of this class will be added.
/// @returns dictionary to which the members of this class will be added.
///
- (NSDictionary *)serializeToDictionary {
NSMutableDictionary *dict = [super serializeToDictionary].mutableCopy;
Expand Down
2 changes: 1 addition & 1 deletion Classes/BITEventData.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ - (instancetype)init {

///
/// Adds all members of this class to a dictionary
/// @param dictionary to which the members of this class will be added.
/// @returns dictionary to which the members of this class will be added.
///
- (NSDictionary *)serializeToDictionary {
NSMutableDictionary *dict = [super serializeToDictionary].mutableCopy;
Expand Down
4 changes: 3 additions & 1 deletion Classes/BITFeedbackComposeViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ - (void)viewDidLoad {
self.textView.backgroundColor = [UIColor whiteColor];
self.textView.returnKeyType = UIReturnKeyDefault;
self.textView.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight;
self.textView.accessibilityHint = BITHockeyLocalizedString(@"HockeyAccessibilityHintRequired");

[self.contentViewContainer addSubview:self.textView];

Expand Down Expand Up @@ -499,6 +500,7 @@ - (void)addPhotoAction:(id)sender {
pickerController.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
pickerController.delegate = self;
pickerController.editing = NO;
pickerController.navigationBar.barStyle = self.manager.barStyle;
[self presentViewController:pickerController animated:YES completion:nil];
}

Expand Down Expand Up @@ -662,7 +664,7 @@ - (void)editAction {
BITFeedbackMessageAttachment *attachment = self.imageAttachments[self.selectedAttachmentIndex];
BITImageAnnotationViewController *annotationEditor = [[BITImageAnnotationViewController alloc ] init];
annotationEditor.delegate = self;
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:annotationEditor];
UINavigationController *navController = [self.manager customNavigationControllerWithRootViewController:annotationEditor presentationStyle:UIModalPresentationFullScreen];
annotationEditor.image = attachment.imageRepresentation;
[self presentViewController:navController animated:YES completion:nil];
}
Expand Down
17 changes: 0 additions & 17 deletions Classes/BITFeedbackListViewCell.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,6 @@

@end


/**
* Cell style depending on the iOS version
*/
typedef NS_ENUM(NSUInteger, BITFeedbackListViewCellPresentationStyle) {
/**
* Default is iOS 6 style
*/
BITFeedbackListViewCellPresentationStyleDefault = 0,
/**
* Draw cells in the iOS 7 style
*/
BITFeedbackListViewCellPresentationStyleOS7 = 1
};

/**
* Cell background style
*/
Expand All @@ -73,8 +58,6 @@ typedef NS_ENUM(NSUInteger, BITFeedbackListViewCellBackgroundStyle) {

@property (nonatomic, strong) BITFeedbackMessage *message;

@property (nonatomic) BITFeedbackListViewCellPresentationStyle style;

@property (nonatomic) BITFeedbackListViewCellBackgroundStyle backgroundStyle;

@property (nonatomic, strong) BITAttributedLabel *labelText;
Expand Down
22 changes: 8 additions & 14 deletions Classes/BITFeedbackListViewCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSStr
if (self) {
// Initialization code
_backgroundStyle = BITFeedbackListViewCellBackgroundStyleNormal;
_style = BITFeedbackListViewCellPresentationStyleDefault;

_message = nil;

Expand Down Expand Up @@ -164,17 +163,9 @@ - (void) updateAttachmentFromNotification:(NSNotification *)note {
- (UIColor *)backgroundColor {

if (self.backgroundStyle == BITFeedbackListViewCellBackgroundStyleNormal) {
if (self.style == BITFeedbackListViewCellPresentationStyleDefault) {
return BACKGROUNDCOLOR_DEFAULT;
} else {
return BACKGROUNDCOLOR_DEFAULT_OS7;
}
return BACKGROUNDCOLOR_DEFAULT_OS7;
} else {
if (self.style == BITFeedbackListViewCellPresentationStyleDefault) {
return BACKGROUNDCOLOR_ALTERNATE;
} else {
return BACKGROUNDCOLOR_ALTERNATE_OS7;
}
return BACKGROUNDCOLOR_ALTERNATE_OS7;
}
}

Expand Down Expand Up @@ -274,9 +265,7 @@ - (void)layoutSubviews {
self.accessoryBackgroundView.backgroundColor = [self backgroundColor];
}

if (self.style == BITFeedbackListViewCellPresentationStyleDefault) {
[self addSubview:self.accessoryBackgroundView];
} else if (self.accessoryBackgroundView.superview){
if (self.accessoryBackgroundView.superview){
[self.accessoryBackgroundView removeFromSuperview];
}
self.contentView.backgroundColor = [self backgroundColor];
Expand Down Expand Up @@ -367,6 +356,11 @@ - (void)imageButtonPressed:(id)sender {
}
}

- (NSString *)accessibilityLabel {
NSString *messageTime = [self.labelTitle accessibilityLabel];
NSString *messageText = [self.labelText accessibilityLabel];
return [NSString stringWithFormat:@"%@, %@", messageTime, messageText];
}

@end

Expand Down
Loading

0 comments on commit ddda084

Please sign in to comment.