├── .gitmodules
├── Stealth Messenger
├── Resources
│ ├── Icon.png
│ └── Icon@2x.png
├── AppDelegate.h
├── main.m
├── Stealth Messenger-Prefix.pch
├── StealthSender.h
├── AppDelegate.m
├── MessageViewController.h
├── Stealth Messenger-Info.plist
├── MessageViewController.m
├── StealthSender.m
└── en.lproj
│ └── MessageViewController.xib
├── Stealth Messenger.xcodeproj
├── project.xcworkspace
│ └── contents.xcworkspacedata
└── project.pbxproj
└── README.md
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "ABGetMe"]
2 | path = ABGetMe
3 | url = git://github.com/0xced/ABGetMe.git
4 |
--------------------------------------------------------------------------------
/Stealth Messenger/Resources/Icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/0xced/Stealth-Messenger/HEAD/Stealth Messenger/Resources/Icon.png
--------------------------------------------------------------------------------
/Stealth Messenger/Resources/Icon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/0xced/Stealth-Messenger/HEAD/Stealth Messenger/Resources/Icon@2x.png
--------------------------------------------------------------------------------
/Stealth Messenger.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Stealth Messenger/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // Stealth Messenger
4 | //
5 | // Created by Cédric Luthi on 17.10.11.
6 | // Copyright (c) 2011 Cédric Luthi. All rights reserved.
7 | //
8 |
9 | @interface AppDelegate : UIResponder
10 |
11 | @property (nonatomic, strong) UIWindow *window;
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/Stealth Messenger/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // Stealth Messenger
4 | //
5 | // Created by Cédric Luthi on 17.10.11.
6 | // Copyright (c) 2011 Cédric Luthi. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 |
11 | int main(int argc, char *argv[])
12 | {
13 | @autoreleasepool
14 | {
15 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | About
2 | =====
3 |
4 | **Stealth Messenger** demonstrates how to use `MFMailComposeViewController`, `MFMessageComposeViewController` and `TWTweetComposeViewController` to send respectively an email, SMS/iMessage or tweet without any user interaction.
5 |
6 | Stealth Messenger has been tested on iOS 4 and 5.
7 |
8 | Usage
9 | =====
10 |
11 | **Do not use!** This stuff is for education purpose only and is not suitable for the App Store at all.
12 |
--------------------------------------------------------------------------------
/Stealth Messenger/Stealth Messenger-Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header for all source files of the 'Stealth Messenger' target in the 'Stealth Messenger' project
3 | //
4 |
5 | #import
6 |
7 | #ifndef __IPHONE_4_0
8 | #warning "This project uses features only available in iOS SDK 4.0 and later."
9 | #endif
10 |
11 | #ifdef __OBJC__
12 | #import
13 | #import
14 | #import
15 | #import
16 | #import
17 | #endif
18 |
--------------------------------------------------------------------------------
/Stealth Messenger/StealthSender.h:
--------------------------------------------------------------------------------
1 | //
2 | // StealthSender.h
3 | // Stealth Messenger
4 | //
5 | // Created by Cédric Luthi on 17.10.11.
6 | // Copyright (c) 2011 Cédric Luthi. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | typedef void (^ComposeViewControllerCompletionHandler)(BOOL success);
12 |
13 | @interface StealthSender : NSObject
14 |
15 | - (id) initWithComposeViewController:(UIViewController *)composeViewController;
16 |
17 | - (void) sendWithCompletionHandler:(ComposeViewControllerCompletionHandler)completionHandler;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/Stealth Messenger/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // Stealth Messenger
4 | //
5 | // Created by Cédric Luthi on 17.10.11.
6 | // Copyright (c) 2011 Cédric Luthi. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 |
11 | #import "MessageViewController.h"
12 |
13 | @implementation AppDelegate
14 |
15 | @synthesize window = _window;
16 |
17 | - (BOOL) application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
18 | {
19 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
20 | self.window.rootViewController = [[MessageViewController alloc] initWithNibName:@"MessageViewController" bundle:nil];
21 | [self.window makeKeyAndVisible];
22 | return YES;
23 | }
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/Stealth Messenger/MessageViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // MessageViewController.h
3 | // Stealth Messenger
4 | //
5 | // Created by Cédric Luthi on 17.10.11.
6 | // Copyright (c) 2011 Cédric Luthi. All rights reserved.
7 | //
8 |
9 | @interface MessageViewController : UIViewController
10 |
11 | @property (nonatomic, assign) IBOutlet UISegmentedControl *messageSegmentedControl;
12 | @property (nonatomic, assign) IBOutlet UILabel *recipientLabel;
13 | @property (nonatomic, assign) IBOutlet UITextField *recipientField;
14 | @property (nonatomic, assign) IBOutlet UIButton *sendButton;
15 | @property (nonatomic, assign) IBOutlet UILabel *statusLabel;
16 | @property (nonatomic, assign) IBOutlet UITextView *textView;
17 |
18 | - (IBAction) changeMessageKind:(id)sender;
19 | - (IBAction) sendMessage:(id)sender;
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/Stealth Messenger/Stealth Messenger-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | Messenger
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleIconFiles
12 |
13 | Icon.png
14 | Icon@2x.png
15 |
16 | CFBundleIdentifier
17 | ch.pitaya.${PRODUCT_NAME:rfc1034identifier}
18 | CFBundleInfoDictionaryVersion
19 | 6.0
20 | CFBundleName
21 | ${PRODUCT_NAME}
22 | CFBundlePackageType
23 | APPL
24 | CFBundleShortVersionString
25 | ${CURRENT_PROJECT_VERSION}
26 | CFBundleVersion
27 | ${CURRENT_PROJECT_VERSION}
28 | LSRequiresIPhoneOS
29 |
30 | UISupportedInterfaceOrientations
31 |
32 | UIInterfaceOrientationPortrait
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/Stealth Messenger/MessageViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // MessageViewController.m
3 | // Stealth Messenger
4 | //
5 | // Created by Cédric Luthi on 17.10.11.
6 | // Copyright (c) 2011 Cédric Luthi. All rights reserved.
7 | //
8 |
9 | #import "MessageViewController.h"
10 |
11 | #import "ABGetMe.h"
12 | #import "StealthSender.h"
13 |
14 | NSString *myEmail(void)
15 | {
16 | ABAddressBookRef addressBook = ABAddressBookCreate();
17 | ABRecordRef me = ABGetMe(addressBook);
18 | NSString *email = nil;
19 | if (me)
20 | {
21 | ABMultiValueRef emails = ABRecordCopyValue(me, kABPersonEmailProperty);
22 | if (emails)
23 | {
24 | CFIndex emailCount = ABMultiValueGetCount(emails);
25 | if (emailCount > 0)
26 | email = CFBridgingRelease(ABMultiValueCopyValueAtIndex(emails, 0));
27 |
28 | CFRelease(emails);
29 | }
30 | }
31 | CFRelease(addressBook);
32 |
33 | return email;
34 | }
35 |
36 | NSString *myMobilePhoneNumber(void)
37 | {
38 | ABAddressBookRef addressBook = ABAddressBookCreate();
39 | ABRecordRef me = ABGetMe(addressBook);
40 | NSString *mobilePhoneNumber = nil;
41 | if (me)
42 | {
43 | ABMultiValueRef phones = ABRecordCopyValue(me, kABPersonPhoneProperty);
44 | if (phones)
45 | {
46 | for (CFIndex i = 0; i < ABMultiValueGetCount(phones); i++)
47 | {
48 | NSString *label = CFBridgingRelease(ABMultiValueCopyLabelAtIndex(phones, i));
49 | if ([label isEqualToString:(id)kABPersonPhoneIPhoneLabel] || [label isEqualToString:(id)kABPersonPhoneMobileLabel])
50 | {
51 | mobilePhoneNumber = CFBridgingRelease(ABMultiValueCopyValueAtIndex(phones, i));
52 | break;
53 | }
54 | }
55 | CFRelease(phones);
56 | }
57 | }
58 | CFRelease(addressBook);
59 |
60 | return mobilePhoneNumber;
61 | }
62 |
63 | NSString *myTwitterName(void)
64 | {
65 | #if 0
66 | if (![ACAccountStore class])
67 | return nil;
68 |
69 | ACAccountStore *accountStore = [[ACAccountStore alloc] init];
70 | ACAccountType *twitterAccountType = [accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierTwitter];
71 | [accountStore requestAccessToAccountsWithType:twitterAccountType withCompletionHandler:^(BOOL granted, NSError *error) {}];
72 | ACAccount *twitterAccount = [[accountStore accountsWithAccountType:twitterAccountType] lastObject];
73 | return twitterAccount.username;
74 | #else
75 | return nil;
76 | #endif
77 | }
78 |
79 | @implementation MessageViewController
80 |
81 | @synthesize messageSegmentedControl = _messageSegmentedControl;
82 | @synthesize recipientLabel = _recipientLabel;
83 | @synthesize recipientField = _recipientField;
84 | @synthesize sendButton = _sendButton;
85 | @synthesize statusLabel = _statusLabel;
86 | @synthesize textView = _textView;
87 |
88 | - (void) viewDidLoad
89 | {
90 | [super viewDidLoad];
91 |
92 | [self.textView becomeFirstResponder];
93 | }
94 |
95 | - (void) updateView
96 | {
97 | self.statusLabel.text = nil;
98 |
99 | NSString *title = [[self.messageSegmentedControl titleForSegmentAtIndex:self.messageSegmentedControl.selectedSegmentIndex] lowercaseString];
100 | self.textView.text = [NSString stringWithFormat:@"This %@ was sent with Stealth Messenger - https://github.com/0xced/Stealth-Messenger", title];
101 |
102 | switch (self.messageSegmentedControl.selectedSegmentIndex)
103 | {
104 | case 0: // Email
105 | self.recipientField.text = myEmail();
106 | self.sendButton.enabled = [MFMailComposeViewController canSendMail];
107 | break;
108 |
109 | case 1: // SMS
110 | self.recipientField.text = myMobilePhoneNumber();
111 | self.sendButton.enabled = [MFMessageComposeViewController canSendText];
112 | break;
113 |
114 | case 2: // Twitter
115 | self.recipientField.text = myTwitterName();
116 | self.sendButton.enabled = [TWTweetComposeViewController canSendTweet];
117 | break;
118 |
119 | default:
120 | break;
121 | }
122 | }
123 |
124 | - (void) viewWillAppear:(BOOL)animated
125 | {
126 | [super viewWillAppear:animated];
127 |
128 | [self updateView];
129 | }
130 |
131 | // MARK: - Actions
132 |
133 | - (IBAction) changeMessageKind:(UISegmentedControl *)segmentedControl
134 | {
135 | [self updateView];
136 | }
137 |
138 | - (IBAction) sendMessage:(id)sender
139 | {
140 | UIViewController *composeViewController = nil;
141 | switch (self.messageSegmentedControl.selectedSegmentIndex)
142 | {
143 | case 0: // Email
144 | {
145 | MFMailComposeViewController *mailComposeViewController = [[MFMailComposeViewController alloc] init];
146 | [mailComposeViewController setToRecipients:[NSArray arrayWithObject:self.recipientField.text]];
147 | [mailComposeViewController setSubject:@"Stealth email"];
148 | [mailComposeViewController setMessageBody:self.textView.text isHTML:NO];
149 | composeViewController = mailComposeViewController;
150 | break;
151 | }
152 |
153 | case 1: // SMS
154 | {
155 | MFMessageComposeViewController *messageComposeViewController = [[MFMessageComposeViewController alloc] init];
156 | messageComposeViewController.recipients = [NSArray arrayWithObject:self.recipientField.text];
157 | messageComposeViewController.body = self.textView.text;
158 | composeViewController = messageComposeViewController;
159 | break;
160 | }
161 |
162 | case 2: // Tweet
163 | {
164 | TWTweetComposeViewController *tweetComposeViewController = [[TWTweetComposeViewController alloc] init];
165 | [tweetComposeViewController setInitialText:self.recipientField.text.length > 0 ? [NSString stringWithFormat:@"D %@ %@", self.recipientField.text, self.textView.text] : self.textView.text];
166 | composeViewController = tweetComposeViewController;
167 | break;
168 | }
169 |
170 | default:
171 | break;
172 | }
173 |
174 | self.statusLabel.text = @"\u2026";
175 |
176 | StealthSender *stealthSender = [[StealthSender alloc] initWithComposeViewController:composeViewController];
177 | [stealthSender sendWithCompletionHandler:^(BOOL success) {
178 | self.statusLabel.text = success ? @"\u2714" : @"\u2718";
179 | }];
180 | }
181 |
182 | // MARK: - UITextField delegate
183 |
184 | - (BOOL) textFieldShouldReturn:(UITextField *)textField
185 | {
186 | [self sendMessage:textField];
187 | return YES;
188 | }
189 |
190 | @end
191 |
--------------------------------------------------------------------------------
/Stealth Messenger/StealthSender.m:
--------------------------------------------------------------------------------
1 | //
2 | // StealthSender.m
3 | // Stealth Messenger
4 | //
5 | // Created by Cédric Luthi on 17.10.11.
6 | // Copyright (c) 2011 Cédric Luthi. All rights reserved.
7 | //
8 |
9 | #import "StealthSender.h"
10 |
11 | #import
12 | #import
13 |
14 | @interface StealthSender ()
15 |
16 | @property (nonatomic, assign) BOOL isMailViewController;
17 | @property (nonatomic, assign) BOOL isMessageViewController;
18 | @property (nonatomic, assign) BOOL isTweetViewController;
19 | @property (nonatomic, strong) UIViewController *composeViewController;
20 | @property (nonatomic, copy) ComposeViewControllerCompletionHandler completionHandler;
21 | @property (nonatomic, strong) id myself;
22 |
23 | - (void) sendMail;
24 | - (void) sendMessage;
25 | - (void) sendTweet;
26 |
27 | @end
28 |
29 | @implementation StealthSender
30 |
31 | @synthesize isMailViewController = _isMailViewController;
32 | @synthesize isMessageViewController = _isMessageViewController;
33 | @synthesize isTweetViewController = _isTweetViewController;
34 | @synthesize composeViewController = _composeViewController;
35 | @synthesize completionHandler = _completionHandler;
36 | @synthesize myself = _myself;
37 |
38 | - (id) initWithComposeViewController:(UIViewController *)composeViewController
39 | {
40 | if (!(self = [super init]))
41 | return nil;
42 |
43 | self.isMailViewController = [composeViewController isKindOfClass:[MFMailComposeViewController class]];
44 | self.isMessageViewController = [composeViewController isKindOfClass:[MFMessageComposeViewController class]];
45 | self.isTweetViewController = [composeViewController isKindOfClass:[TWTweetComposeViewController class]];
46 | self.composeViewController = composeViewController;
47 |
48 | if (!(self.isMailViewController || self.isMessageViewController || self.isTweetViewController))
49 | @throw [NSException exceptionWithName:NSInvalidArgumentException reason:@"The composeViewController argument must be an instance of MFMailComposeViewController, MFMessageComposeViewController or TWTweetComposeViewController." userInfo:nil];
50 |
51 | return self;
52 | }
53 |
54 | - (void) sendWithCompletionHandler:(ComposeViewControllerCompletionHandler)completionHandler
55 | {
56 | self.myself = self;
57 |
58 | self.completionHandler = completionHandler;
59 |
60 | if (self.isMailViewController)
61 | [self sendMail];
62 | else if (self.isMessageViewController)
63 | [self sendMessage];
64 | else if (self.isTweetViewController)
65 | [self sendTweet];
66 | }
67 |
68 | - (void) executeCompletionHandler:(BOOL)success
69 | {
70 | dispatch_async(dispatch_get_main_queue(), ^{
71 | if (self.completionHandler)
72 | self.completionHandler(success);
73 |
74 | self.myself = nil;
75 | });
76 | }
77 |
78 | // MARK: - Email
79 |
80 | - (void) sendMail
81 | {
82 | MFMailComposeViewController *mailComposeViewController = (MFMailComposeViewController*)self.composeViewController;
83 | mailComposeViewController.mailComposeDelegate = self;
84 |
85 | [mailComposeViewController viewWillAppear:NO];
86 | [mailComposeViewController view];
87 | [mailComposeViewController viewDidAppear:NO];
88 |
89 | [self performSelector:@selector(failMail) withObject:nil afterDelay:3.0];
90 | }
91 |
92 | - (void) failMail
93 | {
94 | [self executeCompletionHandler:NO];
95 | }
96 |
97 | - (void) mailComposeController:(MFMailComposeViewController*)mailComposeViewController bodyFinishedLoadingWithResult:(NSInteger)result error:(NSError*)error
98 | {
99 | [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(failMail) object:nil];
100 |
101 | @try
102 | {
103 | Class MFMailComposeController = NSClassFromString(@"MFMailComposeController");
104 | id mailComposeController = [mailComposeViewController valueForKeyPath:@"internal"];
105 | if (![mailComposeController isKindOfClass:MFMailComposeController])
106 | mailComposeController = [mailComposeController valueForKey:@"mailComposeController"]; // iOS < 5: internal isa MFMailComposeRootViewController
107 |
108 | id sendButtonItem = nil;
109 | @try
110 | {
111 | sendButtonItem = [mailComposeController valueForKey:@"sendButtonItem"];
112 | }
113 | @catch (NSException *exception)
114 | {
115 | sendButtonItem = [mailComposeViewController valueForKeyPath:@"internal.mailComposeView.sendButtonItem"];
116 | }
117 | [mailComposeController performSelector:@selector(send:) withObject:sendButtonItem];
118 | }
119 | @catch (NSException *exception)
120 | {
121 | [self failMail];
122 | }
123 | }
124 |
125 | - (void) mailComposeController:(MFMailComposeViewController *)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError *)error
126 | {
127 | [self executeCompletionHandler:result == MFMailComposeResultSent];
128 | }
129 |
130 | // MARK: - SMS
131 |
132 | - (void) sendMessage
133 | {
134 | MFMessageComposeViewController *messageComposeViewController = (MFMessageComposeViewController*)self.composeViewController;
135 | messageComposeViewController.messageComposeDelegate = self;
136 |
137 | [messageComposeViewController viewWillAppear:NO];
138 | [messageComposeViewController view];
139 | [messageComposeViewController viewDidAppear:NO];
140 | UIViewController *topViewController = [messageComposeViewController topViewController];
141 | @try
142 | {
143 | // topViewController is a CKSMSComposeController : CKTranscriptController
144 | [topViewController viewWillAppear:NO];
145 | [topViewController view];
146 | [topViewController viewDidAppear:NO];
147 | id entryView = [topViewController valueForKey:@"entryView"];
148 | if ([entryView respondsToSelector:@selector(send:)])
149 | [entryView performSelector:@selector(send:) withObject:nil];
150 | else
151 | [self executeCompletionHandler:NO];
152 | }
153 | @catch (NSException *exception)
154 | {
155 | [self executeCompletionHandler:NO];
156 | }
157 | }
158 |
159 | - (void) messageComposeViewController:(MFMessageComposeViewController *)controller didFinishWithResult:(MessageComposeResult)result
160 | {
161 | [self executeCompletionHandler:result == MessageComposeResultSent];
162 | }
163 |
164 | // MARK: - Tweet
165 |
166 | - (void) sendTweet
167 | {
168 | TWTweetComposeViewController *tweetComposeViewController = (TWTweetComposeViewController *)self.composeViewController;
169 | tweetComposeViewController.completionHandler = ^(TWTweetComposeViewControllerResult result){
170 | [self executeCompletionHandler:result == TWTweetComposeViewControllerResultDone];
171 | };
172 |
173 | @try
174 | {
175 | [tweetComposeViewController view];
176 |
177 | if ([tweetComposeViewController respondsToSelector:@selector(send:)])
178 | [tweetComposeViewController performSelector:@selector(send:) withObject:nil];
179 | else
180 | [self executeCompletionHandler:NO];
181 | }
182 | @catch (NSException *exception)
183 | {
184 | [self executeCompletionHandler:NO];
185 | }
186 | }
187 |
188 | @end
189 |
--------------------------------------------------------------------------------
/Stealth Messenger.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | DA124A7A144C54620034188F /* MessageUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA124A79144C54620034188F /* MessageUI.framework */; };
11 | DA124A82144C54D20034188F /* Twitter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA124A81144C54D20034188F /* Twitter.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
12 | DA124A85144C5A620034188F /* StealthSender.m in Sources */ = {isa = PBXBuildFile; fileRef = DA124A84144C5A620034188F /* StealthSender.m */; };
13 | DA2CCDE0144D638B006D8D9C /* ABGetMe.m in Sources */ = {isa = PBXBuildFile; fileRef = DA2CCDDF144D638B006D8D9C /* ABGetMe.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
14 | DA2CCDE3144D6445006D8D9C /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA2CCDE2144D6445006D8D9C /* AddressBook.framework */; };
15 | DA39C774144F292100032D92 /* Accounts.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA39C773144F292100032D92 /* Accounts.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
16 | DA8AC901144C522C00C6979E /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = DA8AC8FF144C522C00C6979E /* Icon.png */; };
17 | DA8AC902144C522C00C6979E /* Icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = DA8AC900144C522C00C6979E /* Icon@2x.png */; };
18 | DACC7B06144C1D4100C8D1BB /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DACC7B05144C1D4100C8D1BB /* UIKit.framework */; };
19 | DACC7B08144C1D4100C8D1BB /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DACC7B07144C1D4100C8D1BB /* Foundation.framework */; };
20 | DACC7B0A144C1D4100C8D1BB /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DACC7B09144C1D4100C8D1BB /* CoreGraphics.framework */; };
21 | DACC7B0F144C1D4100C8D1BB /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = DACC7B0E144C1D4100C8D1BB /* main.m */; };
22 | DACC7B13144C1D4100C8D1BB /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DACC7B12144C1D4100C8D1BB /* AppDelegate.m */; };
23 | DACC7B16144C1D4100C8D1BB /* MessageViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DACC7B15144C1D4100C8D1BB /* MessageViewController.m */; };
24 | DACC7B19144C1D4100C8D1BB /* MessageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = DACC7B17144C1D4100C8D1BB /* MessageViewController.xib */; };
25 | /* End PBXBuildFile section */
26 |
27 | /* Begin PBXFileReference section */
28 | DA124A79144C54620034188F /* MessageUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MessageUI.framework; path = System/Library/Frameworks/MessageUI.framework; sourceTree = SDKROOT; };
29 | DA124A81144C54D20034188F /* Twitter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Twitter.framework; path = System/Library/Frameworks/Twitter.framework; sourceTree = SDKROOT; };
30 | DA124A83144C5A620034188F /* StealthSender.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StealthSender.h; sourceTree = ""; };
31 | DA124A84144C5A620034188F /* StealthSender.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StealthSender.m; sourceTree = ""; };
32 | DA2CCDDE144D638B006D8D9C /* ABGetMe.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ABGetMe.h; sourceTree = ""; };
33 | DA2CCDDF144D638B006D8D9C /* ABGetMe.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ABGetMe.m; sourceTree = ""; };
34 | DA2CCDE2144D6445006D8D9C /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = System/Library/Frameworks/AddressBook.framework; sourceTree = SDKROOT; };
35 | DA39C773144F292100032D92 /* Accounts.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accounts.framework; path = System/Library/Frameworks/Accounts.framework; sourceTree = SDKROOT; };
36 | DA8AC8FF144C522C00C6979E /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Icon.png; sourceTree = ""; };
37 | DA8AC900144C522C00C6979E /* Icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon@2x.png"; sourceTree = ""; };
38 | DACC7B01144C1D4100C8D1BB /* Stealth Messenger.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Stealth Messenger.app"; sourceTree = BUILT_PRODUCTS_DIR; };
39 | DACC7B05144C1D4100C8D1BB /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
40 | DACC7B07144C1D4100C8D1BB /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
41 | DACC7B09144C1D4100C8D1BB /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
42 | DACC7B0D144C1D4100C8D1BB /* Stealth Messenger-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Stealth Messenger-Info.plist"; sourceTree = ""; };
43 | DACC7B0E144C1D4100C8D1BB /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
44 | DACC7B10144C1D4100C8D1BB /* Stealth Messenger-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Stealth Messenger-Prefix.pch"; sourceTree = ""; };
45 | DACC7B11144C1D4100C8D1BB /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
46 | DACC7B12144C1D4100C8D1BB /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
47 | DACC7B14144C1D4100C8D1BB /* MessageViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MessageViewController.h; sourceTree = ""; };
48 | DACC7B15144C1D4100C8D1BB /* MessageViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MessageViewController.m; sourceTree = ""; };
49 | DACC7B18144C1D4100C8D1BB /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MessageViewController.xib; sourceTree = ""; };
50 | /* End PBXFileReference section */
51 |
52 | /* Begin PBXFrameworksBuildPhase section */
53 | DACC7AFE144C1D4100C8D1BB /* Frameworks */ = {
54 | isa = PBXFrameworksBuildPhase;
55 | buildActionMask = 2147483647;
56 | files = (
57 | DACC7B06144C1D4100C8D1BB /* UIKit.framework in Frameworks */,
58 | DACC7B08144C1D4100C8D1BB /* Foundation.framework in Frameworks */,
59 | DACC7B0A144C1D4100C8D1BB /* CoreGraphics.framework in Frameworks */,
60 | DA124A7A144C54620034188F /* MessageUI.framework in Frameworks */,
61 | DA124A82144C54D20034188F /* Twitter.framework in Frameworks */,
62 | DA2CCDE3144D6445006D8D9C /* AddressBook.framework in Frameworks */,
63 | DA39C774144F292100032D92 /* Accounts.framework in Frameworks */,
64 | );
65 | runOnlyForDeploymentPostprocessing = 0;
66 | };
67 | /* End PBXFrameworksBuildPhase section */
68 |
69 | /* Begin PBXGroup section */
70 | DA2CCDDD144D638B006D8D9C /* ABGetMe */ = {
71 | isa = PBXGroup;
72 | children = (
73 | DA2CCDDE144D638B006D8D9C /* ABGetMe.h */,
74 | DA2CCDDF144D638B006D8D9C /* ABGetMe.m */,
75 | );
76 | name = ABGetMe;
77 | path = ABGetMe/ABGetMe;
78 | sourceTree = "";
79 | };
80 | DA8AC8FE144C522C00C6979E /* Resources */ = {
81 | isa = PBXGroup;
82 | children = (
83 | DA8AC8FF144C522C00C6979E /* Icon.png */,
84 | DA8AC900144C522C00C6979E /* Icon@2x.png */,
85 | );
86 | path = Resources;
87 | sourceTree = "";
88 | };
89 | DACC7AF6144C1D4100C8D1BB = {
90 | isa = PBXGroup;
91 | children = (
92 | DA2CCDDD144D638B006D8D9C /* ABGetMe */,
93 | DACC7B0B144C1D4100C8D1BB /* Stealth Messenger */,
94 | DACC7B04144C1D4100C8D1BB /* Frameworks */,
95 | DACC7B02144C1D4100C8D1BB /* Products */,
96 | );
97 | sourceTree = "";
98 | };
99 | DACC7B02144C1D4100C8D1BB /* Products */ = {
100 | isa = PBXGroup;
101 | children = (
102 | DACC7B01144C1D4100C8D1BB /* Stealth Messenger.app */,
103 | );
104 | name = Products;
105 | sourceTree = "";
106 | };
107 | DACC7B04144C1D4100C8D1BB /* Frameworks */ = {
108 | isa = PBXGroup;
109 | children = (
110 | DA39C773144F292100032D92 /* Accounts.framework */,
111 | DA2CCDE2144D6445006D8D9C /* AddressBook.framework */,
112 | DACC7B09144C1D4100C8D1BB /* CoreGraphics.framework */,
113 | DACC7B07144C1D4100C8D1BB /* Foundation.framework */,
114 | DA124A79144C54620034188F /* MessageUI.framework */,
115 | DA124A81144C54D20034188F /* Twitter.framework */,
116 | DACC7B05144C1D4100C8D1BB /* UIKit.framework */,
117 | );
118 | name = Frameworks;
119 | sourceTree = "";
120 | };
121 | DACC7B0B144C1D4100C8D1BB /* Stealth Messenger */ = {
122 | isa = PBXGroup;
123 | children = (
124 | DACC7B11144C1D4100C8D1BB /* AppDelegate.h */,
125 | DACC7B12144C1D4100C8D1BB /* AppDelegate.m */,
126 | DACC7B14144C1D4100C8D1BB /* MessageViewController.h */,
127 | DACC7B15144C1D4100C8D1BB /* MessageViewController.m */,
128 | DA124A83144C5A620034188F /* StealthSender.h */,
129 | DA124A84144C5A620034188F /* StealthSender.m */,
130 | DACC7B17144C1D4100C8D1BB /* MessageViewController.xib */,
131 | DA8AC8FE144C522C00C6979E /* Resources */,
132 | DACC7B0C144C1D4100C8D1BB /* Supporting Files */,
133 | );
134 | path = "Stealth Messenger";
135 | sourceTree = "";
136 | };
137 | DACC7B0C144C1D4100C8D1BB /* Supporting Files */ = {
138 | isa = PBXGroup;
139 | children = (
140 | DACC7B0D144C1D4100C8D1BB /* Stealth Messenger-Info.plist */,
141 | DACC7B0E144C1D4100C8D1BB /* main.m */,
142 | DACC7B10144C1D4100C8D1BB /* Stealth Messenger-Prefix.pch */,
143 | );
144 | name = "Supporting Files";
145 | sourceTree = "";
146 | };
147 | /* End PBXGroup section */
148 |
149 | /* Begin PBXNativeTarget section */
150 | DACC7B00144C1D4100C8D1BB /* Stealth Messenger */ = {
151 | isa = PBXNativeTarget;
152 | buildConfigurationList = DACC7B1C144C1D4100C8D1BB /* Build configuration list for PBXNativeTarget "Stealth Messenger" */;
153 | buildPhases = (
154 | DACC7AFD144C1D4100C8D1BB /* Sources */,
155 | DACC7AFE144C1D4100C8D1BB /* Frameworks */,
156 | DACC7AFF144C1D4100C8D1BB /* Resources */,
157 | );
158 | buildRules = (
159 | );
160 | dependencies = (
161 | );
162 | name = "Stealth Messenger";
163 | productName = "Stealth Messenger";
164 | productReference = DACC7B01144C1D4100C8D1BB /* Stealth Messenger.app */;
165 | productType = "com.apple.product-type.application";
166 | };
167 | /* End PBXNativeTarget section */
168 |
169 | /* Begin PBXProject section */
170 | DACC7AF8144C1D4100C8D1BB /* Project object */ = {
171 | isa = PBXProject;
172 | attributes = {
173 | ORGANIZATIONNAME = "Cédric Luthi";
174 | };
175 | buildConfigurationList = DACC7AFB144C1D4100C8D1BB /* Build configuration list for PBXProject "Stealth Messenger" */;
176 | compatibilityVersion = "Xcode 3.2";
177 | developmentRegion = English;
178 | hasScannedForEncodings = 0;
179 | knownRegions = (
180 | en,
181 | );
182 | mainGroup = DACC7AF6144C1D4100C8D1BB;
183 | productRefGroup = DACC7B02144C1D4100C8D1BB /* Products */;
184 | projectDirPath = "";
185 | projectRoot = "";
186 | targets = (
187 | DACC7B00144C1D4100C8D1BB /* Stealth Messenger */,
188 | );
189 | };
190 | /* End PBXProject section */
191 |
192 | /* Begin PBXResourcesBuildPhase section */
193 | DACC7AFF144C1D4100C8D1BB /* Resources */ = {
194 | isa = PBXResourcesBuildPhase;
195 | buildActionMask = 2147483647;
196 | files = (
197 | DACC7B19144C1D4100C8D1BB /* MessageViewController.xib in Resources */,
198 | DA8AC901144C522C00C6979E /* Icon.png in Resources */,
199 | DA8AC902144C522C00C6979E /* Icon@2x.png in Resources */,
200 | );
201 | runOnlyForDeploymentPostprocessing = 0;
202 | };
203 | /* End PBXResourcesBuildPhase section */
204 |
205 | /* Begin PBXSourcesBuildPhase section */
206 | DACC7AFD144C1D4100C8D1BB /* Sources */ = {
207 | isa = PBXSourcesBuildPhase;
208 | buildActionMask = 2147483647;
209 | files = (
210 | DACC7B0F144C1D4100C8D1BB /* main.m in Sources */,
211 | DACC7B13144C1D4100C8D1BB /* AppDelegate.m in Sources */,
212 | DACC7B16144C1D4100C8D1BB /* MessageViewController.m in Sources */,
213 | DA124A85144C5A620034188F /* StealthSender.m in Sources */,
214 | DA2CCDE0144D638B006D8D9C /* ABGetMe.m in Sources */,
215 | );
216 | runOnlyForDeploymentPostprocessing = 0;
217 | };
218 | /* End PBXSourcesBuildPhase section */
219 |
220 | /* Begin PBXVariantGroup section */
221 | DACC7B17144C1D4100C8D1BB /* MessageViewController.xib */ = {
222 | isa = PBXVariantGroup;
223 | children = (
224 | DACC7B18144C1D4100C8D1BB /* en */,
225 | );
226 | name = MessageViewController.xib;
227 | sourceTree = "";
228 | };
229 | /* End PBXVariantGroup section */
230 |
231 | /* Begin XCBuildConfiguration section */
232 | DACC7B1A144C1D4100C8D1BB /* Debug */ = {
233 | isa = XCBuildConfiguration;
234 | buildSettings = {
235 | ALWAYS_SEARCH_USER_PATHS = NO;
236 | ARCHS = (
237 | armv6,
238 | armv7,
239 | );
240 | CLANG_ENABLE_OBJC_ARC = YES;
241 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
242 | COPY_PHASE_STRIP = NO;
243 | CURRENT_PROJECT_VERSION = 1.0;
244 | GCC_C_LANGUAGE_STANDARD = gnu99;
245 | GCC_DYNAMIC_NO_PIC = NO;
246 | GCC_OPTIMIZATION_LEVEL = 0;
247 | GCC_PREPROCESSOR_DEFINITIONS = (
248 | "DEBUG=1",
249 | "$(inherited)",
250 | );
251 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
252 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
253 | GCC_WARN_ABOUT_RETURN_TYPE = YES;
254 | GCC_WARN_UNUSED_VARIABLE = YES;
255 | IPHONEOS_DEPLOYMENT_TARGET = 4.2;
256 | SDKROOT = iphoneos;
257 | };
258 | name = Debug;
259 | };
260 | DACC7B1B144C1D4100C8D1BB /* Release */ = {
261 | isa = XCBuildConfiguration;
262 | buildSettings = {
263 | ALWAYS_SEARCH_USER_PATHS = NO;
264 | ARCHS = (
265 | armv6,
266 | armv7,
267 | );
268 | CLANG_ENABLE_OBJC_ARC = YES;
269 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
270 | COPY_PHASE_STRIP = YES;
271 | CURRENT_PROJECT_VERSION = 1.0;
272 | GCC_C_LANGUAGE_STANDARD = gnu99;
273 | GCC_PREPROCESSOR_DEFINITIONS = "NS_BLOCK_ASSERTIONS=1";
274 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
275 | GCC_WARN_ABOUT_RETURN_TYPE = YES;
276 | GCC_WARN_UNUSED_VARIABLE = YES;
277 | IPHONEOS_DEPLOYMENT_TARGET = 4.2;
278 | SDKROOT = iphoneos;
279 | VALIDATE_PRODUCT = YES;
280 | };
281 | name = Release;
282 | };
283 | DACC7B1D144C1D4100C8D1BB /* Debug */ = {
284 | isa = XCBuildConfiguration;
285 | buildSettings = {
286 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
287 | GCC_PREFIX_HEADER = "Stealth Messenger/Stealth Messenger-Prefix.pch";
288 | INFOPLIST_FILE = "Stealth Messenger/Stealth Messenger-Info.plist";
289 | PRODUCT_NAME = "$(TARGET_NAME)";
290 | WRAPPER_EXTENSION = app;
291 | };
292 | name = Debug;
293 | };
294 | DACC7B1E144C1D4100C8D1BB /* Release */ = {
295 | isa = XCBuildConfiguration;
296 | buildSettings = {
297 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
298 | GCC_PREFIX_HEADER = "Stealth Messenger/Stealth Messenger-Prefix.pch";
299 | INFOPLIST_FILE = "Stealth Messenger/Stealth Messenger-Info.plist";
300 | PRODUCT_NAME = "$(TARGET_NAME)";
301 | WRAPPER_EXTENSION = app;
302 | };
303 | name = Release;
304 | };
305 | /* End XCBuildConfiguration section */
306 |
307 | /* Begin XCConfigurationList section */
308 | DACC7AFB144C1D4100C8D1BB /* Build configuration list for PBXProject "Stealth Messenger" */ = {
309 | isa = XCConfigurationList;
310 | buildConfigurations = (
311 | DACC7B1A144C1D4100C8D1BB /* Debug */,
312 | DACC7B1B144C1D4100C8D1BB /* Release */,
313 | );
314 | defaultConfigurationIsVisible = 0;
315 | defaultConfigurationName = Release;
316 | };
317 | DACC7B1C144C1D4100C8D1BB /* Build configuration list for PBXNativeTarget "Stealth Messenger" */ = {
318 | isa = XCConfigurationList;
319 | buildConfigurations = (
320 | DACC7B1D144C1D4100C8D1BB /* Debug */,
321 | DACC7B1E144C1D4100C8D1BB /* Release */,
322 | );
323 | defaultConfigurationIsVisible = 0;
324 | defaultConfigurationName = Release;
325 | };
326 | /* End XCConfigurationList section */
327 | };
328 | rootObject = DACC7AF8144C1D4100C8D1BB /* Project object */;
329 | }
330 |
--------------------------------------------------------------------------------
/Stealth Messenger/en.lproj/MessageViewController.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 1280
5 | 10K549
6 | 1938
7 | 1038.36
8 | 461.00
9 |
13 |
14 | IBProxyObject
15 | IBUIButton
16 | IBUILabel
17 | IBUITextField
18 | IBUITextView
19 | IBUISegmentedControl
20 | IBUIView
21 |
22 |
23 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin
24 |
25 |
29 |
30 |
34 |
38 |
251 |
252 |
253 |
254 |
255 |
256 | view
257 |
258 |
259 |
260 | 7
261 |
262 |
263 |
264 | textView
265 |
266 |
267 |
268 | 9
269 |
270 |
271 |
272 | recipientField
273 |
274 |
275 |
276 | 14
277 |
278 |
279 |
280 | recipientLabel
281 |
282 |
283 |
284 | 15
285 |
286 |
287 |
288 | messageSegmentedControl
289 |
290 |
291 |
292 | 21
293 |
294 |
295 |
296 | sendButton
297 |
298 |
299 |
300 | 22
301 |
302 |
303 |
304 | statusLabel
305 |
306 |
307 |
308 | 24
309 |
310 |
311 |
312 | delegate
313 |
314 |
315 |
316 | 13
317 |
318 |
319 |
320 | changeMessageKind:
321 |
322 |
323 | 13
324 |
325 | 17
326 |
327 |
328 |
329 | delegate
330 |
331 |
332 |
333 | 20
334 |
335 |
336 |
337 | sendMessage:
338 |
339 |
340 | 7
341 |
342 | 18
343 |
344 |
345 |
346 |
347 |
348 | 0
349 |
350 |
351 |
352 |
353 |
354 | -1
355 |
356 |
357 | File's Owner
358 |
359 |
360 | -2
361 |
362 |
363 |
364 |
365 | 6
366 |
367 |
368 |
369 |
370 |
371 |
372 |
373 |
374 |
375 |
376 |
377 |
378 | 8
379 |
380 |
381 |
382 |
383 | 10
384 |
385 |
386 |
387 |
388 | 11
389 |
390 |
391 |
392 |
393 | 12
394 |
395 |
396 |
397 |
398 | 16
399 |
400 |
401 |
402 |
403 | 23
404 |
405 |
406 |
407 |
408 |
409 |
410 | MessageViewController
411 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin
412 | UIResponder
413 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin
414 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin
415 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin
416 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin
417 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin
418 |
419 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin
420 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin
421 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin
422 |
423 |
424 |
425 |
426 |
427 | 24
428 |
429 |
430 |
431 |
432 | MessageViewController
433 | UIViewController
434 |
435 | id
436 | id
437 |
438 |
439 |
440 | changeMessageKind:
441 | id
442 |
443 |
444 | sendMessage:
445 | id
446 |
447 |
448 |
449 | UISegmentedControl
450 | UITextField
451 | UILabel
452 | UIButton
453 | UILabel
454 | UITextView
455 |
456 |
457 |
458 | messageSegmentedControl
459 | UISegmentedControl
460 |
461 |
462 | recipientField
463 | UITextField
464 |
465 |
466 | recipientLabel
467 | UILabel
468 |
469 |
470 | sendButton
471 | UIButton
472 |
473 |
474 | statusLabel
475 | UILabel
476 |
477 |
478 | textView
479 | UITextView
480 |
481 |
482 |
483 | IBProjectSource
484 | ./Classes/MessageViewController.h
485 |
486 |
487 |
488 |
489 | 0
490 | IBCocoaTouchFramework
491 | YES
492 | 3
493 | 933
494 |
495 |
496 |
--------------------------------------------------------------------------------