diff --git a/Config/BuildSettings.swift b/Config/BuildSettings.swift index d126c69ff..9ebc70be6 100644 --- a/Config/BuildSettings.swift +++ b/Config/BuildSettings.swift @@ -34,6 +34,12 @@ final class BuildSettings: NSObject { static let applicationCopyrightUrlString = "https://element.io/copyright" static let applicationPrivacyPolicyUrlString = "https://element.io/privacy" static let applicationTermsConditionsUrlString = "https://element.io/terms-of-service" + + + // Bug report + static let bugReportEndpointUrlString = "https://riot.im/bugreports" + // Use the name allocated by the bug report server + static let bugReportApplicationId = "riot-ios" /// Setting to force protection by pin code diff --git a/Riot/Assets/Riot-Defaults.plist b/Riot/Assets/Riot-Defaults.plist index a631b9f60..22ab568c4 100644 --- a/Riot/Assets/Riot-Defaults.plist +++ b/Riot/Assets/Riot-Defaults.plist @@ -77,10 +77,6 @@ 15066368 presenceColorForOfflineUser 15020851 - bugReportEndpointUrl - https://riot.im/bugreports - bugReportApp - riot-ios roomDirectoryServers matrix.org diff --git a/Riot/Modules/BugReport/BugReportViewController.m b/Riot/Modules/BugReport/BugReportViewController.m index 879fa5111..9eea1964e 100644 --- a/Riot/Modules/BugReport/BugReportViewController.m +++ b/Riot/Modules/BugReport/BugReportViewController.m @@ -282,11 +282,10 @@ _sendingContainer.hidden = NO; // Setup data to send - NSString *url = [[NSUserDefaults standardUserDefaults] objectForKey:@"bugReportEndpointUrl"]; - bugReportRestClient = [[MXBugReportRestClient alloc] initWithBugReportEndpoint:url]; + bugReportRestClient = [[MXBugReportRestClient alloc] initWithBugReportEndpoint:BuildSettings.bugReportEndpointUrlString]; // App info - bugReportRestClient.appName = [[NSUserDefaults standardUserDefaults] objectForKey:@"bugReportApp"]; // Use the name allocated by the bug report server + bugReportRestClient.appName = BuildSettings.bugReportApplicationId; bugReportRestClient.version = [AppDelegate theDelegate].appVersion; bugReportRestClient.build = [AppDelegate theDelegate].build;