Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PLAYNEXT-1989 Add app and platform name in email subject for support #533

Merged
merged 1 commit into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Application/Sources/Helpers/SupportInformation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ import UIKit
DateFormatter.play_shortDateAndTime.string(from: Date())
}

private static var applicationName: String {
Bundle.main.object(forInfoDictionaryKey: "CFBundleDisplayName") as! String
}

private static var applicationIdentifier: String {
Bundle.main.object(forInfoDictionaryKey: "CFBundleIdentifier") as! String
}
Expand Down Expand Up @@ -125,6 +121,10 @@ import UIKit
}
#endif

static var applicationName: String {
Bundle.main.object(forInfoDictionaryKey: "CFBundleDisplayName") as! String
}

@objc static func generate(toMailBody: Bool = false) -> String {
var components = [String]()

Expand Down
3 changes: 2 additions & 1 deletion Application/Sources/Profile/ProfileHelp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,10 @@ import SwiftUI
}

private static func supportEmailMailComposeViewController(_ supportEmailAdress: String) -> UIViewController {
let subject = "[\(SupportInformation.applicationName)][Apple] \(NSLocalizedString("Report a technical issue", comment: "Subject of the technical issue mail"))"
let mailComposeView = MailComposeView()
.toRecipients([supportEmailAdress])
.subject(NSLocalizedString("Report a technical issue", comment: "Subject of the technical issue mail"))
.subject(subject)
.messageBody(SupportInformation.generate(toMailBody: true))

return UIHostingController(rootView: mailComposeView)
Expand Down
Loading