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

Commit ddda084

Browse files
author
Benjamin Scholtysik (Reimold)
authored
Merge pull request #413 from bitstadium/release/4.1.5
Release/4.1.5
2 parents 52ff733 + e54ce73 commit ddda084

File tree

78 files changed

+302
-503
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+302
-503
lines changed

.travis.yml

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
language: objective-c
2-
osx_image: xcode8
2+
osx_image: xcode8.3
33

44
env:
55
global:
@@ -8,11 +8,15 @@ env:
88
- CONFIGURATION="DEBUG"
99

1010
matrix:
11+
- SCHEME="HockeySDK" DESTINATION="OS=8.1,name=iPad Air" RUN_TESTS="YES"
12+
- SCHEME="HockeySDK" DESTINATION="OS=8.2,name=iPhone 6 Plus" RUN_TESTS="YES"
13+
- SCHEME="HockeySDK" DESTINATION="OS=8.3,name=iPad 2" RUN_TESTS="YES"
14+
- SCHEME="HockeySDK" DESTINATION="OS=8.4,name=iPhone 4s" RUN_TESTS="YES"
1115
- SCHEME="HockeySDK" DESTINATION="OS=9.0,name=iPad Air" RUN_TESTS="YES"
1216
- SCHEME="HockeySDK" DESTINATION="OS=9.1,name=iPhone 6 Plus" RUN_TESTS="YES"
13-
- SCHEME="HockeySDK" DESTINATION="OS=9.2,name=iPad Pro" RUN_TESTS="YES"
14-
- SCHEME="HockeySDK" DESTINATION="OS=9.3,name=iPhone 6s" RUN_TESTS="YES"
15-
- SCHEME="HockeySDK Framework" DESTINATION="platform=iOS Simulator,OS=9.3,name=iPhone 6" RUN_TESTS="YES"
17+
- SCHEME="HockeySDK" DESTINATION="OS=10.2,name=iPad Pro (9.7-inch)" RUN_TESTS="YES"
18+
- SCHEME="HockeySDK" DESTINATION="OS=10.3,name=iPhone 6s" RUN_TESTS="YES"
19+
- SCHEME="HockeySDK Framework" DESTINATION="platform=iOS Simulator,OS=10.3,name=iPhone 6" RUN_TESTS="YES"
1620
- SCHEME="HockeySDK Distribution" RUN_TESTS="NO" LINT="YES"
1721

1822
before_install:

Classes/BITAppStoreHeader.h

-16
Original file line numberDiff line numberDiff line change
@@ -35,26 +35,10 @@
3535
#define __IPHONE_6_1 60100
3636
#endif
3737

38-
39-
/**
40-
* Header style depending on the iOS version
41-
*/
42-
typedef NS_ENUM(NSUInteger, BITAppStoreHeaderStyle) {
43-
/**
44-
* Default is iOS 6 style
45-
*/
46-
BITAppStoreHeaderStyleDefault = 0,
47-
/**
48-
* Draw header in the iOS 7 style
49-
*/
50-
BITAppStoreHeaderStyleOS7 = 1
51-
};
52-
5338
@interface BITAppStoreHeader : UIView
5439

5540
@property (nonatomic, copy) NSString *headerText;
5641
@property (nonatomic, copy) NSString *subHeaderText;
5742
@property (nonatomic, strong) UIImage *iconImage;
58-
@property (nonatomic, assign) BITAppStoreHeaderStyle style;
5943

6044
@end

Classes/BITAppStoreHeader.m

