From 29bd2f078791151b2271ec1278110330977c1ad4 Mon Sep 17 00:00:00 2001 From: Frederic Jacobs Date: Sat, 19 Jul 2014 13:30:19 -1000 Subject: [PATCH] Closes #25 --- Signal.xcodeproj/project.pbxproj | 1 + Signal/src/view controllers/SettingsViewController.m | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Signal.xcodeproj/project.pbxproj b/Signal.xcodeproj/project.pbxproj index be4d0c15e..eb820004f 100644 --- a/Signal.xcodeproj/project.pbxproj +++ b/Signal.xcodeproj/project.pbxproj @@ -3549,6 +3549,7 @@ "DEBUG=1", "$(inherited)", HAVE_CONFIG_H, + "ADHOC=1", ); GCC_STRICT_ALIASING = NO; GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR = NO; diff --git a/Signal/src/view controllers/SettingsViewController.m b/Signal/src/view controllers/SettingsViewController.m index 45d1f2197..dcec07103 100644 --- a/Signal/src/view controllers/SettingsViewController.m +++ b/Signal/src/view controllers/SettingsViewController.m @@ -331,7 +331,16 @@ static NSString *const CHECKBOX_EMPTY_IMAGE_NAME = @"checkbox_empty"; } - (void)submitEmail:(NSString*)url{ - NSString *urlString = [NSString stringWithString: [@"mailto:support@whispersystems.org?subject=iOS%20Debug%20Log&body=" stringByAppendingString:[[NSString stringWithFormat:@"Log URL: %@ \n Tell us about the issue: ", url]stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding]]]; + NSString *emailAddress; + +#ifdef ADHOC + emailAddress = @"signal-beta@fredericjacobs.com"; +#else + emailAddress = @"support@whispersystems.org"; +#endif + + NSString *urlString = [NSString stringWithString: [[NSString stringWithFormat:@"mailto:%@?subject=iOS%%20Debug%%20Log&body=", emailAddress] stringByAppendingString:[[NSString stringWithFormat:@"Log URL: %@ \n Tell us about the issue: ", url]stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding]]]; + [[UIApplication sharedApplication] openURL: [NSURL URLWithString: urlString]]; }