|
|
|
|
@ -51,7 +51,7 @@ struct SupportButtonView: View { |
|
|
|
|
Text(message) |
|
|
|
|
} |
|
|
|
|
.sheet(item: $zipFilePath) { zipFilePath in |
|
|
|
|
MailComposeView(recipients: ["support@padelclub.app"], bccRecipients: nil, body: nil, subject: _getSubject(), attachmentURL: zipFilePath) { result in |
|
|
|
|
MailComposeView(recipients: ["support@padelclub.app"], bccRecipients: nil, body: _getBody(), subject: _getSubject(), attachmentURL: zipFilePath) { result in |
|
|
|
|
switch result { |
|
|
|
|
case .cancelled, .saved: |
|
|
|
|
self.zipFilePath = nil |
|
|
|
|
@ -78,6 +78,11 @@ struct SupportButtonView: View { |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private func _getBody() -> String { |
|
|
|
|
let separator = "---------------------------------------------" |
|
|
|
|
return ["token", Store.main.token(), separator, "userId", Store.main.userId, separator, "dataStore userId", DataStore.shared.user.id].compacted().joined(separator: "\n\n") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private func _getDeviceIdentifier() -> String { |
|
|
|
|
var systemInfo = utsname() |
|
|
|
|
uname(&systemInfo) |
|
|
|
|
|