MESSENGER-4034 app icon name

This commit is contained in:
Arnfried Griesert
2023-02-08 14:53:45 +00:00
parent f163e917b3
commit 66b2259f7c
15 changed files with 72 additions and 17 deletions

View File

@@ -16,7 +16,7 @@
// App identity
BUNDLE_DISPLAY_NAME = BundesMessenger
BUNDLE_DISPLAY_NAME = Messenger
BASE_BUNDLE_IDENTIFIER = de.bwi.messenger
APPLICATION_GROUP_IDENTIFIER = group.de.messenger
APPLICATION_SCHEME = element

View File

@@ -74,6 +74,8 @@ class BWIBuildSettings: NSObject {
// MARK: -
var secondaryAppName = ""
// Location Sharing
// (this disables error messages when map laoding failed)
var locationSharingSSLProblemWorkaround = true

View File

@@ -20,6 +20,7 @@ import Foundation
extension BWIBuildSettings {
func overrideTargetSpecificSettings() {
secondaryAppName = "BundesMessenger"
authScreenShowRegister = true
showTopBanner = false
bwiShowDeveloperSettings = true

View File

@@ -16,7 +16,7 @@
// App identity
BUNDLE_DISPLAY_NAME = BundesMessenger
BUNDLE_DISPLAY_NAME = Messenger
BASE_BUNDLE_IDENTIFIER = de.bwi.messenger
APPLICATION_GROUP_IDENTIFIER = group.de.messenger
APPLICATION_SCHEME = element

View File

@@ -20,6 +20,7 @@ import Foundation
extension BWIBuildSettings {
func overrideTargetSpecificSettings() {
secondaryAppName = "BundesMessenger"
locationSharingEnabled = false
bwiLocationShareButtonVisible = false
}

View File

@@ -51,9 +51,10 @@ final class AppInfo: NSObject {
}
private static var bundleDisplayName: String {
guard let bundleDisplayName = Bundle.app.object(forInfoDictionaryKey: "CFBundleDisplayName") as? String else {
fatalError("CFBundleDisplayName should be defined")
if !BWIBuildSettings.shared.secondaryAppName.isEmpty {
return BWIBuildSettings.shared.secondaryAppName
} else {
return Bundle.main.object(forInfoDictionaryKey: "CFBundleDisplayName") as? String ?? ""
}
return bundleDisplayName
}
}

View File

@@ -3506,7 +3506,12 @@ NSString *const AppDelegateUniversalLinkDidChangeNotification = @"AppDelegateUni
callerDisplayname = event.sender;
}
NSString *appDisplayName = [[NSBundle mainBundle] infoDictionary][@"CFBundleDisplayName"];
NSString *appDisplayName;
if(![BWIBuildSettings.shared.secondaryAppName isEqualToString:@""]) {
appDisplayName = BWIBuildSettings.shared.secondaryAppName;
} else {
appDisplayName = [[NSBundle mainBundle] infoDictionary][@"CFBundleDisplayName"];
}
NSString *message = [VectorL10n noVoip:callerDisplayname :appDisplayName];

View File

@@ -25,7 +25,12 @@ final class CameraAccessAlertPresenter {
return
}
let appDisplayName = Bundle.main.infoDictionary?["CFBundleDisplayName"] as? String ?? ""
let appDisplayName: String
if !BWIBuildSettings.shared.secondaryAppName.isEmpty {
appDisplayName = BWIBuildSettings.shared.secondaryAppName
} else {
appDisplayName = Bundle.main.object(forInfoDictionaryKey: "CFBundleDisplayName") as? String ?? ""
}
let alert = UIAlertController(title: VectorL10n.camera, message: VectorL10n.cameraAccessNotGranted(appDisplayName), preferredStyle: .alert)

View File

@@ -928,7 +928,12 @@
NSString *displayName = myUser.displayname ?: myUser.userId;
displayName = displayName ?: @"";
NSString *appName = [[NSBundle mainBundle] infoDictionary][@"CFBundleDisplayName"];
NSString *appName;
if(![BWIBuildSettings.shared.secondaryAppName isEqualToString:@""]) {
appName = BWIBuildSettings.shared.secondaryAppName;
} else {
appName = [[NSBundle mainBundle] infoDictionary][@"CFBundleDisplayName"];
}
NSString *title = [VectorL10n homeEmptyViewTitle:appName :displayName];
[self.emptyView fillWith:[self emptyViewArtwork]

View File

@@ -362,7 +362,12 @@ static const CGFloat kLocalPreviewMargin = 20;
{
// Access to the camera is mandatory to display the self view
// Check the permission right now
NSString *appDisplayName = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleDisplayName"];
NSString *appDisplayName;
if(![BWIBuildSettings.shared.secondaryAppName isEqualToString:@""]) {
appDisplayName = BWIBuildSettings.shared.secondaryAppName;
} else {
appDisplayName = [[NSBundle mainBundle] infoDictionary][@"CFBundleDisplayName"];
}
[MXKTools checkAccessForMediaType:AVMediaTypeVideo
manualChangeMessage:[VectorL10n cameraAccessNotGrantedForCall:appDisplayName]
@@ -638,7 +643,12 @@ static const CGFloat kLocalPreviewMargin = 20;
{
// If we are here, we have access to the camera
// The following check is mainly to check microphone access permission
NSString *appDisplayName = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleDisplayName"];
NSString *appDisplayName;
if(![BWIBuildSettings.shared.secondaryAppName isEqualToString:@""]) {
appDisplayName = BWIBuildSettings.shared.secondaryAppName;
} else {
appDisplayName = [[NSBundle mainBundle] infoDictionary][@"CFBundleDisplayName"];
}
[MXKTools checkAccessForCall:mxCall.isVideoCall
manualChangeMessageForAudio:[VectorL10n microphoneAccessNotGrantedForCall:appDisplayName]

View File

@@ -1515,7 +1515,12 @@ static NSArray<NSNumber*> *initialSyncSilentErrorsHTTPStatusCodes;
return;
}
NSString *appDisplayName = [NSString stringWithFormat:@"%@ (iOS)", [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"]];
NSString *appDisplayName;
if(![BWIBuildSettings.shared.secondaryAppName isEqualToString:@""]) {
appDisplayName = BWIBuildSettings.shared.secondaryAppName;
} else {
appDisplayName = [[NSBundle mainBundle] infoDictionary][@"CFBundleDisplayName"];
}
NSString *b64Token = [token base64EncodedStringWithOptions:0];

View File

@@ -1174,7 +1174,12 @@ NSString *const MXKContactManagerDataType = @"org.matrix.kit.MXKContactManagerDa
+ (void)requestUserConfirmationForLocalContactsSyncInViewController:(UIViewController *)viewController completionHandler:(void (^)(BOOL))handler
{
NSString *appDisplayName = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleDisplayName"];
NSString *appDisplayName;
if(![BWIBuildSettings.shared.secondaryAppName isEqualToString:@""]) {
appDisplayName = BWIBuildSettings.shared.secondaryAppName;
} else {
appDisplayName = [[NSBundle mainBundle] infoDictionary][@"CFBundleDisplayName"];
}
[MXKContactManager requestUserConfirmationForLocalContactsSyncWithTitle:[VectorL10n localContactsAccessDiscoveryWarningTitle]
message:[VectorL10n localContactsAccessDiscoveryWarning:appDisplayName]

View File

@@ -257,8 +257,13 @@
- (void)presentPermissionDeniedAlert
{
NSString *appDisplayName = [[NSBundle mainBundle] infoDictionary][@"CFBundleDisplayName"];
NSString *appDisplayName;
if(![BWIBuildSettings.shared.secondaryAppName isEqualToString:@""]) {
appDisplayName = BWIBuildSettings.shared.secondaryAppName;
} else {
appDisplayName = [[NSBundle mainBundle] infoDictionary][@"CFBundleDisplayName"];
}
NSString *message = [VectorL10n photoLibraryAccessNotGranted:appDisplayName];
UIAlertController *alert = [UIAlertController alertControllerWithTitle:[VectorL10n mediaPickerTitle]

View File

@@ -45,7 +45,11 @@ import MatomoTracker
var session: MXSession? = nil
private override init() {
appName = Bundle.main.object(forInfoDictionaryKey: "CFBundleDisplayName") as! String
if !BWIBuildSettings.shared.secondaryAppName.isEmpty {
appName = BWIBuildSettings.shared.secondaryAppName
} else {
appName = Bundle.main.object(forInfoDictionaryKey: "CFBundleDisplayName") as! String
}
appVersion = AppDelegate.theDelegate().appVersion
if BWIBuildSettings.shared.bwiEnableErrorTracking {

View File

@@ -72,8 +72,14 @@ import WebKit
flavor = ServerURLHelper.shared.flavor()!
}
guard let appName = Bundle.main.object(forInfoDictionaryKey: "CFBundleDisplayName"),
let version = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString"),
let appName: String
if !BWIBuildSettings.shared.secondaryAppName.isEmpty {
appName = BWIBuildSettings.shared.secondaryAppName
} else {
appName = Bundle.main.object(forInfoDictionaryKey: "CFBundleDisplayName") as! String
}
guard let version = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString"),
let build = Bundle.main.object(forInfoDictionaryKey: "CFBundleVersion"),
let network = self.networkVersion(),
let darwin = self.darwinVersion()