aboutsummaryrefslogtreecommitdiffhomepage
path: root/example/ios
diff options
context:
space:
mode:
authorGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2013-07-03 23:14:18 -0400
committerGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2013-07-03 23:14:18 -0400
commit6f2d15d22afaf947690d895047a7ea6a9d8bad8c (patch)
tree6215c7841a5e3620ded8ce752bced5c8cd2eeaf1 /example/ios
parent9fe6ce12c4880a6c2f2a4180752987dd30d65c89 (diff)
Fixed logger
Diffstat (limited to 'example/ios')
-rw-r--r--example/ios/iOS UI Test/iOS UI Test/MasterViewController.m11
1 files changed, 9 insertions, 2 deletions
diff --git a/example/ios/iOS UI Test/iOS UI Test/MasterViewController.m b/example/ios/iOS UI Test/iOS UI Test/MasterViewController.m
index c9866ff8..3e5e4422 100644
--- a/example/ios/iOS UI Test/iOS UI Test/MasterViewController.m
+++ b/example/ios/iOS UI Test/iOS UI Test/MasterViewController.m
@@ -45,9 +45,16 @@
self.imapSession.username = username;
self.imapSession.password = password;
self.imapSession.connectionType = MCOConnectionTypeTLS;
-
+ MasterViewController * __weak weakSelf = self;
+ self.imapSession.connectionLogger = ^(void * connectionID, MCOConnectionLogType type, NSData * data) {
+ @synchronized(weakSelf) {
+ if (type != MCOConnectionLogTypeSentPrivate) {
+ NSLog(@"event logged:%p %i withData: %@", connectionID, type, [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]);
+ }
+ }
+ };
+
NSLog(@"checking account");
- __weak MasterViewController *weakSelf = self;
self.imapCheckOp = [self.imapSession checkAccountOperation];
[self.imapCheckOp start:^(NSError *error) {
MasterViewController *strongSelf = weakSelf;