mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2026-02-28 05:49:33 +00:00
Merge branch 'feature/NoCategories' into develop
This commit is contained in:
44
Classes/BITHockeyHelper.h
Normal file
44
Classes/BITHockeyHelper.h
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Author: Andreas Linde <mail@andreaslinde.de>
|
||||
*
|
||||
* Copyright (c) 2012 HockeyApp, Bit Stadium GmbH.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person
|
||||
* obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without
|
||||
* restriction, including without limitation the rights to use,
|
||||
* copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following
|
||||
* conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
/* NSString helpers */
|
||||
NSString *bit_URLEncodedString(NSString *inputString);
|
||||
NSString *bit_URLDecodedString(NSString *inputString);
|
||||
NSComparisonResult bit_versionCompare(NSString *stringA, NSString *stringB);
|
||||
|
||||
/* UIImage helpers */
|
||||
UIImage *bit_roundedCornerImage(UIImage *inputImage, NSInteger cornerSize, NSInteger borderSize);
|
||||
UIImage *bit_imageToFitSize(UIImage *inputImage, CGSize fitSize, BOOL honorScaleFactor);
|
||||
UIImage *bit_reflectedImageWithHeight(UIImage *inputImage, NSUInteger height, float fromAlpha, float toAlpha);
|
||||
|
||||
UIImage *bit_newWithContentsOfResolutionIndependentFile(NSString * path);
|
||||
UIImage *bit_imageWithContentsOfResolutionIndependentFile(NSString * path);
|
||||
UIImage *bit_imageNamed(NSString *imageName, NSString *bundleName);
|
||||
@@ -1,44 +1,160 @@
|
||||
//
|
||||
// UIImage+BITHockeyAdditions.m
|
||||
//
|
||||
// Created by Peter Steinberger on 10.01.11.
|
||||
// Copyright (c) 2011-2012 Peter Steinberger.
|
||||
// Copyright (c) 2012 HockeyApp, Bit Stadium GmbH.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
/*
|
||||
* Author: Andreas Linde <mail@andreaslinde.de>
|
||||
*
|
||||
* Copyright (c) 2012 HockeyApp, Bit Stadium GmbH.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person
|
||||
* obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without
|
||||
* restriction, including without limitation the rights to use,
|
||||
* copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following
|
||||
* conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#import "UIImage+BITHockeyAdditions.h"
|
||||
|
||||
// Private helper methods
|
||||
@interface UIImage (BITHockeyAdditionsPrivate)
|
||||
- (void)bit_addRoundedRectToPath:(CGRect)rect context:(CGContextRef)context ovalWidth:(CGFloat)ovalWidth ovalHeight:(CGFloat)ovalHeight;
|
||||
@end
|
||||
#import "BITHockeyHelper.h"
|
||||
|
||||
@implementation UIImage (BITHockeyAdditions)
|
||||
#pragma mark NSString helpers
|
||||
|
||||
NSString *bit_URLEncodedString(NSString *inputString) {
|
||||
NSString *result = (NSString *)CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault,
|
||||
(CFStringRef)inputString,
|
||||
NULL,
|
||||
CFSTR("!*'();:@&=+$,/?%#[]"),
|
||||
kCFStringEncodingUTF8);
|
||||
[result autorelease];
|
||||
return result;
|
||||
}
|
||||
|
||||
NSString *bit_URLDecodedString(NSString *inputString) {
|
||||
NSString *result = (NSString *)CFURLCreateStringByReplacingPercentEscapesUsingEncoding(kCFAllocatorDefault,
|
||||
(CFStringRef)inputString,
|
||||
CFSTR(""),
|
||||
kCFStringEncodingUTF8);
|
||||
[result autorelease];
|
||||
return result;
|
||||
}
|
||||
|
||||
NSComparisonResult bit_versionCompare(NSString *stringA, NSString *stringB) {
|
||||
// Extract plain version number from self
|
||||
NSString *plainSelf = stringA;
|
||||
NSRange letterRange = [plainSelf rangeOfCharacterFromSet: [NSCharacterSet letterCharacterSet]];
|
||||
if (letterRange.length)
|
||||
plainSelf = [plainSelf substringToIndex: letterRange.location];
|
||||
|
||||
// Extract plain version number from other
|
||||
NSString *plainOther = stringB;
|
||||
letterRange = [plainOther rangeOfCharacterFromSet: [NSCharacterSet letterCharacterSet]];
|
||||
if (letterRange.length)
|
||||
plainOther = [plainOther substringToIndex: letterRange.location];
|
||||
|
||||
// Compare plain versions
|
||||
NSComparisonResult result = [plainSelf compare:plainOther options:NSNumericSearch];
|
||||
|
||||
// If plain versions are equal, compare full versions
|
||||
if (result == NSOrderedSame)
|
||||
result = [stringA compare:stringB options:NSNumericSearch];
|
||||
|
||||
// Done
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
#pragma mark UIImage private helpers
|
||||
|
||||
static void bit_addRoundedRectToPath(CGRect rect, CGContextRef context, CGFloat ovalWidth, CGFloat ovalHeight);
|
||||
static CGContextRef bit_MyOpenBitmapContext(int pixelsWide, int pixelsHigh);
|
||||
static CGImageRef bit_CreateGradientImage(int pixelsWide, int pixelsHigh, float fromAlpha, float toAlpha);
|
||||
static BOOL bit_hasAlpha(UIImage *inputImage);
|
||||
UIImage *bit_imageWithAlpha(UIImage *inputImage);
|
||||
|
||||
// Adds a rectangular path to the given context and rounds its corners by the given extents
|
||||
// Original author: Björn Sållarp. Used with permission. See: http://blog.sallarp.com/iphone-uiimage-round-corners/
|
||||
void bit_addRoundedRectToPath(CGRect rect, CGContextRef context, CGFloat ovalWidth, CGFloat ovalHeight) {
|
||||
if (ovalWidth == 0 || ovalHeight == 0) {
|
||||
CGContextAddRect(context, rect);
|
||||
return;
|
||||
}
|
||||
CGContextSaveGState(context);
|
||||
CGContextTranslateCTM(context, CGRectGetMinX(rect), CGRectGetMinY(rect));
|
||||
CGContextScaleCTM(context, ovalWidth, ovalHeight);
|
||||
CGFloat fw = CGRectGetWidth(rect) / ovalWidth;
|
||||
CGFloat fh = CGRectGetHeight(rect) / ovalHeight;
|
||||
CGContextMoveToPoint(context, fw, fh/2);
|
||||
CGContextAddArcToPoint(context, fw, fh, fw/2, fh, 1);
|
||||
CGContextAddArcToPoint(context, 0, fh, 0, fh/2, 1);
|
||||
CGContextAddArcToPoint(context, 0, 0, fw/2, 0, 1);
|
||||
CGContextAddArcToPoint(context, fw, 0, fw, fh/2, 1);
|
||||
CGContextClosePath(context);
|
||||
CGContextRestoreGState(context);
|
||||
}
|
||||
|
||||
CGImageRef bit_CreateGradientImage(int pixelsWide, int pixelsHigh, float fromAlpha, float toAlpha) {
|
||||
CGImageRef theCGImage = NULL;
|
||||
|
||||
// gradient is always black-white and the mask must be in the gray colorspace
|
||||
CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceGray();
|
||||
|
||||
// create the bitmap context
|
||||
CGContextRef gradientBitmapContext = CGBitmapContextCreate(NULL, pixelsWide, pixelsHigh,
|
||||
8, 0, colorSpace, kCGImageAlphaNone);
|
||||
|
||||
// define the start and end grayscale values (with the alpha, even though
|
||||
// our bitmap context doesn't support alpha the gradient requires it)
|
||||
CGFloat colors[] = {toAlpha, 1.0, fromAlpha, 1.0};
|
||||
|
||||
// create the CGGradient and then release the gray color space
|
||||
CGGradientRef grayScaleGradient = CGGradientCreateWithColorComponents(colorSpace, colors, NULL, 2);
|
||||
CGColorSpaceRelease(colorSpace);
|
||||
|
||||
// create the start and end points for the gradient vector (straight down)
|
||||
CGPoint gradientEndPoint = CGPointZero;
|
||||
CGPoint gradientStartPoint = CGPointMake(0, pixelsHigh);
|
||||
|
||||
// draw the gradient into the gray bitmap context
|
||||
CGContextDrawLinearGradient(gradientBitmapContext, grayScaleGradient, gradientStartPoint,
|
||||
gradientEndPoint, kCGGradientDrawsAfterEndLocation);
|
||||
CGGradientRelease(grayScaleGradient);
|
||||
|
||||
// convert the context into a CGImageRef and release the context
|
||||
theCGImage = CGBitmapContextCreateImage(gradientBitmapContext);
|
||||
CGContextRelease(gradientBitmapContext);
|
||||
|
||||
// return the imageref containing the gradient
|
||||
return theCGImage;
|
||||
}
|
||||
|
||||
CGContextRef bit_MyOpenBitmapContext(int pixelsWide, int pixelsHigh) {
|
||||
CGSize size = CGSizeMake(pixelsWide, pixelsHigh);
|
||||
if (UIGraphicsBeginImageContextWithOptions != NULL) {
|
||||
UIGraphicsBeginImageContextWithOptions(size, NO, 0.0);
|
||||
}
|
||||
else {
|
||||
UIGraphicsBeginImageContext(size);
|
||||
}
|
||||
|
||||
return UIGraphicsGetCurrentContext();
|
||||
}
|
||||
|
||||
static CGContextRef MyOpenBitmapContext(int pixelsWide, int pixelsHigh);
|
||||
static CGImageRef CreateGradientImage(int pixelsWide, int pixelsHigh, float fromAlpha, float toAlpha);
|
||||
|
||||
// Returns true if the image has an alpha layer
|
||||
- (BOOL)hasAlpha {
|
||||
CGImageAlphaInfo alpha = CGImageGetAlphaInfo(self.CGImage);
|
||||
BOOL bit_hasAlpha(UIImage *inputImage) {
|
||||
CGImageAlphaInfo alpha = CGImageGetAlphaInfo(inputImage.CGImage);
|
||||
return (alpha == kCGImageAlphaFirst ||
|
||||
alpha == kCGImageAlphaLast ||
|
||||
alpha == kCGImageAlphaPremultipliedFirst ||
|
||||
@@ -46,14 +162,14 @@ static CGImageRef CreateGradientImage(int pixelsWide, int pixelsHigh, float from
|
||||
}
|
||||
|
||||
// Returns a copy of the given image, adding an alpha channel if it doesn't already have one
|
||||
- (UIImage *)imageWithAlpha {
|
||||
if ([self hasAlpha]) {
|
||||
return self;
|
||||
UIImage *bit_imageWithAlpha(UIImage *inputImage) {
|
||||
if (bit_hasAlpha(inputImage)) {
|
||||
return inputImage;
|
||||
}
|
||||
|
||||
CGImageRef imageRef = self.CGImage;
|
||||
size_t width = CGImageGetWidth(imageRef) * self.scale;
|
||||
size_t height = CGImageGetHeight(imageRef) * self.scale;
|
||||
CGImageRef imageRef = inputImage.CGImage;
|
||||
size_t width = CGImageGetWidth(imageRef) * inputImage.scale;
|
||||
size_t height = CGImageGetHeight(imageRef) * inputImage.scale;
|
||||
|
||||
// The bitsPerComponent and bitmapInfo values are hard-coded to prevent an "unsupported parameter combination" error
|
||||
CGContextRef offscreenContext = CGBitmapContextCreate(NULL,
|
||||
@@ -76,102 +192,19 @@ static CGImageRef CreateGradientImage(int pixelsWide, int pixelsHigh, float from
|
||||
return imageWithAlpha;
|
||||
}
|
||||
|
||||
// Creates a copy of this image with rounded corners
|
||||
// If borderSize is non-zero, a transparent border of the given size will also be added
|
||||
// Original author: Björn Sållarp. Used with permission. See: http://blog.sallarp.com/iphone-uiimage-round-corners/
|
||||
- (UIImage *)bit_roundedCornerImage:(NSInteger)cornerSize borderSize:(NSInteger)borderSize {
|
||||
// If the image does not have an alpha layer, add one
|
||||
|
||||
UIImage *roundedImage = nil;
|
||||
UIGraphicsBeginImageContextWithOptions(self.size, NO, 0.0); // 0.0 for scale means "correct scale for device's main screen".
|
||||
CGImageRef sourceImg = CGImageCreateWithImageInRect([self CGImage], CGRectMake(0, 0, self.size.width * self.scale, self.size.height * self.scale)); // cropping happens here.
|
||||
|
||||
// Create a clipping path with rounded corners
|
||||
CGContextRef context = UIGraphicsGetCurrentContext();
|
||||
CGContextBeginPath(context);
|
||||
[self addRoundedRectToPath:CGRectMake(borderSize, borderSize, self.size.width - borderSize * 2, self.size.height - borderSize * 2)
|
||||
context:context
|
||||
ovalWidth:cornerSize
|
||||
ovalHeight:cornerSize];
|
||||
CGContextClosePath(context);
|
||||
CGContextClip(context);
|
||||
|
||||
roundedImage = [UIImage imageWithCGImage:sourceImg scale:0.0 orientation:self.imageOrientation]; // create cropped UIImage.
|
||||
[roundedImage drawInRect:CGRectMake(0, 0, self.size.width, self.size.height)]; // the actual scaling happens here, and orientation is taken care of automatically.
|
||||
CGImageRelease(sourceImg);
|
||||
roundedImage = UIGraphicsGetImageFromCurrentImageContext();
|
||||
UIGraphicsEndImageContext();
|
||||
|
||||
if (!roundedImage) {
|
||||
// Try older method.
|
||||
UIImage *image = [self imageWithAlpha];
|
||||
|
||||
// Build a context that's the same dimensions as the new size
|
||||
CGContextRef context = CGBitmapContextCreate(NULL,
|
||||
image.size.width,
|
||||
image.size.height,
|
||||
CGImageGetBitsPerComponent(image.CGImage),
|
||||
0,
|
||||
CGImageGetColorSpace(image.CGImage),
|
||||
CGImageGetBitmapInfo(image.CGImage));
|
||||
|
||||
// Create a clipping path with rounded corners
|
||||
CGContextBeginPath(context);
|
||||
[self addRoundedRectToPath:CGRectMake(borderSize, borderSize, image.size.width - borderSize * 2, image.size.height - borderSize * 2)
|
||||
context:context
|
||||
ovalWidth:cornerSize
|
||||
ovalHeight:cornerSize];
|
||||
CGContextClosePath(context);
|
||||
CGContextClip(context);
|
||||
|
||||
// Draw the image to the context; the clipping path will make anything outside the rounded rect transparent
|
||||
CGContextDrawImage(context, CGRectMake(0, 0, image.size.width, image.size.height), image.CGImage);
|
||||
|
||||
// Create a CGImage from the context
|
||||
CGImageRef clippedImage = CGBitmapContextCreateImage(context);
|
||||
CGContextRelease(context);
|
||||
|
||||
// Create a UIImage from the CGImage
|
||||
roundedImage = [UIImage imageWithCGImage:clippedImage];
|
||||
CGImageRelease(clippedImage);
|
||||
}
|
||||
return roundedImage;
|
||||
}
|
||||
#pragma mark UIImage helpers
|
||||
|
||||
#pragma mark - Private helper methods
|
||||
|
||||
// Adds a rectangular path to the given context and rounds its corners by the given extents
|
||||
// Original author: Björn Sållarp. Used with permission. See: http://blog.sallarp.com/iphone-uiimage-round-corners/
|
||||
- (void)addRoundedRectToPath:(CGRect)rect context:(CGContextRef)context ovalWidth:(CGFloat)ovalWidth ovalHeight:(CGFloat)ovalHeight {
|
||||
if (ovalWidth == 0 || ovalHeight == 0) {
|
||||
CGContextAddRect(context, rect);
|
||||
return;
|
||||
}
|
||||
CGContextSaveGState(context);
|
||||
CGContextTranslateCTM(context, CGRectGetMinX(rect), CGRectGetMinY(rect));
|
||||
CGContextScaleCTM(context, ovalWidth, ovalHeight);
|
||||
CGFloat fw = CGRectGetWidth(rect) / ovalWidth;
|
||||
CGFloat fh = CGRectGetHeight(rect) / ovalHeight;
|
||||
CGContextMoveToPoint(context, fw, fh/2);
|
||||
CGContextAddArcToPoint(context, fw, fh, fw/2, fh, 1);
|
||||
CGContextAddArcToPoint(context, 0, fh, 0, fh/2, 1);
|
||||
CGContextAddArcToPoint(context, 0, 0, fw/2, 0, 1);
|
||||
CGContextAddArcToPoint(context, fw, 0, fw, fh/2, 1);
|
||||
CGContextClosePath(context);
|
||||
CGContextRestoreGState(context);
|
||||
}
|
||||
|
||||
- (UIImage *)bit_imageToFitSize:(CGSize)fitSize honorScaleFactor:(BOOL)honorScaleFactor
|
||||
{
|
||||
UIImage *bit_imageToFitSize(UIImage *inputImage, CGSize fitSize, BOOL honorScaleFactor) {
|
||||
float imageScaleFactor = 1.0;
|
||||
if (honorScaleFactor) {
|
||||
if ([self respondsToSelector:@selector(scale)]) {
|
||||
imageScaleFactor = [self scale];
|
||||
if ([inputImage respondsToSelector:@selector(scale)]) {
|
||||
imageScaleFactor = [inputImage scale];
|
||||
}
|
||||
}
|
||||
|
||||
float sourceWidth = [self size].width * imageScaleFactor;
|
||||
float sourceHeight = [self size].height * imageScaleFactor;
|
||||
float sourceWidth = [inputImage size].width * imageScaleFactor;
|
||||
float sourceHeight = [inputImage size].height * imageScaleFactor;
|
||||
float targetWidth = fitSize.width;
|
||||
float targetHeight = fitSize.height;
|
||||
|
||||
@@ -204,19 +237,19 @@ static CGImageRef CreateGradientImage(int pixelsWide, int pixelsHigh, float from
|
||||
// Create appropriately modified image.
|
||||
UIImage *image = nil;
|
||||
UIGraphicsBeginImageContextWithOptions(destRect.size, NO, honorScaleFactor ? 0.0 : 1.0); // 0.0 for scale means "correct scale for device's main screen".
|
||||
CGImageRef sourceImg = CGImageCreateWithImageInRect([self CGImage], sourceRect); // cropping happens here.
|
||||
image = [UIImage imageWithCGImage:sourceImg scale:0.0 orientation:self.imageOrientation]; // create cropped UIImage.
|
||||
CGImageRef sourceImg = CGImageCreateWithImageInRect([inputImage CGImage], sourceRect); // cropping happens here.
|
||||
image = [UIImage imageWithCGImage:sourceImg scale:0.0 orientation:inputImage.imageOrientation]; // create cropped UIImage.
|
||||
[image drawInRect:destRect]; // the actual scaling happens here, and orientation is taken care of automatically.
|
||||
CGImageRelease(sourceImg);
|
||||
image = UIGraphicsGetImageFromCurrentImageContext();
|
||||
UIGraphicsEndImageContext();
|
||||
|
||||
|
||||
if (!image) {
|
||||
// Try older method.
|
||||
CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
|
||||
CGContextRef context = CGBitmapContextCreate(NULL, scaledWidth, scaledHeight, 8, (fitSize.width * 4),
|
||||
colorSpace, kCGImageAlphaPremultipliedLast);
|
||||
CGImageRef sourceImg = CGImageCreateWithImageInRect([self CGImage], sourceRect);
|
||||
colorSpace, kCGImageAlphaPremultipliedLast);
|
||||
CGImageRef sourceImg = CGImageCreateWithImageInRect([inputImage CGImage], sourceRect);
|
||||
CGContextDrawImage(context, destRect, sourceImg);
|
||||
CGImageRelease(sourceImg);
|
||||
CGImageRef finalImage = CGBitmapContextCreateImage(context);
|
||||
@@ -230,73 +263,25 @@ static CGImageRef CreateGradientImage(int pixelsWide, int pixelsHigh, float from
|
||||
}
|
||||
|
||||
|
||||
|
||||
CGImageRef CreateGradientImage(int pixelsWide, int pixelsHigh, float fromAlpha, float toAlpha) {
|
||||
CGImageRef theCGImage = NULL;
|
||||
|
||||
// gradient is always black-white and the mask must be in the gray colorspace
|
||||
CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceGray();
|
||||
|
||||
// create the bitmap context
|
||||
CGContextRef gradientBitmapContext = CGBitmapContextCreate(NULL, pixelsWide, pixelsHigh,
|
||||
8, 0, colorSpace, kCGImageAlphaNone);
|
||||
|
||||
// define the start and end grayscale values (with the alpha, even though
|
||||
// our bitmap context doesn't support alpha the gradient requires it)
|
||||
CGFloat colors[] = {toAlpha, 1.0, fromAlpha, 1.0};
|
||||
|
||||
// create the CGGradient and then release the gray color space
|
||||
CGGradientRef grayScaleGradient = CGGradientCreateWithColorComponents(colorSpace, colors, NULL, 2);
|
||||
CGColorSpaceRelease(colorSpace);
|
||||
|
||||
// create the start and end points for the gradient vector (straight down)
|
||||
CGPoint gradientEndPoint = CGPointZero;
|
||||
CGPoint gradientStartPoint = CGPointMake(0, pixelsHigh);
|
||||
|
||||
// draw the gradient into the gray bitmap context
|
||||
CGContextDrawLinearGradient(gradientBitmapContext, grayScaleGradient, gradientStartPoint,
|
||||
gradientEndPoint, kCGGradientDrawsAfterEndLocation);
|
||||
CGGradientRelease(grayScaleGradient);
|
||||
|
||||
// convert the context into a CGImageRef and release the context
|
||||
theCGImage = CGBitmapContextCreateImage(gradientBitmapContext);
|
||||
CGContextRelease(gradientBitmapContext);
|
||||
|
||||
// return the imageref containing the gradient
|
||||
return theCGImage;
|
||||
}
|
||||
|
||||
CGContextRef MyOpenBitmapContext(int pixelsWide, int pixelsHigh) {
|
||||
CGSize size = CGSizeMake(pixelsWide, pixelsHigh);
|
||||
if (UIGraphicsBeginImageContextWithOptions != NULL) {
|
||||
UIGraphicsBeginImageContextWithOptions(size, NO, 0.0);
|
||||
}
|
||||
else {
|
||||
UIGraphicsBeginImageContext(size);
|
||||
}
|
||||
|
||||
return UIGraphicsGetCurrentContext();
|
||||
}
|
||||
|
||||
- (UIImage *)bit_reflectedImageWithHeight:(NSUInteger)height fromAlpha:(float)fromAlpha toAlpha:(float)toAlpha {
|
||||
UIImage *bit_reflectedImageWithHeight(UIImage *inputImage, NSUInteger height, float fromAlpha, float toAlpha) {
|
||||
if(height == 0)
|
||||
return nil;
|
||||
|
||||
// create a bitmap graphics context the size of the image
|
||||
CGContextRef mainViewContentContext = MyOpenBitmapContext(self.size.width, height);
|
||||
CGContextRef mainViewContentContext = bit_MyOpenBitmapContext(inputImage.size.width, height);
|
||||
|
||||
// create a 2 bit CGImage containing a gradient that will be used for masking the
|
||||
// main view content to create the 'fade' of the reflection. The CGImageCreateWithMask
|
||||
// function will stretch the bitmap image as required, so we can create a 1 pixel wide gradient
|
||||
CGImageRef gradientMaskImage = CreateGradientImage(1, height, fromAlpha, toAlpha);
|
||||
CGImageRef gradientMaskImage = bit_CreateGradientImage(1, height, fromAlpha, toAlpha);
|
||||
|
||||
// create an image by masking the bitmap of the mainView content with the gradient view
|
||||
// then release the pre-masked content bitmap and the gradient bitmap
|
||||
CGContextClipToMask(mainViewContentContext, CGRectMake(0.0, 0.0, self.size.width, height), gradientMaskImage);
|
||||
CGContextClipToMask(mainViewContentContext, CGRectMake(0.0, 0.0, inputImage.size.width, height), gradientMaskImage);
|
||||
CGImageRelease(gradientMaskImage);
|
||||
|
||||
// draw the image into the bitmap context
|
||||
CGContextDrawImage(mainViewContentContext, CGRectMake(0, 0, self.size.width, self.size.height), self.CGImage);
|
||||
CGContextDrawImage(mainViewContentContext, CGRectMake(0, 0, inputImage.size.width, inputImage.size.height), inputImage.CGImage);
|
||||
|
||||
// convert the finished reflection image to a UIImage
|
||||
UIImage *theImage = UIGraphicsGetImageFromCurrentImageContext(); // returns autoreleased
|
||||
@@ -305,7 +290,8 @@ CGContextRef MyOpenBitmapContext(int pixelsWide, int pixelsHigh) {
|
||||
return theImage;
|
||||
}
|
||||
|
||||
- (id)bit_initWithContentsOfResolutionIndependentFile:(NSString *)path {
|
||||
|
||||
UIImage *bit_newWithContentsOfResolutionIndependentFile(NSString * path) {
|
||||
if ([UIScreen instancesRespondToSelector:@selector(scale)] && (int)[[UIScreen mainScreen] scale] == 2.0) {
|
||||
NSString *path2x = [[path stringByDeletingLastPathComponent]
|
||||
stringByAppendingPathComponent:[NSString stringWithFormat:@"%@@2x.%@",
|
||||
@@ -313,26 +299,84 @@ CGContextRef MyOpenBitmapContext(int pixelsWide, int pixelsHigh) {
|
||||
[path pathExtension]]];
|
||||
|
||||
if ([[NSFileManager defaultManager] fileExistsAtPath:path2x]) {
|
||||
return [self initWithContentsOfFile:path2x];
|
||||
return [[UIImage alloc] initWithContentsOfFile:path2x];
|
||||
}
|
||||
}
|
||||
|
||||
return [self initWithContentsOfFile:path];
|
||||
return [[UIImage alloc] initWithContentsOfFile:path];
|
||||
}
|
||||
|
||||
+ (UIImage*)bit_imageWithContentsOfResolutionIndependentFile:(NSString *)path {
|
||||
|
||||
UIImage *bit_imageWithContentsOfResolutionIndependentFile(NSString *path) {
|
||||
#ifndef __clang_analyzer__
|
||||
// clang alayzer in 4.2b3 thinks here's a leak, which is not the case.
|
||||
return [[[UIImage alloc] bit_initWithContentsOfResolutionIndependentFile:path] autorelease];
|
||||
return [bit_newWithContentsOfResolutionIndependentFile(path) autorelease];
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
+ (UIImage *)bit_imageNamed:(NSString *)imageName bundle:(NSString *)bundleName {
|
||||
UIImage *bit_imageNamed(NSString *imageName, NSString *bundleName) {
|
||||
NSString *resourcePath = [[NSBundle mainBundle] resourcePath];
|
||||
NSString *bundlePath = [resourcePath stringByAppendingPathComponent:bundleName];
|
||||
NSString *imagePath = [bundlePath stringByAppendingPathComponent:imageName];
|
||||
return [UIImage bit_imageWithContentsOfResolutionIndependentFile:imagePath];
|
||||
return bit_imageWithContentsOfResolutionIndependentFile(imagePath);
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
// Creates a copy of this image with rounded corners
|
||||
// If borderSize is non-zero, a transparent border of the given size will also be added
|
||||
// Original author: Björn Sållarp. Used with permission. See: http://blog.sallarp.com/iphone-uiimage-round-corners/
|
||||
UIImage *bit_roundedCornerImage(UIImage *inputImage, NSInteger cornerSize, NSInteger borderSize) {
|
||||
// If the image does not have an alpha layer, add one
|
||||
|
||||
UIImage *roundedImage = nil;
|
||||
UIGraphicsBeginImageContextWithOptions(inputImage.size, NO, 0.0); // 0.0 for scale means "correct scale for device's main screen".
|
||||
CGImageRef sourceImg = CGImageCreateWithImageInRect([inputImage CGImage], CGRectMake(0, 0, inputImage.size.width * inputImage.scale, inputImage.size.height * inputImage.scale)); // cropping happens here.
|
||||
|
||||
// Create a clipping path with rounded corners
|
||||
CGContextRef context = UIGraphicsGetCurrentContext();
|
||||
CGContextBeginPath(context);
|
||||
bit_addRoundedRectToPath(CGRectMake(borderSize, borderSize, inputImage.size.width - borderSize * 2, inputImage.size.height - borderSize * 2), context, cornerSize, cornerSize);
|
||||
CGContextClosePath(context);
|
||||
CGContextClip(context);
|
||||
|
||||
roundedImage = [UIImage imageWithCGImage:sourceImg scale:0.0 orientation:inputImage.imageOrientation]; // create cropped UIImage.
|
||||
[roundedImage drawInRect:CGRectMake(0, 0, inputImage.size.width, inputImage.size.height)]; // the actual scaling happens here, and orientation is taken care of automatically.
|
||||
CGImageRelease(sourceImg);
|
||||
roundedImage = UIGraphicsGetImageFromCurrentImageContext();
|
||||
UIGraphicsEndImageContext();
|
||||
|
||||
if (!roundedImage) {
|
||||
// Try older method.
|
||||
UIImage *image = bit_imageWithAlpha(inputImage);
|
||||
|
||||
// Build a context that's the same dimensions as the new size
|
||||
CGContextRef context = CGBitmapContextCreate(NULL,
|
||||
image.size.width,
|
||||
image.size.height,
|
||||
CGImageGetBitsPerComponent(image.CGImage),
|
||||
0,
|
||||
CGImageGetColorSpace(image.CGImage),
|
||||
CGImageGetBitmapInfo(image.CGImage));
|
||||
|
||||
// Create a clipping path with rounded corners
|
||||
CGContextBeginPath(context);
|
||||
bit_addRoundedRectToPath(CGRectMake(borderSize, borderSize, image.size.width - borderSize * 2, image.size.height - borderSize * 2), context, cornerSize, cornerSize);
|
||||
CGContextClosePath(context);
|
||||
CGContextClip(context);
|
||||
|
||||
// Draw the image to the context; the clipping path will make anything outside the rounded rect transparent
|
||||
CGContextDrawImage(context, CGRectMake(0, 0, image.size.width, image.size.height), image.CGImage);
|
||||
|
||||
// Create a CGImage from the context
|
||||
CGImageRef clippedImage = CGBitmapContextCreateImage(context);
|
||||
CGContextRelease(context);
|
||||
|
||||
// Create a UIImage from the CGImage
|
||||
roundedImage = [UIImage imageWithCGImage:clippedImage];
|
||||
CGImageRelease(clippedImage);
|
||||
}
|
||||
|
||||
return roundedImage;
|
||||
}
|
||||
@@ -33,13 +33,12 @@
|
||||
#import <mach-o/ldsyms.h>
|
||||
#import "HockeySDK.h"
|
||||
#import "HockeySDKPrivate.h"
|
||||
#import "BITHockeyHelper.h"
|
||||
|
||||
#import "BITUpdateManagerPrivate.h"
|
||||
#import "BITUpdateViewControllerPrivate.h"
|
||||
#import "BITAppVersionMetaInfo.h"
|
||||
|
||||
#import "NSString+BITHockeyAdditions.h"
|
||||
#import "UIImage+BITHockeyAdditions.h"
|
||||
|
||||
|
||||
// API defines - do not change
|
||||
@@ -98,7 +97,7 @@
|
||||
}
|
||||
|
||||
- (NSString *)encodedAppIdentifier {
|
||||
return (_appIdentifier ? [_appIdentifier bit_URLEncodedString] : [[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleIdentifier"] bit_URLEncodedString]);
|
||||
return (_appIdentifier ? bit_URLEncodedString(_appIdentifier) : bit_URLEncodedString([[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleIdentifier"]));
|
||||
}
|
||||
|
||||
- (NSString *)getDevicePlatform {
|
||||
@@ -277,7 +276,7 @@
|
||||
- (void)checkUpdateAvailable {
|
||||
// check if there is an update available
|
||||
if (self.compareVersionType == BITUpdateComparisonResultGreater) {
|
||||
self.updateAvailable = ([self.newestAppVersion.version bit_versionCompare:self.currentAppVersion] == NSOrderedDescending);
|
||||
self.updateAvailable = (bit_versionCompare(self.newestAppVersion.version, self.currentAppVersion) == NSOrderedDescending);
|
||||
} else {
|
||||
self.updateAvailable = ([self.newestAppVersion.version compare:self.currentAppVersion] != NSOrderedSame);
|
||||
}
|
||||
@@ -558,13 +557,13 @@
|
||||
CGRect frame = [visibleWindow frame];
|
||||
|
||||
self.blockingView = [[[UIView alloc] initWithFrame:frame] autorelease];
|
||||
UIImageView *backgroundView = [[[UIImageView alloc] initWithImage:[UIImage bit_imageNamed:@"bg.png" bundle:BITHOCKEYSDK_BUNDLE]] autorelease];
|
||||
UIImageView *backgroundView = [[[UIImageView alloc] initWithImage:bit_imageNamed(@"bg.png", BITHOCKEYSDK_BUNDLE)] autorelease];
|
||||
backgroundView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
backgroundView.frame = frame;
|
||||
[self.blockingView addSubview:backgroundView];
|
||||
|
||||
if (image != nil) {
|
||||
UIImageView *imageView = [[[UIImageView alloc] initWithImage:[UIImage bit_imageNamed:image bundle:BITHOCKEYSDK_BUNDLE]] autorelease];
|
||||
UIImageView *imageView = [[[UIImageView alloc] initWithImage:bit_imageNamed(image, BITHOCKEYSDK_BUNDLE)] autorelease];
|
||||
imageView.contentMode = UIViewContentModeCenter;
|
||||
imageView.frame = frame;
|
||||
[self.blockingView addSubview:imageView];
|
||||
@@ -697,8 +696,8 @@
|
||||
NSMutableString *parameter = [NSMutableString stringWithFormat:@"api/2/apps/%@", [self encodedAppIdentifier]];
|
||||
|
||||
[parameter appendFormat:@"?format=json&authorize=yes&app_version=%@&udid=%@&sdk=%@&sdk_version=%@&uuid=%@",
|
||||
[[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"] bit_URLEncodedString],
|
||||
(_isAppStoreEnvironment ? @"appstore" : [[self deviceIdentifier] bit_URLEncodedString]),
|
||||
bit_URLEncodedString([[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]),
|
||||
(_isAppStoreEnvironment ? @"appstore" : bit_URLEncodedString([self deviceIdentifier])),
|
||||
BITHOCKEY_NAME,
|
||||
BITHOCKEY_VERSION,
|
||||
_uuid
|
||||
@@ -797,8 +796,8 @@
|
||||
}
|
||||
|
||||
NSMutableString *parameter = [NSMutableString stringWithFormat:@"api/2/apps/%@?format=json&udid=%@&sdk=%@&sdk_version=%@&uuid=%@",
|
||||
[[self encodedAppIdentifier] bit_URLEncodedString],
|
||||
(_isAppStoreEnvironment ? @"appstore" : [[self deviceIdentifier] bit_URLEncodedString]),
|
||||
bit_URLEncodedString([self encodedAppIdentifier]),
|
||||
(_isAppStoreEnvironment ? @"appstore" : bit_URLEncodedString([self deviceIdentifier])),
|
||||
BITHOCKEY_NAME,
|
||||
BITHOCKEY_VERSION,
|
||||
_uuid];
|
||||
@@ -806,12 +805,12 @@
|
||||
// add additional statistics if user didn't disable flag
|
||||
if (_sendUsageData) {
|
||||
[parameter appendFormat:@"&app_version=%@&os=iOS&os_version=%@&device=%@&lang=%@&first_start_at=%@&usage_time=%@",
|
||||
[[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"] bit_URLEncodedString],
|
||||
[[[UIDevice currentDevice] systemVersion] bit_URLEncodedString],
|
||||
[[self getDevicePlatform] bit_URLEncodedString],
|
||||
[[[[NSBundle mainBundle] preferredLocalizations] objectAtIndex:0] bit_URLEncodedString],
|
||||
[[self installationDateString] bit_URLEncodedString],
|
||||
[[self currentUsageString] bit_URLEncodedString]
|
||||
bit_URLEncodedString([[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]),
|
||||
bit_URLEncodedString([[UIDevice currentDevice] systemVersion]),
|
||||
bit_URLEncodedString([self getDevicePlatform]),
|
||||
bit_URLEncodedString([[[NSBundle mainBundle] preferredLocalizations] objectAtIndex:0]),
|
||||
bit_URLEncodedString([self installationDateString]),
|
||||
bit_URLEncodedString([self currentUsageString])
|
||||
];
|
||||
}
|
||||
|
||||
@@ -857,7 +856,7 @@
|
||||
}
|
||||
|
||||
NSString *hockeyAPIURL = [NSString stringWithFormat:@"%@api/2/apps/%@?format=plist%@", _updateURL, [self encodedAppIdentifier], extraParameter];
|
||||
NSString *iOSUpdateURL = [NSString stringWithFormat:@"itms-services://?action=download-manifest&url=%@", [hockeyAPIURL bit_URLEncodedString]];
|
||||
NSString *iOSUpdateURL = [NSString stringWithFormat:@"itms-services://?action=download-manifest&url=%@", bit_URLEncodedString(hockeyAPIURL)];
|
||||
|
||||
BITHockeyLog(@"INFO: API Server Call: %@, calling iOS with %@", hockeyAPIURL, iOSUpdateURL);
|
||||
BOOL success = [[UIApplication sharedApplication] openURL:[NSURL URLWithString:iOSUpdateURL]];
|
||||
@@ -1050,7 +1049,7 @@
|
||||
BOOL result = NO;
|
||||
|
||||
for (BITAppVersionMetaInfo *appVersion in self.appVersions) {
|
||||
if ([appVersion.version isEqualToString:self.currentAppVersion] || [appVersion.version bit_versionCompare:self.currentAppVersion] == NSOrderedAscending) {
|
||||
if ([appVersion.version isEqualToString:self.currentAppVersion] || bit_versionCompare(appVersion.version, self.currentAppVersion) == NSOrderedAscending) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -29,9 +29,8 @@
|
||||
*/
|
||||
|
||||
#import <QuartzCore/QuartzCore.h>
|
||||
#import "NSString+BITHockeyAdditions.h"
|
||||
#import "BITHockeyHelper.h"
|
||||
#import "BITAppVersionMetaInfo.h"
|
||||
#import "UIImage+BITHockeyAdditions.h"
|
||||
#import "PSAppStoreHeader.h"
|
||||
#import "PSWebTableViewCell.h"
|
||||
#import "PSStoreButton.h"
|
||||
@@ -98,7 +97,7 @@
|
||||
UIGraphicsBeginImageContextWithOptions(image.size, NO, 0.0);
|
||||
|
||||
[image drawAtPoint:CGPointZero];
|
||||
UIImage *iconGradient = [UIImage bit_imageNamed:@"IconGradient.png" bundle:BITHOCKEYSDK_BUNDLE];
|
||||
UIImage *iconGradient = bit_imageNamed(@"IconGradient.png", BITHOCKEYSDK_BUNDLE);
|
||||
[iconGradient drawInRect:CGRectMake(0, 0, image.size.width, image.size.height) blendMode:kCGBlendModeNormal alpha:0.5];
|
||||
|
||||
UIImage *result = UIGraphicsGetImageFromCurrentImageContext();
|
||||
@@ -155,7 +154,7 @@
|
||||
[footerButton setTitle:BITHockeyLocalizedString(@"UpdateShowPreviousVersions") forState:UIControlStateNormal];
|
||||
[footerButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
|
||||
[footerButton setTitleColor:[UIColor whiteColor] forState:UIControlStateHighlighted];
|
||||
[footerButton setBackgroundImage:[UIImage bit_imageNamed:@"buttonHighlight.png" bundle:BITHOCKEYSDK_BUNDLE] forState:UIControlStateHighlighted];
|
||||
[footerButton setBackgroundImage:bit_imageNamed(@"buttonHighlight.png", BITHOCKEYSDK_BUNDLE) forState:UIControlStateHighlighted];
|
||||
footerButton.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleTopMargin;
|
||||
[footerButton addTarget:self action:@selector(showPreviousVersionAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
footerButton.frame = CGRectMake(0, kMinPreviousVersionButtonHeight-44, self.view.frame.size.width, 44);
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
//
|
||||
// Created by Jon Crosby on 10/19/07.
|
||||
// Copyright 2007 Kaboomerang LLC. All rights reserved.
|
||||
// Copyright (c) 2012 HockeyApp, Bit Stadium GmbH.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface NSString (BITHockeyAdditions)
|
||||
|
||||
- (NSString *)bit_URLEncodedString;
|
||||
- (NSString *)bit_URLDecodedString;
|
||||
|
||||
- (NSComparisonResult)bit_versionCompare:(NSString *)other;
|
||||
|
||||
@end
|
||||
@@ -1,72 +0,0 @@
|
||||
//
|
||||
// Created by Jon Crosby on 10/19/07.
|
||||
// Copyright 2007 Kaboomerang LLC. All rights reserved.
|
||||
// Copyright (c) 2012 HockeyApp, Bit Stadium GmbH.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
|
||||
#import "NSString+BITHockeyAdditions.h"
|
||||
|
||||
@implementation NSString (BITHockeyAdditions)
|
||||
|
||||
- (NSString *)bit_URLEncodedString {
|
||||
NSString *result = (NSString *)CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault,
|
||||
(CFStringRef)self,
|
||||
NULL,
|
||||
CFSTR("!*'();:@&=+$,/?%#[]"),
|
||||
kCFStringEncodingUTF8);
|
||||
[result autorelease];
|
||||
return result;
|
||||
}
|
||||
|
||||
- (NSString*)bit_URLDecodedString {
|
||||
NSString *result = (NSString *)CFURLCreateStringByReplacingPercentEscapesUsingEncoding(kCFAllocatorDefault,
|
||||
(CFStringRef)self,
|
||||
CFSTR(""),
|
||||
kCFStringEncodingUTF8);
|
||||
[result autorelease];
|
||||
return result;
|
||||
}
|
||||
|
||||
- (NSComparisonResult)bit_versionCompare:(NSString *)other {
|
||||
// Extract plain version number from self
|
||||
NSString *plainSelf = self;
|
||||
NSRange letterRange = [plainSelf rangeOfCharacterFromSet: [NSCharacterSet letterCharacterSet]];
|
||||
if (letterRange.length)
|
||||
plainSelf = [plainSelf substringToIndex: letterRange.location];
|
||||
|
||||
// Extract plain version number from other
|
||||
NSString *plainOther = other;
|
||||
letterRange = [plainOther rangeOfCharacterFromSet: [NSCharacterSet letterCharacterSet]];
|
||||
if (letterRange.length)
|
||||
plainOther = [plainOther substringToIndex: letterRange.location];
|
||||
|
||||
// Compare plain versions
|
||||
NSComparisonResult result = [plainSelf compare:plainOther options:NSNumericSearch];
|
||||
|
||||
// If plain versions are equal, compare full versions
|
||||
if (result == NSOrderedSame)
|
||||
result = [self compare:other options:NSNumericSearch];
|
||||
|
||||
// Done
|
||||
return result;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -21,7 +21,7 @@
|
||||
// THE SOFTWARE.
|
||||
|
||||
#import "PSAppStoreHeader.h"
|
||||
#import "UIImage+BITHockeyAdditions.h"
|
||||
#import "BITHockeyHelper.h"
|
||||
#import "HockeySDKPrivate.h"
|
||||
|
||||
|
||||
@@ -149,14 +149,14 @@
|
||||
[iconImage_ release];
|
||||
|
||||
// scale, make borders and reflection
|
||||
iconImage_ = [anIconImage bit_imageToFitSize:CGSizeMake(kImageHeight, kImageHeight) honorScaleFactor:YES];
|
||||
iconImage_ = [[iconImage_ bit_roundedCornerImage:kImageBorderRadius borderSize:0.0] retain];
|
||||
iconImage_ = bit_imageToFitSize(anIconImage, CGSizeMake(kImageHeight, kImageHeight), YES);
|
||||
iconImage_ = [bit_roundedCornerImage(iconImage_, kImageBorderRadius, 0.0) retain];
|
||||
|
||||
// create reflected image
|
||||
[reflectedImage_ release];
|
||||
reflectedImage_ = nil;
|
||||
if (anIconImage) {
|
||||
reflectedImage_ = [[iconImage_ bit_reflectedImageWithHeight:kReflectionHeight fromAlpha:0.5 toAlpha:0.0] retain];
|
||||
reflectedImage_ = [bit_reflectedImageWithHeight(iconImage_, kReflectionHeight, 0.5, 0.0) retain];
|
||||
}
|
||||
[self setNeedsDisplay];
|
||||
}
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
//
|
||||
// UIImage+BITHockeyAdditions.h
|
||||
//
|
||||
// Created by Peter Steinberger on 10.01.11.
|
||||
// Copyright (c) 2011-2012 Peter Steinberger.
|
||||
// Copyright (c) 2012 HockeyApp, Bit Stadium GmbH.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface UIImage (BITHockeyAdditions)
|
||||
|
||||
- (UIImage *)bit_roundedCornerImage:(NSInteger)cornerSize borderSize:(NSInteger)borderSize;
|
||||
- (UIImage *)bit_imageToFitSize:(CGSize)fitSize honorScaleFactor:(BOOL)honorScaleFactor;
|
||||
- (UIImage *)bit_reflectedImageWithHeight:(NSUInteger)height fromAlpha:(float)fromAlpha toAlpha:(float)toAlpha;
|
||||
|
||||
- (id)bit_initWithContentsOfResolutionIndependentFile:(NSString *)path NS_RETURNS_RETAINED;
|
||||
+ (UIImage *)bit_imageWithContentsOfResolutionIndependentFile:(NSString *)path;
|
||||
+ (UIImage *)bit_imageNamed:(NSString *)imageName bundle:(NSString *)bundleName;
|
||||
|
||||
@end
|
||||
@@ -31,11 +31,9 @@
|
||||
1E59545715B6C41300A03429 /* BITAppVersionMetaInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB45A148D7BF50015DEDC /* BITAppVersionMetaInfo.m */; };
|
||||
1E59545C15B6C41300A03429 /* BITCrashManager.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB464148D7BF50015DEDC /* BITCrashManager.m */; };
|
||||
1E59545D15B6C41300A03429 /* BITHockeyManager.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB466148D7BF50015DEDC /* BITHockeyManager.m */; };
|
||||
1E59545E15B6C41300A03429 /* NSString+BITHockeyAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB468148D7BF50015DEDC /* NSString+BITHockeyAdditions.m */; };
|
||||
1E59545F15B6C41300A03429 /* PSAppStoreHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB46A148D7BF50015DEDC /* PSAppStoreHeader.m */; };
|
||||
1E59546015B6C41300A03429 /* PSStoreButton.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB46C148D7BF50015DEDC /* PSStoreButton.m */; };
|
||||
1E59546115B6C41300A03429 /* PSWebTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB46E148D7BF50015DEDC /* PSWebTableViewCell.m */; };
|
||||
1E59546215B6C41300A03429 /* UIImage+BITHockeyAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB470148D7BF50015DEDC /* UIImage+BITHockeyAdditions.m */; };
|
||||
1E59546315B6C41300A03429 /* BITCrashReportTextFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E40BCB815A3494400BD64D9 /* BITCrashReportTextFormatter.m */; };
|
||||
1E59546615B6C41300A03429 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E400561D148D79B500EB22B9 /* Foundation.framework */; };
|
||||
1E59546715B6C41300A03429 /* CrashReporter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E41EB48B148D7C4E0015DEDC /* CrashReporter.framework */; };
|
||||
@@ -45,7 +43,6 @@
|
||||
1E59547015B6C41300A03429 /* PSAppStoreHeader.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB469148D7BF50015DEDC /* PSAppStoreHeader.h */; };
|
||||
1E59547115B6C41300A03429 /* PSStoreButton.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB46B148D7BF50015DEDC /* PSStoreButton.h */; };
|
||||
1E59547215B6C41300A03429 /* PSWebTableViewCell.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB46D148D7BF50015DEDC /* PSWebTableViewCell.h */; };
|
||||
1E59547315B6C41300A03429 /* UIImage+BITHockeyAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB46F148D7BF50015DEDC /* UIImage+BITHockeyAdditions.h */; };
|
||||
1E59547515B6C41300A03429 /* BITCrashManagerDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E40BCB415A3487500BD64D9 /* BITCrashManagerDelegate.h */; settings = {ATTRIBUTES = (); }; };
|
||||
1E59547615B6C41300A03429 /* BITCrashReportTextFormatter.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E40BCB715A3494400BD64D9 /* BITCrashReportTextFormatter.h */; };
|
||||
1E59547815B6C41300A03429 /* HockeySDK.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E71509A15B5C76F004E88FF /* HockeySDK.h */; settings = {ATTRIBUTES = (); }; };
|
||||
@@ -59,18 +56,15 @@
|
||||
1E5954CD15B6F24A00A03429 /* BITAppVersionMetaInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB45A148D7BF50015DEDC /* BITAppVersionMetaInfo.m */; };
|
||||
1E5954D215B6F24A00A03429 /* BITCrashManager.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB464148D7BF50015DEDC /* BITCrashManager.m */; };
|
||||
1E5954D315B6F24A00A03429 /* BITHockeyManager.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB466148D7BF50015DEDC /* BITHockeyManager.m */; };
|
||||
1E5954D415B6F24A00A03429 /* NSString+BITHockeyAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB468148D7BF50015DEDC /* NSString+BITHockeyAdditions.m */; };
|
||||
1E5954D515B6F24A00A03429 /* PSAppStoreHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB46A148D7BF50015DEDC /* PSAppStoreHeader.m */; };
|
||||
1E5954D615B6F24A00A03429 /* PSStoreButton.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB46C148D7BF50015DEDC /* PSStoreButton.m */; };
|
||||
1E5954D715B6F24A00A03429 /* PSWebTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB46E148D7BF50015DEDC /* PSWebTableViewCell.m */; };
|
||||
1E5954D815B6F24A00A03429 /* UIImage+BITHockeyAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB470148D7BF50015DEDC /* UIImage+BITHockeyAdditions.m */; };
|
||||
1E5954D915B6F24A00A03429 /* BITCrashReportTextFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E40BCB815A3494400BD64D9 /* BITCrashReportTextFormatter.m */; };
|
||||
1E5954DC15B6F24A00A03429 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E400561D148D79B500EB22B9 /* Foundation.framework */; };
|
||||
1E5954DD15B6F24A00A03429 /* CrashReporter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E41EB48B148D7C4E0015DEDC /* CrashReporter.framework */; };
|
||||
1E59558D15B6FDA500A03429 /* PSAppStoreHeader.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB469148D7BF50015DEDC /* PSAppStoreHeader.h */; };
|
||||
1E59558E15B6FDA500A03429 /* PSStoreButton.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB46B148D7BF50015DEDC /* PSStoreButton.h */; };
|
||||
1E59558F15B6FDA500A03429 /* PSWebTableViewCell.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB46D148D7BF50015DEDC /* PSWebTableViewCell.h */; };
|
||||
1E59559015B6FDA500A03429 /* UIImage+BITHockeyAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB46F148D7BF50015DEDC /* UIImage+BITHockeyAdditions.h */; };
|
||||
1E59559215B6FDA500A03429 /* BITAppVersionMetaInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB459148D7BF50015DEDC /* BITAppVersionMetaInfo.h */; };
|
||||
1E59559415B6FDA500A03429 /* BITUpdateManager.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB45D148D7BF50015DEDC /* BITUpdateManager.h */; settings = {ATTRIBUTES = (); }; };
|
||||
1E59559815B6FDA500A03429 /* BITCrashManagerDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E40BCB415A3487500BD64D9 /* BITCrashManagerDelegate.h */; settings = {ATTRIBUTES = (); }; };
|
||||
@@ -104,16 +98,11 @@
|
||||
1E5955E715B751FB00A03429 /* BITUpdateViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E5955E615B751FB00A03429 /* BITUpdateViewController.m */; };
|
||||
1E5955E815B751FB00A03429 /* BITUpdateViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E5955E615B751FB00A03429 /* BITUpdateViewController.m */; };
|
||||
1E5955E915B751FB00A03429 /* BITUpdateViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E5955E615B751FB00A03429 /* BITUpdateViewController.m */; };
|
||||
1E5955EB15B7538B00A03429 /* NSString+BITHockeyAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E5955EA15B7538B00A03429 /* NSString+BITHockeyAdditions.h */; };
|
||||
1E5955EC15B7538B00A03429 /* NSString+BITHockeyAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E5955EA15B7538B00A03429 /* NSString+BITHockeyAdditions.h */; };
|
||||
1E5955ED15B7538B00A03429 /* NSString+BITHockeyAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E5955EA15B7538B00A03429 /* NSString+BITHockeyAdditions.h */; };
|
||||
1E5955EF15B7752300A03429 /* BITUpdateManagerDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E5955EE15B7752200A03429 /* BITUpdateManagerDelegate.h */; };
|
||||
1E5955F015B7752300A03429 /* BITUpdateManagerDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E5955EE15B7752200A03429 /* BITUpdateManagerDelegate.h */; };
|
||||
1E5955F115B7752300A03429 /* BITUpdateManagerDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E5955EE15B7752200A03429 /* BITUpdateManagerDelegate.h */; };
|
||||
1E5955F215B77F5100A03429 /* NSString+BITHockeyAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E5955EA15B7538B00A03429 /* NSString+BITHockeyAdditions.h */; };
|
||||
1E5955F315B77F5600A03429 /* PSAppStoreHeader.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB469148D7BF50015DEDC /* PSAppStoreHeader.h */; };
|
||||
1E5955F415B77F5E00A03429 /* PSWebTableViewCell.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB46D148D7BF50015DEDC /* PSWebTableViewCell.h */; };
|
||||
1E5955F515B77F6000A03429 /* UIImage+BITHockeyAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB46F148D7BF50015DEDC /* UIImage+BITHockeyAdditions.h */; };
|
||||
1E5955F615B77F6500A03429 /* HockeySDKPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E5955A015B70F6900A03429 /* HockeySDKPrivate.h */; };
|
||||
1E5955F715B77F7600A03429 /* BITUpdateManagerDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E5955EE15B7752200A03429 /* BITUpdateManagerDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
1E5955F815B77F7C00A03429 /* BITUpdateViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E5955E215B751ED00A03429 /* BITUpdateViewController.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
@@ -123,6 +112,12 @@
|
||||
1E5955FD15B7877B00A03429 /* BITHockeyManagerDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E5955FA15B7877A00A03429 /* BITHockeyManagerDelegate.h */; };
|
||||
1E5955FE15B787D600A03429 /* BITHockeyManagerDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E5955FA15B7877A00A03429 /* BITHockeyManagerDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
1E71509B15B5C76F004E88FF /* HockeySDK.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E71509A15B5C76F004E88FF /* HockeySDK.h */; settings = {ATTRIBUTES = (); }; };
|
||||
1EB6046D15EF6B3200F69880 /* BITHockeyHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EB6046B15EF6B3200F69880 /* BITHockeyHelper.h */; };
|
||||
1EB6046E15EF6B3200F69880 /* BITHockeyHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EB6046B15EF6B3200F69880 /* BITHockeyHelper.h */; };
|
||||
1EB6046F15EF6B3200F69880 /* BITHockeyHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EB6046B15EF6B3200F69880 /* BITHockeyHelper.h */; };
|
||||
1EB6047015EF6B3200F69880 /* BITHockeyHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 1EB6046C15EF6B3200F69880 /* BITHockeyHelper.m */; };
|
||||
1EB6047115EF6B3200F69880 /* BITHockeyHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 1EB6046C15EF6B3200F69880 /* BITHockeyHelper.m */; };
|
||||
1EB6047215EF6B3200F69880 /* BITHockeyHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 1EB6046C15EF6B3200F69880 /* BITHockeyHelper.m */; };
|
||||
E400561E148D79B500EB22B9 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E400561D148D79B500EB22B9 /* Foundation.framework */; };
|
||||
E41EB471148D7BF50015DEDC /* BITAppVersionMetaInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB459148D7BF50015DEDC /* BITAppVersionMetaInfo.h */; };
|
||||
E41EB472148D7BF50015DEDC /* BITAppVersionMetaInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB45A148D7BF50015DEDC /* BITAppVersionMetaInfo.m */; };
|
||||
@@ -130,15 +125,12 @@
|
||||
E41EB47C148D7BF50015DEDC /* BITCrashManager.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB464148D7BF50015DEDC /* BITCrashManager.m */; };
|
||||
E41EB47D148D7BF50015DEDC /* BITHockeyManager.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB465148D7BF50015DEDC /* BITHockeyManager.h */; };
|
||||
E41EB47E148D7BF50015DEDC /* BITHockeyManager.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB466148D7BF50015DEDC /* BITHockeyManager.m */; };
|
||||
E41EB480148D7BF50015DEDC /* NSString+BITHockeyAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB468148D7BF50015DEDC /* NSString+BITHockeyAdditions.m */; };
|
||||
E41EB481148D7BF50015DEDC /* PSAppStoreHeader.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB469148D7BF50015DEDC /* PSAppStoreHeader.h */; };
|
||||
E41EB482148D7BF50015DEDC /* PSAppStoreHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB46A148D7BF50015DEDC /* PSAppStoreHeader.m */; };
|
||||
E41EB483148D7BF50015DEDC /* PSStoreButton.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB46B148D7BF50015DEDC /* PSStoreButton.h */; };
|
||||
E41EB484148D7BF50015DEDC /* PSStoreButton.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB46C148D7BF50015DEDC /* PSStoreButton.m */; };
|
||||
E41EB485148D7BF50015DEDC /* PSWebTableViewCell.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB46D148D7BF50015DEDC /* PSWebTableViewCell.h */; };
|
||||
E41EB486148D7BF50015DEDC /* PSWebTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB46E148D7BF50015DEDC /* PSWebTableViewCell.m */; };
|
||||
E41EB487148D7BF50015DEDC /* UIImage+BITHockeyAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB46F148D7BF50015DEDC /* UIImage+BITHockeyAdditions.h */; };
|
||||
E41EB488148D7BF50015DEDC /* UIImage+BITHockeyAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB470148D7BF50015DEDC /* UIImage+BITHockeyAdditions.m */; };
|
||||
E41EB48C148D7C4E0015DEDC /* CrashReporter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E41EB48B148D7C4E0015DEDC /* CrashReporter.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
@@ -213,11 +205,12 @@
|
||||
1E5955D515B72ED500A03429 /* BITUpdateManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = BITUpdateManager.m; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
|
||||
1E5955E215B751ED00A03429 /* BITUpdateViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BITUpdateViewController.h; sourceTree = "<group>"; };
|
||||
1E5955E615B751FB00A03429 /* BITUpdateViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BITUpdateViewController.m; sourceTree = "<group>"; };
|
||||
1E5955EA15B7538B00A03429 /* NSString+BITHockeyAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+BITHockeyAdditions.h"; sourceTree = "<group>"; };
|
||||
1E5955EE15B7752200A03429 /* BITUpdateManagerDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BITUpdateManagerDelegate.h; sourceTree = "<group>"; };
|
||||
1E5955FA15B7877A00A03429 /* BITHockeyManagerDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BITHockeyManagerDelegate.h; sourceTree = "<group>"; };
|
||||
1E66CA9115D4100500F35BED /* buildnumber.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = buildnumber.xcconfig; sourceTree = "<group>"; };
|
||||
1E71509A15B5C76F004E88FF /* HockeySDK.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HockeySDK.h; sourceTree = "<group>"; };
|
||||
1EB6046B15EF6B3200F69880 /* BITHockeyHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BITHockeyHelper.h; sourceTree = "<group>"; };
|
||||
1EB6046C15EF6B3200F69880 /* BITHockeyHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BITHockeyHelper.m; sourceTree = "<group>"; };
|
||||
1EDA60CF15C2C1450032D10B /* HockeySDK-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "HockeySDK-Info.plist"; sourceTree = "<group>"; };
|
||||
E400561A148D79B500EB22B9 /* libHockeySDK-iphoneos.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libHockeySDK-iphoneos.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
E400561D148D79B500EB22B9 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||
@@ -227,15 +220,12 @@
|
||||
E41EB464148D7BF50015DEDC /* BITCrashManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = BITCrashManager.m; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
|
||||
E41EB465148D7BF50015DEDC /* BITHockeyManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BITHockeyManager.h; sourceTree = "<group>"; };
|
||||
E41EB466148D7BF50015DEDC /* BITHockeyManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BITHockeyManager.m; sourceTree = "<group>"; };
|
||||
E41EB468148D7BF50015DEDC /* NSString+BITHockeyAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+BITHockeyAdditions.m"; sourceTree = "<group>"; };
|
||||
E41EB469148D7BF50015DEDC /* PSAppStoreHeader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PSAppStoreHeader.h; sourceTree = "<group>"; };
|
||||
E41EB46A148D7BF50015DEDC /* PSAppStoreHeader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PSAppStoreHeader.m; sourceTree = "<group>"; };
|
||||
E41EB46B148D7BF50015DEDC /* PSStoreButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PSStoreButton.h; sourceTree = "<group>"; };
|
||||
E41EB46C148D7BF50015DEDC /* PSStoreButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PSStoreButton.m; sourceTree = "<group>"; };
|
||||
E41EB46D148D7BF50015DEDC /* PSWebTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PSWebTableViewCell.h; sourceTree = "<group>"; };
|
||||
E41EB46E148D7BF50015DEDC /* PSWebTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PSWebTableViewCell.m; sourceTree = "<group>"; };
|
||||
E41EB46F148D7BF50015DEDC /* UIImage+BITHockeyAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+BITHockeyAdditions.h"; sourceTree = "<group>"; };
|
||||
E41EB470148D7BF50015DEDC /* UIImage+BITHockeyAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+BITHockeyAdditions.m"; sourceTree = "<group>"; };
|
||||
E41EB48B148D7C4E0015DEDC /* CrashReporter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CrashReporter.framework; path = ../Vendor/CrashReporter.framework; sourceTree = "<group>"; };
|
||||
E4E7335A148D7A5A00763A39 /* LICENSE.txt */ = {isa = PBXFileReference; lastKnownFileType = text; name = LICENSE.txt; path = ../LICENSE.txt; sourceTree = "<group>"; };
|
||||
E4E7335B148D7A5A00763A39 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = text; name = README.md; path = ../README.md; sourceTree = "<group>"; };
|
||||
@@ -396,16 +386,14 @@
|
||||
E41EB48A148D7C150015DEDC /* Helper */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1E5955EA15B7538B00A03429 /* NSString+BITHockeyAdditions.h */,
|
||||
E41EB468148D7BF50015DEDC /* NSString+BITHockeyAdditions.m */,
|
||||
E41EB469148D7BF50015DEDC /* PSAppStoreHeader.h */,
|
||||
E41EB46A148D7BF50015DEDC /* PSAppStoreHeader.m */,
|
||||
E41EB46B148D7BF50015DEDC /* PSStoreButton.h */,
|
||||
E41EB46C148D7BF50015DEDC /* PSStoreButton.m */,
|
||||
E41EB46D148D7BF50015DEDC /* PSWebTableViewCell.h */,
|
||||
E41EB46E148D7BF50015DEDC /* PSWebTableViewCell.m */,
|
||||
E41EB46F148D7BF50015DEDC /* UIImage+BITHockeyAdditions.h */,
|
||||
E41EB470148D7BF50015DEDC /* UIImage+BITHockeyAdditions.m */,
|
||||
1EB6046B15EF6B3200F69880 /* BITHockeyHelper.h */,
|
||||
1EB6046C15EF6B3200F69880 /* BITHockeyHelper.m */,
|
||||
);
|
||||
name = Helper;
|
||||
sourceTree = "<group>";
|
||||
@@ -428,12 +416,10 @@
|
||||
1E5955F615B77F6500A03429 /* HockeySDKPrivate.h in Headers */,
|
||||
1E01118115BB6311007002AC /* BITUpdateManagerPrivate.h in Headers */,
|
||||
1E01118215BB6314007002AC /* BITCrashManagerPrivate.h in Headers */,
|
||||
1E5955F215B77F5100A03429 /* NSString+BITHockeyAdditions.h in Headers */,
|
||||
1E01118D15BB83FB007002AC /* BITUpdateViewControllerPrivate.h in Headers */,
|
||||
1E5955F315B77F5600A03429 /* PSAppStoreHeader.h in Headers */,
|
||||
1E5954B615B6E17700A03429 /* PSStoreButton.h in Headers */,
|
||||
1E5955F415B77F5E00A03429 /* PSWebTableViewCell.h in Headers */,
|
||||
1E5955F515B77F6000A03429 /* UIImage+BITHockeyAdditions.h in Headers */,
|
||||
1E5954B815B6E19C00A03429 /* BITAppVersionMetaInfo.h in Headers */,
|
||||
1E59548715B6C51100A03429 /* BITCrashReportTextFormatter.h in Headers */,
|
||||
);
|
||||
@@ -451,14 +437,13 @@
|
||||
1E59547015B6C41300A03429 /* PSAppStoreHeader.h in Headers */,
|
||||
1E59547115B6C41300A03429 /* PSStoreButton.h in Headers */,
|
||||
1E59547215B6C41300A03429 /* PSWebTableViewCell.h in Headers */,
|
||||
1E59547315B6C41300A03429 /* UIImage+BITHockeyAdditions.h in Headers */,
|
||||
1E59547615B6C41300A03429 /* BITCrashReportTextFormatter.h in Headers */,
|
||||
1E5955A215B70F6900A03429 /* HockeySDKPrivate.h in Headers */,
|
||||
1E5955D315B72E5400A03429 /* BITCrashManager.h in Headers */,
|
||||
1E5955E415B751EE00A03429 /* BITUpdateViewController.h in Headers */,
|
||||
1E5955EC15B7538B00A03429 /* NSString+BITHockeyAdditions.h in Headers */,
|
||||
1E5955F015B7752300A03429 /* BITUpdateManagerDelegate.h in Headers */,
|
||||
1E5955FC15B7877B00A03429 /* BITHockeyManagerDelegate.h in Headers */,
|
||||
1EB6046E15EF6B3200F69880 /* BITHockeyHelper.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -473,15 +458,14 @@
|
||||
1E59558E15B6FDA500A03429 /* PSStoreButton.h in Headers */,
|
||||
1E59558F15B6FDA500A03429 /* PSWebTableViewCell.h in Headers */,
|
||||
1E59559B15B6FDA500A03429 /* HockeySDK.h in Headers */,
|
||||
1E59559015B6FDA500A03429 /* UIImage+BITHockeyAdditions.h in Headers */,
|
||||
1E59559215B6FDA500A03429 /* BITAppVersionMetaInfo.h in Headers */,
|
||||
1E59559915B6FDA500A03429 /* BITCrashReportTextFormatter.h in Headers */,
|
||||
1E5955A315B70F6900A03429 /* HockeySDKPrivate.h in Headers */,
|
||||
1E5955D415B72E5400A03429 /* BITCrashManager.h in Headers */,
|
||||
1E5955E515B751EE00A03429 /* BITUpdateViewController.h in Headers */,
|
||||
1E5955ED15B7538B00A03429 /* NSString+BITHockeyAdditions.h in Headers */,
|
||||
1E5955F115B7752300A03429 /* BITUpdateManagerDelegate.h in Headers */,
|
||||
1E5955FD15B7877B00A03429 /* BITHockeyManagerDelegate.h in Headers */,
|
||||
1EB6046F15EF6B3200F69880 /* BITHockeyHelper.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -497,14 +481,13 @@
|
||||
E41EB481148D7BF50015DEDC /* PSAppStoreHeader.h in Headers */,
|
||||
E41EB483148D7BF50015DEDC /* PSStoreButton.h in Headers */,
|
||||
E41EB485148D7BF50015DEDC /* PSWebTableViewCell.h in Headers */,
|
||||
E41EB487148D7BF50015DEDC /* UIImage+BITHockeyAdditions.h in Headers */,
|
||||
1E40BCB915A3494400BD64D9 /* BITCrashReportTextFormatter.h in Headers */,
|
||||
1E5955A115B70F6900A03429 /* HockeySDKPrivate.h in Headers */,
|
||||
1E5955D215B72E5400A03429 /* BITCrashManager.h in Headers */,
|
||||
1E5955E315B751EE00A03429 /* BITUpdateViewController.h in Headers */,
|
||||
1E5955EB15B7538B00A03429 /* NSString+BITHockeyAdditions.h in Headers */,
|
||||
1E5955EF15B7752300A03429 /* BITUpdateManagerDelegate.h in Headers */,
|
||||
1E5955FB15B7877B00A03429 /* BITHockeyManagerDelegate.h in Headers */,
|
||||
1EB6046D15EF6B3200F69880 /* BITHockeyHelper.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -719,15 +702,14 @@
|
||||
1E59545715B6C41300A03429 /* BITAppVersionMetaInfo.m in Sources */,
|
||||
1E59545C15B6C41300A03429 /* BITCrashManager.m in Sources */,
|
||||
1E59545D15B6C41300A03429 /* BITHockeyManager.m in Sources */,
|
||||
1E59545E15B6C41300A03429 /* NSString+BITHockeyAdditions.m in Sources */,
|
||||
1E59545F15B6C41300A03429 /* PSAppStoreHeader.m in Sources */,
|
||||
1E59546015B6C41300A03429 /* PSStoreButton.m in Sources */,
|
||||
1E59546115B6C41300A03429 /* PSWebTableViewCell.m in Sources */,
|
||||
1E59546215B6C41300A03429 /* UIImage+BITHockeyAdditions.m in Sources */,
|
||||
1E59546315B6C41300A03429 /* BITCrashReportTextFormatter.m in Sources */,
|
||||
1E59559E15B70F4D00A03429 /* HockeySDKPrivate.m in Sources */,
|
||||
1E5955D715B72ED500A03429 /* BITUpdateManager.m in Sources */,
|
||||
1E5955E815B751FB00A03429 /* BITUpdateViewController.m in Sources */,
|
||||
1EB6047115EF6B3200F69880 /* BITHockeyHelper.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -738,15 +720,14 @@
|
||||
1E5954CD15B6F24A00A03429 /* BITAppVersionMetaInfo.m in Sources */,
|
||||
1E5954D215B6F24A00A03429 /* BITCrashManager.m in Sources */,
|
||||
1E5954D315B6F24A00A03429 /* BITHockeyManager.m in Sources */,
|
||||
1E5954D415B6F24A00A03429 /* NSString+BITHockeyAdditions.m in Sources */,
|
||||
1E5954D515B6F24A00A03429 /* PSAppStoreHeader.m in Sources */,
|
||||
1E5954D615B6F24A00A03429 /* PSStoreButton.m in Sources */,
|
||||
1E5954D715B6F24A00A03429 /* PSWebTableViewCell.m in Sources */,
|
||||
1E5954D815B6F24A00A03429 /* UIImage+BITHockeyAdditions.m in Sources */,
|
||||
1E5954D915B6F24A00A03429 /* BITCrashReportTextFormatter.m in Sources */,
|
||||
1E59559F15B70F4D00A03429 /* HockeySDKPrivate.m in Sources */,
|
||||
1E5955D815B72ED500A03429 /* BITUpdateManager.m in Sources */,
|
||||
1E5955E915B751FB00A03429 /* BITUpdateViewController.m in Sources */,
|
||||
1EB6047215EF6B3200F69880 /* BITHockeyHelper.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -764,15 +745,14 @@
|
||||
E41EB472148D7BF50015DEDC /* BITAppVersionMetaInfo.m in Sources */,
|
||||
E41EB47C148D7BF50015DEDC /* BITCrashManager.m in Sources */,
|
||||
E41EB47E148D7BF50015DEDC /* BITHockeyManager.m in Sources */,
|
||||
E41EB480148D7BF50015DEDC /* NSString+BITHockeyAdditions.m in Sources */,
|
||||
E41EB482148D7BF50015DEDC /* PSAppStoreHeader.m in Sources */,
|
||||
E41EB484148D7BF50015DEDC /* PSStoreButton.m in Sources */,
|
||||
E41EB486148D7BF50015DEDC /* PSWebTableViewCell.m in Sources */,
|
||||
E41EB488148D7BF50015DEDC /* UIImage+BITHockeyAdditions.m in Sources */,
|
||||
1E40BCBA15A3494400BD64D9 /* BITCrashReportTextFormatter.m in Sources */,
|
||||
1E59559D15B70F4D00A03429 /* HockeySDKPrivate.m in Sources */,
|
||||
1E5955D615B72ED500A03429 /* BITUpdateManager.m in Sources */,
|
||||
1E5955E715B751FB00A03429 /* BITUpdateViewController.m in Sources */,
|
||||
1EB6047015EF6B3200F69880 /* BITHockeyHelper.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user