mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Added icon logic for iOS5 plist key.
This commit is contained in:
parent
9b382df3a1
commit
bc19cd7c13
@ -347,11 +347,20 @@
|
|||||||
NSString *iconString = nil;
|
NSString *iconString = nil;
|
||||||
NSArray *icons = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleIconFiles"];
|
NSArray *icons = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleIconFiles"];
|
||||||
if (!icons) {
|
if (!icons) {
|
||||||
iconString = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleIconFile"];
|
icons = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleIcons"];
|
||||||
if (!iconString) {
|
if ((icons) && ([icons isKindOfClass:[NSDictionary class]])) {
|
||||||
iconString = @"Icon.png";
|
icons = [icons valueForKeyPath:@"CFBundlePrimaryIcon.CFBundleIconFiles"];
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
|
if (!icons) {
|
||||||
|
iconString = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleIconFile"];
|
||||||
|
if (!iconString) {
|
||||||
|
iconString = @"Icon.png";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (icons) {
|
||||||
BOOL useHighResIcon = NO;
|
BOOL useHighResIcon = NO;
|
||||||
BW_IF_IOS4_OR_GREATER(if ([UIScreen mainScreen].scale == 2.0f) useHighResIcon = YES;)
|
BW_IF_IOS4_OR_GREATER(if ([UIScreen mainScreen].scale == 2.0f) useHighResIcon = YES;)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user