+10-26
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ - (instancetype)initWithFrame:(CGRect)frame {
6060
if ((self = [super initWithFrame:frame])) {
6161
self.autoresizingMask = UIViewAutoresizingFlexibleWidth;
6262
self.backgroundColor = kWhiteBackgroundColorDefault;
63-
self.style = BITAppStoreHeaderStyleDefault;
6463
}
6564
return self;
6665
}
@@ -70,25 +69,14 @@ - (instancetype)initWithFrame:(CGRect)frame {
7069

7170
- (void)drawRect:(CGRect)rect {
7271
CGRect bounds = self.bounds;
73-
CGContextRef context = UIGraphicsGetCurrentContext();
74-
75-
if (self.style == BITAppStoreHeaderStyleDefault) {
76-
// draw the gradient
77-
NSArray *colors = [NSArray arrayWithObjects:(id)kDarkGrayColor.CGColor, (id)kLightGrayColor.CGColor, nil];
78-
CGGradientRef gradient = CGGradientCreateWithColors(CGColorGetColorSpace((__bridge CGColorRef)[colors objectAtIndex:0]), (__bridge CFArrayRef)colors, (CGFloat[2]){0, 1});
79-
CGPoint top = CGPointMake(CGRectGetMidX(bounds), bounds.size.height - 3);
80-
CGPoint bottom = CGPointMake(CGRectGetMidX(bounds), CGRectGetMaxY(bounds));
81-
CGContextDrawLinearGradient(context, gradient, top, bottom, 0);
82-
CGGradientRelease(gradient);
83-
} else {
84-
// draw the line
85-
CGContextRef ctx = UIGraphicsGetCurrentContext();
86-
CGContextSetLineWidth(ctx, 1.0);
87-
CGContextSetStrokeColorWithColor(ctx, kDarkGrayColor.CGColor);
88-
CGContextMoveToPoint(ctx, 0, CGRectGetMaxY(bounds));
89-
CGContextAddLineToPoint( ctx, CGRectGetMaxX(bounds), CGRectGetMaxY(bounds));
90-
CGContextStrokePath(ctx);
91-
}
72+
73+
// draw the line
74+
CGContextRef ctx = UIGraphicsGetCurrentContext();
75+
CGContextSetLineWidth(ctx, 1.0);
76+
CGContextSetStrokeColorWithColor(ctx, kDarkGrayColor.CGColor);
77+
CGContextMoveToPoint(ctx, 0, CGRectGetMaxY(bounds));
78+
CGContextAddLineToPoint( ctx, CGRectGetMaxX(bounds), CGRectGetMaxY(bounds));
79+
CGContextStrokePath(ctx);
9280

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

9987

10088
- (void)layoutSubviews {
101-
if (self.style == BITAppStoreHeaderStyleOS7)
102-
self.backgroundColor = kWhiteBackgroundColorOS7;
89+
self.backgroundColor = kWhiteBackgroundColorOS7;
10390

10491
[super layoutSubviews];
10592

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

152139
// scale, make borders and reflection
153140
_iconImage = bit_imageToFitSize(anIconImage, CGSizeMake(kImageHeight, kImageHeight), YES);
154-
CGFloat radius = kImageBorderRadius;
155-
if (self.style == BITAppStoreHeaderStyleOS7)
156-
radius = kImageBorderRadiusiOS7;
157-
_iconImage = bit_roundedCornerImage(_iconImage, radius, 0.0);
141+
_iconImage = bit_roundedCornerImage(_iconImage, kImageBorderRadiusiOS7, 0.0);
158142

159143
[self setNeedsDisplay];
160144
}

Classes/BITApplication.m

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ @implementation BITApplication
55

66
///
77
/// Adds all members of this class to a dictionary
8-
/// @param dictionary to which the members of this class will be added.
98
///
109
- (NSDictionary *)serializeToDictionary {
1110
NSMutableDictionary *dict = [super serializeToDictionary].mutableCopy;

Classes/BITAuthenticationViewController.m

+1
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
207207

208208
if (0 == [indexPath row]) {
209209
textField.placeholder = BITHockeyLocalizedString(@"HockeyAuthenticationViewControllerEmailPlaceholder");
210+
textField.accessibilityHint = BITHockeyLocalizedString(@"HockeyAccessibilityHintRequired");
210211
textField.text = self.email;
211212
_emailField = textField;
212213

Classes/BITBase.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ @implementation BITBase
55

66
///
77
/// Adds all members of this class to a dictionary
8-
/// @param dictionary to which the members of this class will be added.
8+
/// @returns dictionary to which the members of this class will be added.
99
///
1010
- (NSDictionary *)serializeToDictionary {
1111
NSMutableDictionary *dict = [super serializeToDictionary].mutableCopy;

Classes/BITChannelPrivate.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,14 @@ FOUNDATION_EXPORT NSString *const BITChannelBlockedNotification;
8282
/**
8383
* A C function that serializes a given dictionary to JSON and appends it to a char string
8484
*
85-
* @param dictionary A dictionary which will be serialized to JSON and then appended to the string.
8685
* @param string The C string which the dictionary's JSON representation will be appended to.
8786
*/
8887
void bit_appendStringToSafeJsonStream(NSString *string, char *__nonnull*__nonnull jsonStream);
8988

9089
/**
9190
* Reset BITSafeJsonEventsString so we can start appending JSON dictionaries.
9291
*
93-
* @param string The string that will be reset.
92+
* @param jsonStream The string that will be reset.
9493
*/
9594
void bit_resetSafeJsonStream(char *__nonnull*__nonnull jsonStream);
9695

Classes/BITCrashManager.m

+24-3
Original file line numberDiff line numberDiff line change
@@ -1154,10 +1154,18 @@ - (void)invokeDelayedProcessing {
11541154
}
11551155
}
11561156

1157+
- (void)startManagerInXamarinEnvironment {
1158+
[self startManagerInSdkEnvironment:BITSdkEnvironmentXamarin];
1159+
}
1160+
1161+
- (void)startManager {
1162+
[self startManagerInSdkEnvironment:BITSdkEnvironmentNative];
1163+
}
1164+
11571165
/**
11581166
* Main startup sequence initializing PLCrashReporter if it wasn't disabled
11591167
*/
1160-
- (void)startManager {
1168+
- (void)startManagerInSdkEnvironment:(BITSdkEnvironment)sdkEnvironment {
11611169
if (_crashManagerStatus == BITCrashManagerStatusDisabled) return;
11621170

11631171
[self registerObservers];
@@ -1179,8 +1187,21 @@ - (void)startManager {
11791187
symbolicationStrategy = PLCrashReporterSymbolicationStrategyAll;
11801188
}
11811189

1182-
BITPLCrashReporterConfig *config = [[BITPLCrashReporterConfig alloc] initWithSignalHandlerType: signalHandlerType
1183-
symbolicationStrategy: symbolicationStrategy];
1190+
BITPLCrashReporterConfig *config;
1191+
1192+
switch (sdkEnvironment) {
1193+
case BITSdkEnvironmentXamarin:
1194+
config = [[BITPLCrashReporterConfig alloc] initWithSignalHandlerType: signalHandlerType
1195+
symbolicationStrategy: symbolicationStrategy
1196+
shouldRegisterUncaughtExceptionHandler:NO];
1197+
1198+
break;
1199+
default:
1200+
config = [[BITPLCrashReporterConfig alloc] initWithSignalHandlerType: signalHandlerType
1201+
symbolicationStrategy: symbolicationStrategy];
1202+
break;
1203+
}
1204+
11841205
self.plCrashReporter = [[BITPLCrashReporter alloc] initWithConfiguration: config];
11851206

11861207
// Check if we previously crashed

Classes/BITCrashManagerPrivate.h

+2
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@
8585

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

88+
- (void)startManagerInXamarinEnvironment;
89+
8890
- (void)cleanCrashReports;
8991

9092
- (NSString *)userIDForCrashReport;

Classes/BITCrashReportTextFormatter.m

+3-3
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ @implementation BITCrashReportTextFormatter
202202
* the formatted result as a string.
203203
*
204204
* @param report The report to format.
205-
* @param textFormat The text format to use.
205+
* @param crashReporterKey The crash reporter key.
206206
*
207207
* @return Returns the formatted result on success, or nil if an error occurs.
208208
*/
@@ -628,7 +628,7 @@ + (NSString *)stringValueForCrashReport:(BITPLCrashReport *)report crashReporter
628628
*
629629
* @param regName The name of the register to use for getting the address
630630
* @param thread The crashed thread
631-
* @param images NSArray of binary images
631+
* @param report The crash report.
632632
*
633633
* @return The selector as a C string or NULL if no selector was found
634634
*/
@@ -901,7 +901,7 @@ + (NSString *)bit_formatStackFrame: (BITPLCrashReportStackFrameInfo *) frameInfo
901901
* This is only necessary when sending crashes from the simulator as the path
902902
* then contains the username of the Mac the simulator is running on.
903903
*
904-
* @param processPath A string containing the username
904+
* @param path A string containing the username.
905905
*
906906
* @return An anonymized string where the real username is replaced by "USER"
907907
*/

Classes/BITData.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ @implementation BITData
66

77
///
88
/// Adds all members of this class to a dictionary
9-
/// @param dictionary to which the members of this class will be added.
9+
/// @returns dictionary to which the members of this class will be added.
1010
///
1111
- (NSDictionary *)serializeToDictionary {
1212
NSMutableDictionary *dict = [super serializeToDictionary].mutableCopy;

Classes/BITDevice.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ @implementation BITDevice
55

66
///
77
/// Adds all members of this class to a dictionary
8-
/// @param dictionary to which the members of this class will be added.
8+
/// @returns dictionary to which the members of this class will be added.
99
///
1010
- (NSDictionary *)serializeToDictionary {
1111
NSMutableDictionary *dict = [super serializeToDictionary].mutableCopy;

Classes/BITDomain.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ - (instancetype)init {
1616

1717
///
1818
/// Adds all members of this class to a dictionary
19-
/// @param dictionary to which the members of this class will be added.
19+
/// @returns dictionary to which the members of this class will be added.
2020
///
2121
- (NSDictionary *)serializeToDictionary {
2222
NSMutableDictionary *dict = [super serializeToDictionary].mutableCopy;

Classes/BITEnvelope.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ - (instancetype)init {
1717

1818
///
1919
/// Adds all members of this class to a dictionary
20-
/// @param dictionary to which the members of this class will be added.
20+
/// @returns dictionary to which the members of this class will be added.
2121
///
2222
- (NSDictionary *)serializeToDictionary {
2323
NSMutableDictionary *dict = [super serializeToDictionary].mutableCopy;

Classes/BITEventData.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ - (instancetype)init {
2222

2323
///
2424
/// Adds all members of this class to a dictionary
25-
/// @param dictionary to which the members of this class will be added.
25+
/// @returns dictionary to which the members of this class will be added.
2626
///
2727
- (NSDictionary *)serializeToDictionary {
2828
NSMutableDictionary *dict = [super serializeToDictionary].mutableCopy;

Classes/BITFeedbackComposeViewController.m

+3-1
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ - (void)viewDidLoad {
232232
self.textView.backgroundColor = [UIColor whiteColor];
233233
self.textView.returnKeyType = UIReturnKeyDefault;
234234
self.textView.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight;
235+
self.textView.accessibilityHint = BITHockeyLocalizedString(@"HockeyAccessibilityHintRequired");
235236

236237
[self.contentViewContainer addSubview:self.textView];
237238

@@ -499,6 +500,7 @@ - (void)addPhotoAction:(id)sender {
499500
pickerController.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
500501
pickerController.delegate = self;
501502
pickerController.editing = NO;
503+
pickerController.navigationBar.barStyle = self.manager.barStyle;
502504
[self presentViewController:pickerController animated:YES completion:nil];
503505
}
504506

@@ -662,7 +664,7 @@ - (void)editAction {
662664
BITFeedbackMessageAttachment *attachment = self.imageAttachments[self.selectedAttachmentIndex];
663665
BITImageAnnotationViewController *annotationEditor = [[BITImageAnnotationViewController alloc ] init];
664666
annotationEditor.delegate = self;
665-
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:annotationEditor];
667+
UINavigationController *navController = [self.manager customNavigationControllerWithRootViewController:annotationEditor presentationStyle:UIModalPresentationFullScreen];
666668
annotationEditor.image = attachment.imageRepresentation;
667669
[self presentViewController:navController animated:YES completion:nil];
668670
}

Classes/BITFeedbackListViewCell.h

-17
Original file line numberDiff line numberDiff line change
@@ -39,21 +39,6 @@
3939

4040
@end
4141

42-
43-
/**
44-
* Cell style depending on the iOS version
45-
*/
46-
typedef NS_ENUM(NSUInteger, BITFeedbackListViewCellPresentationStyle) {
47-
/**
48-
* Default is iOS 6 style
49-
*/
50-
BITFeedbackListViewCellPresentationStyleDefault = 0,
51-
/**
52-
* Draw cells in the iOS 7 style
53-
*/
54-
BITFeedbackListViewCellPresentationStyleOS7 = 1
55-
};
56-
5742
/**
5843
* Cell background style
5944
*/
@@ -73,8 +58,6 @@ typedef NS_ENUM(NSUInteger, BITFeedbackListViewCellBackgroundStyle) {
7358

7459
@property (nonatomic, strong) BITFeedbackMessage *message;
7560

76-
@property (nonatomic) BITFeedbackListViewCellPresentationStyle style;
77-
7861
@property (nonatomic) BITFeedbackListViewCellBackgroundStyle backgroundStyle;
7962

8063
@property (nonatomic, strong) BITAttributedLabel *labelText;

Classes/BITFeedbackListViewCell.m

+8-14
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSStr
8888
if (self) {
8989
// Initialization code
9090
_backgroundStyle = BITFeedbackListViewCellBackgroundStyleNormal;
91-
_style = BITFeedbackListViewCellPresentationStyleDefault;
9291

9392
_message = nil;
9493

@@ -164,17 +163,9 @@ - (void) updateAttachmentFromNotification:(NSNotification *)note {
164163
- (UIColor *)backgroundColor {
165164

166165
if (self.backgroundStyle == BITFeedbackListViewCellBackgroundStyleNormal) {
167-
if (self.style == BITFeedbackListViewCellPresentationStyleDefault) {
168-
return BACKGROUNDCOLOR_DEFAULT;
169-
} else {
170-
return BACKGROUNDCOLOR_DEFAULT_OS7;
171-
}
166+
return BACKGROUNDCOLOR_DEFAULT_OS7;
172167
} else {
173-
if (self.style == BITFeedbackListViewCellPresentationStyleDefault) {
174-
return BACKGROUNDCOLOR_ALTERNATE;
175-
} else {
176-
return BACKGROUNDCOLOR_ALTERNATE_OS7;
177-
}
168+
return BACKGROUNDCOLOR_ALTERNATE_OS7;
178169
}
179170
}
180171

@@ -274,9 +265,7 @@ - (void)layoutSubviews {
274265
self.accessoryBackgroundView.backgroundColor = [self backgroundColor];
275266
}
276267

277-
if (self.style == BITFeedbackListViewCellPresentationStyleDefault) {
278-
[self addSubview:self.accessoryBackgroundView];
279-
} else if (self.accessoryBackgroundView.superview){
268+
if (self.accessoryBackgroundView.superview){
280269
[self.accessoryBackgroundView removeFromSuperview];
281270
}
282271
self.contentView.backgroundColor = [self backgroundColor];
@@ -367,6 +356,11 @@ - (void)imageButtonPressed:(id)sender {
367356
}
368357
}
369358

359+
- (NSString *)accessibilityLabel {
360+
NSString *messageTime = [self.labelTitle accessibilityLabel];
361+
NSString *messageText = [self.labelText accessibilityLabel];
362+
return [NSString stringWithFormat:@"%@, %@", messageTime, messageText];
363+
}
370364

371365
@end
372366

0 commit comments

Comments
 (0)