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

Bump version and write changelog #528

Merged
merged 40 commits into from
Sep 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
9ac2f14
Use UIAlertController in the examples
MatkovIvan Jan 22, 2018
3ce7e4d
Merge pull request #507 from MatkovIvan/patch-1
Jan 22, 2018
d48961d
Bump deployment target to iOS 9
MatkovIvan Jan 24, 2018
84e99c5
Cleanup deprecations
MatkovIvan Jan 24, 2018
81ff8ed
Remove reduntant version checks
MatkovIvan Jan 24, 2018
4324a26
Fix images ratio in feedback's scrollview, remove action sheet delega…
MatkovIvan Jan 25, 2018
ea6b16c
Fix feedback's scrollview position on orientation change and on iPhone X
MatkovIvan Jan 25, 2018
2230076
Fix feedback layout on previous iOS versions
MatkovIvan Jan 25, 2018
95a6eb1
Cleanup deprecations
MatkovIvan Jan 25, 2018
5300f8a
Remove deprecated orientation callbacks
MatkovIvan Jan 25, 2018
ea0dcaf
Remove text metadata from png images
Jan 25, 2018
03d49e9
Set strip png text metadata option to NO
Jan 25, 2018
797fd06
Merge pull request #508 from MatkovIvan/feature/bump-minsdk-to-ios-9
Jan 25, 2018
e5c57e7
Merge pull request #509 from bmourat/fix/png-bundling
Jan 25, 2018
8277dd8
Use iOS 11 safe area for input accessory view
MatkovIvan Mar 28, 2018
133099c
Merge pull request #513 from MatkovIvan/fix/feedback-input-accessory-…
Mar 29, 2018
060c293
Make it possible to change current logging handler
piotrwach Apr 24, 2018
352f5b0
Remove code to magically authenticate using the itunesartwork. This i…
Jun 15, 2018
4f16b55
Merge pull request #520 from bitstadium/cleanup/remove-code-for-authe…
guperrot Jun 15, 2018
1dd0eff
Merge pull request #516 from piotrwach/dev/expose-logging-header
Jun 19, 2018
ba85743
Fix part of "Messaging unqualified id" warnings
MatkovIvan Jun 21, 2018
a7deca2
Add casting to avoid warnings
MatkovIvan Jun 21, 2018
011779d
Merge pull request #521 from MatkovIvan/fix/xcode10-warn
Jun 22, 2018
7c8aa1c
Fix application state check
MatkovIvan Jul 6, 2018
103efac
Merge pull request #523 from MatkovIvan/fix/terminate-detection
Jul 6, 2018
3551bd4
Remove the bitrise badge
Jul 18, 2018
ad93b06
Merge pull request #525 from bitstadium/fix/bitrise-badge
Jul 18, 2018
ca00851
Use correct built-in CPU subtypes
lumaxis Sep 21, 2018
8a6ba86
Remove no longer needed custom CPU subtype definitions
lumaxis Sep 21, 2018
60f3011
Minor formatting fixes
lumaxis Sep 21, 2018
b2519c1
Add temporary custom ARM V8.3 CPU subtype
lumaxis Sep 21, 2018
cb9bda2
Add handling of new arm64e CPU subtype
lumaxis Sep 21, 2018
357292d
Normalize 64bit addresses to remove possible pointer signatures
lumaxis Sep 21, 2018
d023277
Improve variable names for normalized memory addresses
lumaxis Sep 25, 2018
f8fd6cc
Merge pull request #527 from bitstadium/feature/arm64e
Sep 25, 2018
f864840
Bump version and write changelog
Sep 26, 2018
c4bd806
Update CPU subtype fallback definition to use Apple's own naming
lumaxis Sep 26, 2018
e54e85a
Merge pull request #530 from bitstadium/feature/arm64e
Sep 26, 2018
db0f569
Merge remote-tracking branch 'Public/develop' into release/5.1.3
Sep 26, 2018
9c33573
Merge branch 'master' into release/5.1.3
dhei Sep 27, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Classes/BITAppVersionMetaInfo.m
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ + (BITAppVersionMetaInfo *)appVersionMetaInfoFromDict:(NSDictionary *)dict {
appVersionMetaInfo.version = [dict objectForKey:@"version"];
appVersionMetaInfo.shortVersion = [dict objectForKey:@"shortversion"];
appVersionMetaInfo.minOSVersion = [dict objectForKey:@"minimum_os_version"];
[appVersionMetaInfo setDateWithTimestamp:[[dict objectForKey:@"timestamp"] doubleValue]];
[appVersionMetaInfo setDateWithTimestamp:[(NSNumber *)[dict objectForKey:@"timestamp"] doubleValue]];
appVersionMetaInfo.size = [dict objectForKey:@"appsize"];
appVersionMetaInfo.notes = [dict objectForKey:@"notes"];
appVersionMetaInfo.mandatory = [dict objectForKey:@"mandatory"];
Expand All @@ -62,7 +62,7 @@ + (BITAppVersionMetaInfo *)appVersionMetaInfoFromDict:(NSDictionary *)dict {
- (BOOL)isEqual:(id)other {
if (other == self)
return YES;
if (!other || ![other isKindOfClass:[self class]])
if (!other || ![(NSObject *)other isKindOfClass:[self class]])
return NO;
return [self isEqualToAppVersionMetaInfo:other];
}
Expand Down
45 changes: 22 additions & 23 deletions Classes/BITAttributedLabel.m
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#define kBITLineBreakWordWrapTextWidthScalingFactor (M_PI / M_E)

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#pragma clang diagnostic ignored "-Wunused-variable"
#pragma clang diagnostic ignored "-Wunused-parameter"
#pragma clang diagnostic ignored "-Wcast-qual"
Expand Down Expand Up @@ -882,9 +881,9 @@ - (void)drawBackground:(CTFrameRef)frame
NSDictionary *attributes = (__bridge NSDictionary *)CTRunGetAttributes((__bridge CTRunRef) glyphRun);
CGColorRef strokeColor = CGColorRefFromColor([attributes objectForKey:kBITBackgroundStrokeColorAttributeName]);
CGColorRef fillColor = CGColorRefFromColor([attributes objectForKey:kBITBackgroundFillColorAttributeName]);
UIEdgeInsets fillPadding = [[attributes objectForKey:kBITBackgroundFillPaddingAttributeName] UIEdgeInsetsValue];
CGFloat cornerRadius = [[attributes objectForKey:kBITBackgroundCornerRadiusAttributeName] floatValue];
CGFloat lineWidth = [[attributes objectForKey:kBITBackgroundLineWidthAttributeName] floatValue];
UIEdgeInsets fillPadding = [(NSValue *)[attributes objectForKey:kBITBackgroundFillPaddingAttributeName] UIEdgeInsetsValue];
CGFloat cornerRadius = [(NSNumber *)[attributes objectForKey:kBITBackgroundCornerRadiusAttributeName] floatValue];
CGFloat lineWidth = [(NSNumber *)[attributes objectForKey:kBITBackgroundLineWidthAttributeName] floatValue];

if (strokeColor || fillColor) {
CGRect runBounds = CGRectZero;
Expand Down Expand Up @@ -951,8 +950,8 @@ - (void)drawStrike:(CTFrameRef)frame

for (id glyphRun in (__bridge NSArray *)CTLineGetGlyphRuns((__bridge CTLineRef)line)) {
NSDictionary *attributes = (__bridge NSDictionary *)CTRunGetAttributes((__bridge CTRunRef) glyphRun);
BOOL strikeOut = [[attributes objectForKey:kBITStrikeOutAttributeName] boolValue];
NSInteger superscriptStyle = [[attributes objectForKey:(id)kCTSuperscriptAttributeName] integerValue];
BOOL strikeOut = [(NSNumber *)[attributes objectForKey:kBITStrikeOutAttributeName] boolValue];
NSInteger superscriptStyle = [(NSNumber *)[attributes objectForKey:(id)kCTSuperscriptAttributeName] integerValue];

if (strikeOut) {
CGRect runBounds = CGRectZero;
Expand Down Expand Up @@ -1019,9 +1018,9 @@ - (void)drawStrike:(CTFrameRef)frame
#pragma mark - BITAttributedLabel

- (void)setText:(id)text {
NSParameterAssert(!text || [text isKindOfClass:[NSAttributedString class]] || [text isKindOfClass:[NSString class]]);
NSParameterAssert(!text || [(NSObject *)text isKindOfClass:[NSAttributedString class]] || [(NSObject *)text isKindOfClass:[NSString class]]);

if ([text isKindOfClass:[NSString class]]) {
if ([(NSObject *)text isKindOfClass:[NSString class]]) {
[self setText:text afterInheritingLabelAttributesAndConfiguringWithBlock:nil];
return;
}
Expand Down Expand Up @@ -1051,7 +1050,7 @@ - (void)setText:(id)text {

[self.attributedText enumerateAttribute:NSLinkAttributeName inRange:NSMakeRange(0, self.attributedText.length) options:0 usingBlock:^(id value, NSRange range, __unused BOOL *stop) {
if (value) {
NSURL *URL = [value isKindOfClass:[NSString class]] ? [NSURL URLWithString:value] : value;
NSURL *URL = [(NSObject *)value isKindOfClass:[NSString class]] ? [NSURL URLWithString:value] : value;
[self addLinkToURL:URL withRange:range];
}
}];
Expand All @@ -1061,7 +1060,7 @@ - (void)setText:(id)text
afterInheritingLabelAttributesAndConfiguringWithBlock:(NSMutableAttributedString * (^)(NSMutableAttributedString *mutableAttributedString))block
{
NSMutableAttributedString *mutableAttributedString = nil;
if ([text isKindOfClass:[NSString class]]) {
if ([(NSObject *)text isKindOfClass:[NSString class]]) {
mutableAttributedString = [[NSMutableAttributedString alloc] initWithString:text attributes:NSAttributedStringAttributesFromLabel(self)];
} else {
mutableAttributedString = [[NSMutableAttributedString alloc] initWithAttributedString:text];
Expand Down Expand Up @@ -1299,7 +1298,7 @@ - (NSArray *)accessibilityElements {
continue;
}

NSString *sourceText = [self.text isKindOfClass:[NSString class]] ? self.text : [(NSAttributedString *)self.text string];
NSString *sourceText = [(NSObject *)self.text isKindOfClass:[NSString class]] ? self.text : [(NSAttributedString *)self.text string];

NSString *accessibilityLabel = [sourceText substringWithRange:link.result.range];
NSString *accessibilityValue = link.accessibilityValue;
Expand Down Expand Up @@ -1631,7 +1630,7 @@ - (id)initWithCoder:(NSCoder *)coder {
[self commonInit];

if ([coder containsValueForKey:NSStringFromSelector(@selector(enabledTextCheckingTypes))]) {
self.enabledTextCheckingTypes = [[coder decodeObjectForKey:NSStringFromSelector(@selector(enabledTextCheckingTypes))] unsignedLongLongValue];
self.enabledTextCheckingTypes = [(NSNumber *)[coder decodeObjectForKey:NSStringFromSelector(@selector(enabledTextCheckingTypes))] unsignedLongLongValue];
}

if ([NSMutableParagraphStyle class]) {
Expand All @@ -1658,11 +1657,11 @@ - (id)initWithCoder:(NSCoder *)coder {
}

if ([coder containsValueForKey:NSStringFromSelector(@selector(shadowRadius))]) {
self.shadowRadius = [[coder decodeObjectForKey:NSStringFromSelector(@selector(shadowRadius))] floatValue];
self.shadowRadius = [(NSNumber *)[coder decodeObjectForKey:NSStringFromSelector(@selector(shadowRadius))] floatValue];
}

if ([coder containsValueForKey:NSStringFromSelector(@selector(highlightedShadowRadius))]) {
self.highlightedShadowRadius = [[coder decodeObjectForKey:NSStringFromSelector(@selector(highlightedShadowRadius))] floatValue];
self.highlightedShadowRadius = [(NSNumber *)[coder decodeObjectForKey:NSStringFromSelector(@selector(highlightedShadowRadius))] floatValue];
}

if ([coder containsValueForKey:NSStringFromSelector(@selector(highlightedShadowOffset))]) {
Expand All @@ -1674,27 +1673,27 @@ - (id)initWithCoder:(NSCoder *)coder {
}

if ([coder containsValueForKey:NSStringFromSelector(@selector(kern))]) {
self.kern = [[coder decodeObjectForKey:NSStringFromSelector(@selector(kern))] floatValue];
self.kern = [(NSNumber *)[coder decodeObjectForKey:NSStringFromSelector(@selector(kern))] floatValue];
}

if ([coder containsValueForKey:NSStringFromSelector(@selector(firstLineIndent))]) {
self.firstLineIndent = [[coder decodeObjectForKey:NSStringFromSelector(@selector(firstLineIndent))] floatValue];
self.firstLineIndent = [(NSNumber *)[coder decodeObjectForKey:NSStringFromSelector(@selector(firstLineIndent))] floatValue];
}

if ([coder containsValueForKey:NSStringFromSelector(@selector(lineSpacing))]) {
self.lineSpacing = [[coder decodeObjectForKey:NSStringFromSelector(@selector(lineSpacing))] floatValue];
self.lineSpacing = [(NSNumber *)[coder decodeObjectForKey:NSStringFromSelector(@selector(lineSpacing))] floatValue];
}

if ([coder containsValueForKey:NSStringFromSelector(@selector(minimumLineHeight))]) {
self.minimumLineHeight = [[coder decodeObjectForKey:NSStringFromSelector(@selector(minimumLineHeight))] floatValue];
self.minimumLineHeight = [(NSNumber *)[coder decodeObjectForKey:NSStringFromSelector(@selector(minimumLineHeight))] floatValue];
}

if ([coder containsValueForKey:NSStringFromSelector(@selector(maximumLineHeight))]) {
self.maximumLineHeight = [[coder decodeObjectForKey:NSStringFromSelector(@selector(maximumLineHeight))] floatValue];
self.maximumLineHeight = [(NSNumber *)[coder decodeObjectForKey:NSStringFromSelector(@selector(maximumLineHeight))] floatValue];
}

if ([coder containsValueForKey:NSStringFromSelector(@selector(lineHeightMultiple))]) {
self.lineHeightMultiple = [[coder decodeObjectForKey:NSStringFromSelector(@selector(lineHeightMultiple))] floatValue];
self.lineHeightMultiple = [(NSNumber *)[coder decodeObjectForKey:NSStringFromSelector(@selector(lineHeightMultiple))] floatValue];
}

if ([coder containsValueForKey:NSStringFromSelector(@selector(textInsets))]) {
Expand Down Expand Up @@ -1803,7 +1802,7 @@ - (id)initWithCoder:(NSCoder *)aDecoder {
#pragma mark -

static inline CGColorRef CGColorRefFromColor(id color) {
return [color isKindOfClass:[UIColor class]] ? [color CGColor] : (__bridge CGColorRef)color;
return [(NSObject *)color isKindOfClass:[UIColor class]] ? [(UIColor *)color CGColor] : (__bridge CGColorRef)color;
}

static inline CTFontRef CTFontRefFromUIFont(UIFont * font) {
Expand Down Expand Up @@ -1832,9 +1831,9 @@ static inline CTFontRef CTFontRefFromUIFont(UIFont * font) {
key = [NSToCTAttributeNamesMap objectForKey:key] ? : key;

if (![NSMutableParagraphStyle class]) {
if ([value isKindOfClass:[UIFont class]]) {
if ([(NSObject *)value isKindOfClass:[UIFont class]]) {
value = (__bridge id)CTFontRefFromUIFont(value);
} else if ([value isKindOfClass:[UIColor class]]) {
} else if ([(NSObject *)value isKindOfClass:[UIColor class]]) {
value = (__bridge id)((UIColor *)value).CGColor;
}
}
Expand Down
101 changes: 5 additions & 96 deletions Classes/BITAuthenticator.m
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@
static NSString *const kBITAuthenticatorAuthTokenTypeKey = @"BITAuthenticatorAuthTokenTypeKey";

typedef unsigned int bit_uint32;
static unsigned char kBITPNGHeader[8] = {137, 80, 78, 71, 13, 10, 26, 10};
static unsigned char kBITPNGEndChunk[4] = {0x49, 0x45, 0x4e, 0x44};


@interface BITAuthenticator()

Expand Down Expand Up @@ -158,7 +155,6 @@ - (void)identifyWithCompletion:(void (^)(BOOL identified, NSError *))completion
return;
}

[self processFullSizeImage];
if (self.identified) {
if (completion) { completion(YES, nil); }
return;
Expand Down Expand Up @@ -202,7 +198,7 @@ - (void)identifyWithCompletion:(void (^)(BOOL identified, NSError *))completion
viewController.tableViewTitle = BITHockeyLocalizedString(@"HockeyAuthenticationViewControllerDataEmailDescription");
break;
}
id strongDelegate = self.delegate;
id<BITAuthenticatorDelegate> strongDelegate = self.delegate;
if ([strongDelegate respondsToSelector:@selector(authenticator:willShowAuthenticationController:)]) {
[strongDelegate authenticator:self willShowAuthenticationController:viewController];
}
Expand Down Expand Up @@ -370,7 +366,7 @@ + (BOOL)isValidationResponseValid:(id)response error:(NSError *__autoreleasing *
}
return NO;
}
if (![jsonObject isKindOfClass:[NSDictionary class]]) {
if (![(NSObject *)jsonObject isKindOfClass:[NSDictionary class]]) {
if (error) {
*error = [NSError errorWithDomain:kBITAuthenticatorErrorDomain
code:BITAuthenticatorAPIServerReturnedInvalidResponse
Expand Down Expand Up @@ -587,7 +583,7 @@ + (NSString *)authenticationTokenFromURLResponse:(NSHTTPURLResponse *)urlRespons
options:0
error:&jsonParseError];
//no json or unexpected json
if (nil == jsonObject || ![jsonObject isKindOfClass:[NSDictionary class]]) {
if (nil == jsonObject || ![(NSObject *)jsonObject isKindOfClass:[NSDictionary class]]) {
if (error) {
NSDictionary *userInfo = @{NSLocalizedDescriptionKey:BITHockeyLocalizedString(@"HockeyAuthenticationFailedAuthenticate")};
if (jsonParseError) {
Expand Down Expand Up @@ -718,7 +714,7 @@ + (NSString *)UDIDFromOpenURL:(NSURL *)url annotation:(id) __unused annotation {
//there should actually only one
static NSString *const UDIDQuerySpecifier = @"udid";
for (NSString *queryComponents in [query componentsSeparatedByString:@"&"]) {
NSArray *parameterComponents = [queryComponents componentsSeparatedByString:@"="];
NSArray<NSString *> *parameterComponents = [queryComponents componentsSeparatedByString:@"="];
if (2 == parameterComponents.count && [parameterComponents[0] isEqualToString:UDIDQuerySpecifier]) {
udid = parameterComponents[1];
break;
Expand All @@ -733,7 +729,7 @@ + (void)email:(NSString *__autoreleasing *)email andIUID:(NSString *__autoreleas
static NSString *const EmailQuerySpecifier = @"email";
static NSString *const IUIDQuerySpecifier = @"iuid";
for (NSString *queryComponents in [query componentsSeparatedByString:@"&"]) {
NSArray *parameterComponents = [queryComponents componentsSeparatedByString:@"="];
NSArray<NSString *> *parameterComponents = [queryComponents componentsSeparatedByString:@"="];
if (email && 2 == parameterComponents.count && [parameterComponents[0] isEqualToString:EmailQuerySpecifier]) {
*email = parameterComponents[1];
} else if (iuid && 2 == parameterComponents.count && [parameterComponents[0] isEqualToString:IUIDQuerySpecifier]) {
Expand Down Expand Up @@ -766,93 +762,6 @@ - (void)cleanupInternalStorage {
[self removeKeyFromKeychain:kBITAuthenticatorAuthTokenTypeKey];
}

- (void)processFullSizeImage {
#ifdef BIT_INTERNAL_DEBUG
NSString* path = [[NSBundle mainBundle] pathForResource:@"iTunesArtwork" ofType:@"png"];
#else
NSString *path = [[[NSBundle mainBundle] bundlePath] stringByAppendingString:@"/../iTunesArtwork"];
#endif

struct stat fs;
int fd = open([path UTF8String], O_RDONLY, 0);
if (fstat(fd, &fs) < 0) {
// File not found
close(fd);
return;
}

BITHockeyLogDebug(@"Processing full size image for possible authentication");

unsigned char *buffer, *source;
source = (unsigned char *)malloc((unsigned long)fs.st_size);
if (read(fd, source, (unsigned long)fs.st_size) != fs.st_size) {
close(fd);
// Couldn't read file
free(source);
return;
}

if ((fs.st_size < 20) || (memcmp(source, kBITPNGHeader, 8))) {
// Not a PNG
free(source);
return;
}

buffer = source + 8;

NSString *result = nil;
bit_uint32 length;
unsigned char *name;
unsigned char *data;
int chunk_index = 0;
long long bytes_left = fs.st_size - 8;
do {
memcpy(&length, buffer, 4);
length = ntohl(length);

buffer += 4;
name = (unsigned char *)malloc(5);
name[4] = 0;
memcpy(name, buffer, 4);

buffer += 4;
data = (unsigned char *)malloc(length + 1);

if (bytes_left >= length) {
memcpy(data, buffer, length);

buffer += length;
buffer += 4;
if (!strcmp((const char *)name, "tEXt")) {
data[length] = 0;
NSString *key = [NSString stringWithCString:(char *)data encoding:NSUTF8StringEncoding];

if ([key isEqualToString:@"Data"]) {
result = [NSString stringWithCString:(char *)(data + key.length + 1) encoding:NSUTF8StringEncoding];
}
}

if (!memcmp(name, kBITPNGEndChunk, 4)) {
chunk_index = 128;
}
}

free(data);
free(name);

bytes_left -= (length + 3 * 4);
} while ((chunk_index++ < 128) && (bytes_left > 8));

free(source);

if (result) {
BITHockeyLogDebug(@"Authenticating using full size image information: %@", result);
[self handleOpenURL:[NSURL URLWithString:result] sourceApplication:nil annotation:nil];
} else {
BITHockeyLogDebug(@"No authentication information found");
}
}

#pragma mark - NSNotification

- (void)registerObservers {
Expand Down
3 changes: 0 additions & 3 deletions Classes/BITCrashCXXExceptionHandler.mm
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,6 @@ static inline void BITCrashIterateExceptionHandlers_unlocked(const BITCrashUncau
}
}

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
static void BITCrashUncaughtCXXTerminateHandler(void)
{
BITCrashUncaughtCXXExceptionInfo info = {
Expand Down Expand Up @@ -240,7 +238,6 @@ + (void)removeCXXExceptionHandler:(BITCrashUncaughtCXXExceptionHandler)handler
}
} OSSpinLockUnlock(&_BITCrashCXXExceptionHandlingLock);
}
#pragma clang diagnostic pop

@end

Expand Down
Loading