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;
|
||||
NSArray *icons = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleIconFiles"];
|
||||
if (!icons) {
|
||||
iconString = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleIconFile"];
|
||||
if (!iconString) {
|
||||
iconString = @"Icon.png";
|
||||
icons = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleIcons"];
|
||||
if ((icons) && ([icons isKindOfClass:[NSDictionary class]])) {
|
||||
icons = [icons valueForKeyPath:@"CFBundlePrimaryIcon.CFBundleIconFiles"];
|
||||
}
|
||||
} else {
|
||||
|
||||
if (!icons) {
|
||||
iconString = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleIconFile"];
|
||||
if (!iconString) {
|
||||
iconString = @"Icon.png";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (icons) {
|
||||
BOOL useHighResIcon = NO;
|
||||
BW_IF_IOS4_OR_GREATER(if ([UIScreen mainScreen].scale == 2.0f) useHighResIcon = YES;)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user