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