mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-01 16:06:59 +00:00
Update appName handling
This commit is contained in:
parent
e6d76ca364
commit
59a0319ea9
@ -33,6 +33,7 @@
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "HockeySDK.h"
|
||||
#import "HockeySDKPrivate.h"
|
||||
#import "BITHockeyHelper.h"
|
||||
|
||||
#import "BITHockeyManagerPrivate.h"
|
||||
#import "BITHockeyBaseManagerPrivate.h"
|
||||
@ -444,9 +445,7 @@
|
||||
[self.delegate crashManagerWillShowSubmitCrashReportAlert:self];
|
||||
}
|
||||
|
||||
NSString *appName = [[[NSBundle mainBundle] localizedInfoDictionary] objectForKey:@"CFBundleDisplayName"];
|
||||
if (!appName)
|
||||
appName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"] ?: BITHockeyLocalizedString(@"HockeyAppNamePlaceholder");
|
||||
NSString *appName = bit_appName(BITHockeyLocalizedString(@"HockeyAppNamePlaceholder"));
|
||||
NSString *alertDescription = [NSString stringWithFormat:BITHockeyLocalizedString(@"CrashDataFoundAnonymousDescription"), appName];
|
||||
|
||||
// the crash report is not anynomous any more if username or useremail are not nil
|
||||
|
@ -47,7 +47,7 @@
|
||||
}
|
||||
|
||||
- (NSString *)activityTitle {
|
||||
NSString *appName = bit_appName();
|
||||
NSString *appName = bit_appName(BITHockeyLocalizedString(@"HockeyFeedbackActivityAppPlaceholder"));
|
||||
|
||||
return [NSString stringWithFormat:BITHockeyLocalizedString(@"HockeyFeedbackActivityButtonTitle"), appName];
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ NSString *bit_URLEncodedString(NSString *inputString);
|
||||
NSString *bit_URLDecodedString(NSString *inputString);
|
||||
NSComparisonResult bit_versionCompare(NSString *stringA, NSString *stringB);
|
||||
NSString *bit_encodeAppIdentifier(NSString *inputString);
|
||||
NSString *bit_appName(void);
|
||||
NSString *bit_appName(NSString *placeHolderString);
|
||||
|
||||
/* UIImage helpers */
|
||||
UIImage *bit_roundedCornerImage(UIImage *inputImage, NSInteger cornerSize, NSInteger borderSize);
|
||||
|
@ -82,13 +82,10 @@ NSString *bit_encodeAppIdentifier(NSString *inputString) {
|
||||
return (inputString ? bit_URLEncodedString(inputString) : bit_URLEncodedString([[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleIdentifier"]));
|
||||
}
|
||||
|
||||
NSString *bit_appName(void) {
|
||||
NSString *bit_appName(NSString *placeHolderString) {
|
||||
NSString *appName = [[[NSBundle mainBundle] localizedInfoDictionary] objectForKey:@"CFBundleDisplayName"];
|
||||
if (!appName)
|
||||
appName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"] ?: BITHockeyLocalizedString(@"HockeyFeedbackActivityAppPlaceholder");
|
||||
|
||||
if (!appName)
|
||||
appName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"];
|
||||
appName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"] ?: placeHolderString;
|
||||
|
||||
return appName;
|
||||
}
|
||||
|
@ -138,7 +138,7 @@
|
||||
}
|
||||
|
||||
if (shouldShowDefaultAlert) {
|
||||
NSString *appName = bit_appName();
|
||||
NSString *appName = bit_appName(BITHockeyLocalizedString(@"HockeyAppNamePlaceholder"));
|
||||
[self showBlockingScreen:[NSString stringWithFormat:BITHockeyLocalizedString(@"UpdateExpired"), appName] image:@"authorize_denied.png"];
|
||||
|
||||
if (self.delegate != nil && [self.delegate respondsToSelector:@selector(didDisplayExpiryAlertForUpdateManager:)]) {
|
||||
@ -940,7 +940,7 @@
|
||||
// populate with default values (if empty)
|
||||
if (![anAppVersions count]) {
|
||||
BITAppVersionMetaInfo *defaultApp = [[[BITAppVersionMetaInfo alloc] init] autorelease];
|
||||
defaultApp.name = bit_appName();
|
||||
defaultApp.name = bit_appName(BITHockeyLocalizedString(@"HockeyAppNamePlaceholder"));
|
||||
defaultApp.version = _currentAppVersion;
|
||||
defaultApp.shortVersion = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"];
|
||||
_appVersions = [[NSArray arrayWithObject:defaultApp] retain];
|
||||
|
Loading…
x
Reference in New Issue
Block a user