diff --git a/Classes/BuschJaegerConfiguration.h b/Classes/BuschJaegerConfiguration.h index 43693df47..06b855ab4 100644 --- a/Classes/BuschJaegerConfiguration.h +++ b/Classes/BuschJaegerConfiguration.h @@ -32,7 +32,7 @@ @end -@interface BuschJaegerConfiguration : NSObject { +@interface BuschJaegerConfiguration : NSObject { } typedef enum _BuschJaegerConfigurationRequestType{ @@ -45,6 +45,7 @@ typedef enum _BuschJaegerConfigurationRequestType{ @property (readonly) NSMutableSet *outdoorStations; @property (readonly) Network *network; @property (readonly) LevelPushButton *levelPushButton; +@property (readonly) CFArrayRef certificates; - (void)reset; diff --git a/Classes/BuschJaegerConfiguration.m b/Classes/BuschJaegerConfiguration.m index 4353d84e7..292cdbf58 100644 --- a/Classes/BuschJaegerConfiguration.m +++ b/Classes/BuschJaegerConfiguration.m @@ -20,6 +20,7 @@ #import "BuschJaegerConfiguration.h" #import "LinphoneManager.h" #import "Utils.h" +#import "NSURLConnection+SynchronousDelegate.h" @implementation BuschJaegerConfiguration @@ -28,6 +29,7 @@ @synthesize network; @synthesize history; @synthesize levelPushButton; +@synthesize certificates; /******** [outdoorstation_0] @@ -94,6 +96,8 @@ history = [[NSMutableSet alloc] init]; network = [[Network alloc] init]; levelPushButton = [[LevelPushButton alloc] init]; + certificates = NULL; + [self reloadCertificates]; } return self; } @@ -104,6 +108,9 @@ [history release]; [network release]; [levelPushButton release]; + if(certificates != NULL) { + CFRelease(certificates); + } [super dealloc]; } @@ -172,6 +179,7 @@ last_section = subStr; last_index = i + 1; } else { + [self reset]; dispatch_async(dispatch_get_main_queue(), ^{ [delegate buschJaegerConfigurationError:NSLocalizedString(@"Invalid configuration file", nil)]; }); @@ -187,6 +195,84 @@ return TRUE; } +- (BOOL)downloadCertificates:(id)delegate { + if(network.tlsCertificate && [network.tlsCertificate length] > 0) { + NSURL *url = [NSURL URLWithString:network.tlsCertificate]; + if(url != nil) { + NSURLRequest *request = [NSURLRequest requestWithURL:url cachePolicy:NSURLRequestReloadIgnoringLocalAndRemoteCacheData timeoutInterval:5]; + if(request != nil) { + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, (unsigned long)NULL), ^(void) { + NSURLResponse *response = nil; + NSError *error = nil; + NSData *data = nil; + data = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error delegate:self]; + if(data == nil) { + dispatch_async(dispatch_get_main_queue(), ^{ + [delegate buschJaegerConfigurationError:[error localizedDescription]]; + }); + } else { + NSHTTPURLResponse *urlResponse = (NSHTTPURLResponse*) response; + if(urlResponse.statusCode == 200) { + if([data writeToFile:[LinphoneManager documentFile:kLinphonePEMPath] atomically:TRUE]) { + [self reloadCertificates]; + dispatch_async(dispatch_get_main_queue(), ^{ + [delegate buschJaegerConfigurationSuccess]; + }); + } else { + [self reset]; + dispatch_async(dispatch_get_main_queue(), ^{ + [delegate buschJaegerConfigurationError:NSLocalizedString(@"Unknown issue when saving configuration", nil)]; + }); + } + } else { + [self reset]; + dispatch_async(dispatch_get_main_queue(), ^{ + [delegate buschJaegerConfigurationError:[NSString stringWithFormat:@"Request not succeed (Status code:%d)", urlResponse.statusCode]]; + }); + } + } + }); + return TRUE; + } + } else { + [self reset]; + dispatch_async(dispatch_get_main_queue(), ^{ + [delegate buschJaegerConfigurationError:NSLocalizedString(@"Invalid configuration file", nil)]; + }); + } + } + return FALSE; +} + +- (void)unloadCertificates { +} + +- (void)reloadCertificates { + [self unloadCertificates]; + [self loadCertificates]; +} + +- (void)loadCertificates { + + if(certificates != NULL) { + CFRelease(certificates); + certificates = NULL; + } + NSData *data = [NSData dataWithContentsOfFile:[LinphoneManager documentFile:kLinphonePEMPath]]; + if(data != NULL) { + SecCertificateRef rootcert = SecCertificateCreateWithData(kCFAllocatorDefault, (CFDataRef)data); + if(rootcert) { + const void *certs[] = { rootcert }; + certificates = CFArrayCreate(NULL, (const void**)certs, sizeof(certs) / sizeof(certs[0]), &kCFTypeArrayCallBacks); + [LinphoneLogger log:LinphoneLoggerLog format:@"Certificates loaded"]; + } else { + [LinphoneLogger log:LinphoneLoggerError format:@"Can't load certificates"]; + } + } else { + [LinphoneLogger log:LinphoneLoggerError format:@"Certificates file doesn't exist"]; + } +} + - (void)reset { [history removeAllObjects]; [outdoorStations removeAllObjects]; @@ -212,9 +298,7 @@ [data appendString:[network write]]; [data appendString:[levelPushButton write]]; - NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); - NSString *documentsPath = [paths objectAtIndex:0]; - NSString *databaseDocumentPath = [documentsPath stringByAppendingPathComponent:file]; + NSString *databaseDocumentPath = [LinphoneManager documentFile:file]; NSError *error; if(![data writeToFile:databaseDocumentPath atomically:FALSE encoding:NSUTF8StringEncoding error:&error]) { @@ -228,9 +312,7 @@ [self reset]; NSFileManager *fileManager = [NSFileManager defaultManager]; - NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); - NSString *documentsPath = [paths objectAtIndex:0]; - NSString *databaseDocumentPath = [documentsPath stringByAppendingPathComponent:file]; + NSString *databaseDocumentPath = [LinphoneManager documentFile:file]; if ([fileManager fileExistsAtPath:databaseDocumentPath] == NO) { [LinphoneLogger log:LinphoneLoggerError format:@"BuschJaeger ini file doesn't exist: %@", file]; return FALSE; @@ -241,7 +323,7 @@ [LinphoneLogger log:LinphoneLoggerError format:@"Can't read BuschJaeger ini file: %@", [error localizedDescription]]; return FALSE; } - return [self parseConfig:data delegate:nil];; + return [self parseConfig:data delegate:nil]; } - (BOOL)parseQRCode:(NSString*)data delegate:(id)delegate { @@ -257,7 +339,7 @@ NSURLResponse *response = nil; NSError *error = nil; NSData *data = nil; - data = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error]; + data = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error delegate:self]; if(data == nil) { dispatch_async(dispatch_get_main_queue(), ^{ [delegate buschJaegerConfigurationError:[error localizedDescription]]; @@ -270,11 +352,14 @@ [[NSUserDefaults standardUserDefaults] setObject:network.domain forKey:@"domain_preference"]; [[NSUserDefaults standardUserDefaults] setObject:passwordString forKey:@"password_preference"]; [[LinphoneManager instance] reconfigureLinphone]; - dispatch_async(dispatch_get_main_queue(), ^{ - [delegate buschJaegerConfigurationSuccess]; - }); + if(![self downloadCertificates:delegate]) { + dispatch_async(dispatch_get_main_queue(), ^{ + [delegate buschJaegerConfigurationSuccess]; + }); + } } } else { + [self reset]; dispatch_async(dispatch_get_main_queue(), ^{ [delegate buschJaegerConfigurationError:[NSString stringWithFormat:@"Request not succeed (Status code:%d)", urlResponse.statusCode]]; }); @@ -296,7 +381,7 @@ NSURLResponse *response = nil; NSError *error = nil; NSData *data = nil; - data = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error]; + data = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error delegate:self]; if(data == nil) { dispatch_async(dispatch_get_main_queue(), ^{ [delegate buschJaegerConfigurationError:[error localizedDescription]]; @@ -331,7 +416,7 @@ NSURLResponse *response = nil; NSError *error = nil; NSData *data = nil; - data = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error]; + data = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error delegate:self]; if(data == nil) { dispatch_async(dispatch_get_main_queue(), ^{ [delegate buschJaegerConfigurationError:[error localizedDescription]]; @@ -383,4 +468,33 @@ return nil; } + +#pragma mark - NSURLConnectionDelegate Function + +- (BOOL)connection:(NSURLConnection *)connection canAuthenticateAgainstProtectionSpace:(NSURLProtectionSpace *)protectionSpace { + return [protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]; +} + +- (void)connection:(NSURLConnection *)connection didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge { + if ([challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]) { + SecTrustRef trust = [challenge.protectionSpace serverTrust]; + NSArray *anchors = (NSArray*)certificates; + SecTrustSetAnchorCertificates(trust, (CFArrayRef)anchors); + SecTrustSetAnchorCertificatesOnly(trust, YES); + + SecTrustResultType result = kSecTrustResultInvalid; + OSStatus sanityChesk = SecTrustEvaluate(trust, &result); + + if (sanityChesk == noErr) { + if(result == kSecTrustResultConfirm || result == kSecTrustResultProceed || result == kSecTrustResultUnspecified) { + [[challenge sender] useCredential:[NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust] forAuthenticationChallenge:challenge]; + return; + } + } + [challenge.sender continueWithoutCredentialForAuthenticationChallenge:challenge]; + } else { + [challenge.sender continueWithoutCredentialForAuthenticationChallenge:challenge]; + } +} + @end diff --git a/Classes/BuschJaegerHistoryView.xib b/Classes/BuschJaegerHistoryView.xib index 625f42de2..dfc5fb92e 100644 --- a/Classes/BuschJaegerHistoryView.xib +++ b/Classes/BuschJaegerHistoryView.xib @@ -140,7 +140,7 @@ - 292 + 301 {{142, 211}, {37, 37}} diff --git a/Classes/BuschJaegerMainView.h b/Classes/BuschJaegerMainView.h index a46d8fde1..95a87cedc 100644 --- a/Classes/BuschJaegerMainView.h +++ b/Classes/BuschJaegerMainView.h @@ -25,11 +25,15 @@ #import "BuschJaegerHistoryView.h" #import "BuschJaegerHistoryDetailsView.h" +@interface UINavigationControllerEx : UINavigationController + +@end + @interface BuschJaegerMainView : UIViewController { } -@property (nonatomic, retain) IBOutlet UINavigationController *navigationController; +@property (nonatomic, retain) IBOutlet UINavigationControllerEx *navigationController; @property (nonatomic, retain) IBOutlet BuschJaegerCallView *callView; @property (nonatomic, retain) IBOutlet BuschJaegerSettingsView *settingsView; @property (nonatomic, retain) IBOutlet BuschJaegerWelcomeView *welcomeView; diff --git a/Classes/BuschJaegerMainView.m b/Classes/BuschJaegerMainView.m index 68890fb76..41190125f 100644 --- a/Classes/BuschJaegerMainView.m +++ b/Classes/BuschJaegerMainView.m @@ -19,6 +19,42 @@ #import "BuschJaegerMainView.h" +@implementation UINavigationControllerEx + +- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated { + [viewController view]; + UIViewController *oldTopViewController = self.topViewController; + if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) { + [oldTopViewController viewWillDisappear:animated]; + } + [viewController viewWillAppear:animated]; + [super pushViewController:viewController animated:animated]; + if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) { + [self.topViewController viewDidAppear:animated]; + [oldTopViewController viewDidDisappear:animated]; + } +} + +- (UIViewController *)popViewControllerAnimated:(BOOL)animated { + if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) { + [self.topViewController viewWillDisappear:animated]; + UIViewController *nextView = nil; + int count = [self.viewControllers count]; + if(count > 1) { + nextView = [self.viewControllers objectAtIndex:count - 2]; + } + [nextView viewWillAppear:animated]; + } + UIViewController * ret = [super popViewControllerAnimated:animated]; + if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) { + [ret viewDidDisappear:animated]; + [self.topViewController viewDidAppear:animated]; + } + return ret; +} + +@end + @implementation BuschJaegerMainView @synthesize navigationController; @@ -31,6 +67,7 @@ static BuschJaegerMainView* mainViewInstance=nil; + #pragma mark - Lifecycle Functions - (void)initBuschJaegerMainView { @@ -87,7 +124,7 @@ static BuschJaegerMainView* mainViewInstance=nil; UIView *view = navigationController.view; [view setFrame:[self.view bounds]]; [self.view addSubview:view]; - [navigationController setViewControllers:[NSArray arrayWithObject:welcomeView]]; + [navigationController pushViewController:welcomeView animated:FALSE]; } - (void)viewWillAppear:(BOOL)animated { @@ -120,6 +157,10 @@ static BuschJaegerMainView* mainViewInstance=nil; object:nil]; } +- (NSUInteger)supportedInterfaceOrientations { + return UIInterfaceOrientationMaskPortraitUpsideDown | UIInterfaceOrientationMaskPortrait; +} + #pragma mark - Event Functions diff --git a/Classes/BuschJaegerMainView.xib b/Classes/BuschJaegerMainView.xib index 76371bf51..fb98710bf 100644 --- a/Classes/BuschJaegerMainView.xib +++ b/Classes/BuschJaegerMainView.xib @@ -1,14 +1,14 @@ - 1296 + 1536 11E53 - 2549 + 2840 1138.47 569.00 com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 1498 + 1926 IBProxyObject @@ -280,6 +280,7 @@ com.apple.InterfaceBuilder.IBCocoaTouchPlugin BuschJaegerCallView com.apple.InterfaceBuilder.IBCocoaTouchPlugin + UINavigationControllerEx com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin @@ -306,12 +307,12 @@ BuschJaegerCallView UIViewController - id + id id - - startCall: + + onSnapshotClick: id @@ -327,7 +328,7 @@ UIDigitButton UIToggleButton UIDigitButton - UIButton + UIButton UIButton UIView @@ -360,8 +361,8 @@ openDoorButton UIDigitButton - - startCallButton + + snapshotButton UIButton @@ -381,17 +382,79 @@ BuschJaegerHistoryDetailsView UIViewController - - tableViewController - UITableViewController - - - tableViewController - - tableViewController + + id + id + id + id + id + id + + + + hideImage: + id + + + nextImage: + id + + + onBackClick: + id + + + onDeleteClick: + id + + + previousImage: + id + + + saveImage: + id + + + + UIView + UILabel + UIView + UIRemoteImageView + UIButton + UILabel + UITableViewController + + + + backButton + UIView + + + dateLabel + UILabel + + + fullscreenView + UIView + + + imageView + UIRemoteImageView + + + saveButton + UIButton + + + stationLabel + UILabel + + + tableController UITableViewController - + IBProjectSource ./Classes/BuschJaegerHistoryDetailsView.h @@ -400,6 +463,17 @@ BuschJaegerHistoryTableViewController UITableViewController + + waitView + UIView + + + waitView + + waitView + UIView + + IBProjectSource ./Classes/BuschJaegerHistoryTableViewController.h @@ -450,7 +524,7 @@ BuschJaegerCallView BuschJaegerHistoryDetailsView BuschJaegerHistoryView - UINavigationController + UINavigationControllerEx BuschJaegerSettingsView BuschJaegerWelcomeView @@ -469,7 +543,7 @@ navigationController - UINavigationController + UINavigationControllerEx settingsView @@ -610,6 +684,22 @@ ./Classes/UILongTouchButton.h + + UINavigationControllerEx + UINavigationController + + IBProjectSource + ./Classes/UINavigationControllerEx.h + + + + UIRemoteImageView + UIImageView + + IBProjectSource + ./Classes/UIRemoteImageView.h + + UIToggleButton UIButton @@ -624,10 +714,10 @@ IBCocoaTouchFramework com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - + YES 3 - 1498 + 1926 diff --git a/Classes/BuschJaegerSettingsView.xib b/Classes/BuschJaegerSettingsView.xib index f259e7d03..2fc950344 100644 --- a/Classes/BuschJaegerSettingsView.xib +++ b/Classes/BuschJaegerSettingsView.xib @@ -184,11 +184,11 @@ - 306 + 274 - 292 + 301 {{142, 211}, {37, 37}} diff --git a/Classes/BuschJaegerWelcomeView.m b/Classes/BuschJaegerWelcomeView.m index 50f2c3ebb..3fe6ce0bc 100644 --- a/Classes/BuschJaegerWelcomeView.m +++ b/Classes/BuschJaegerWelcomeView.m @@ -45,7 +45,6 @@ - (void)viewDidLoad { [super viewDidLoad]; - [self updateConfiguration:[LinphoneManager instance].configuration]; [tableController.view setBackgroundColor:[UIColor clearColor]]; } @@ -56,9 +55,10 @@ selector:@selector(configurationUpdateEvent:) name:kLinphoneConfigurationUpdate object:nil]; + [self updateConfiguration:[LinphoneManager instance].configuration]; } -- (void)vieWillDisappear:(BOOL)animated{ +- (void)viewWillDisappear:(BOOL)animated{ [super viewWillDisappear:animated]; // Remove observer diff --git a/Classes/Model/Network.h b/Classes/Model/Network.h index 8af169da5..767f92691 100644 --- a/Classes/Model/Network.h +++ b/Classes/Model/Network.h @@ -26,6 +26,7 @@ @property (copy) NSString* globalAddress; @property (copy) NSString* localHistory; @property (copy) NSString* globalHistory; +@property (copy) NSString* tlsCertificate; - (NSString*)write; + (id)parse:(NSString*)section array:(NSArray*)array; diff --git a/Classes/Model/Network.m b/Classes/Model/Network.m index c520f1e32..ed4a231d1 100644 --- a/Classes/Model/Network.m +++ b/Classes/Model/Network.m @@ -28,7 +28,7 @@ @synthesize globalAddress; @synthesize localHistory; @synthesize globalHistory; - +@synthesize tlsCertificate; /* domain=abb @@ -39,6 +39,8 @@ local-history=http://192.168.1.1:8080/history.ini global-history=http://welcome.dyndns.org:8080/history.ini + + tls-certificate=http://192.168.1.1:8080/cert.pem */ - (void)dealloc { @@ -47,6 +49,7 @@ [globalAddress release]; [localHistory release]; [globalHistory release]; + [tlsCertificate release]; [super dealloc]; } @@ -59,6 +62,7 @@ [str appendString:[NSString stringWithFormat:@"global-address=%@\n", globalAddress]]; [str appendString:[NSString stringWithFormat:@"local-history=%@\n", localHistory]]; [str appendString:[NSString stringWithFormat:@"global-history=%@\n", globalHistory]]; + [str appendString:[NSString stringWithFormat:@"tls-certificate=%@\n", tlsCertificate]]; return str; } @@ -79,6 +83,8 @@ net.localHistory = param; } else if((param = [BuschJaegerConfiguration getRegexValue:@"^global-history=(.*)$" data:entry]) != nil) { net.globalHistory = param; + } else if((param = [BuschJaegerConfiguration getRegexValue:@"^tls-certificate=(.*)$" data:entry]) != nil) { + net.tlsCertificate = param; } else if([[entry stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]] length] != 0){ [LinphoneLogger log:LinphoneLoggerWarning format:@"Unknown entry in %@ section: %@", section, entry]; } diff --git a/Classes/Utils/NSURLConnection+SynchronousDelegate.h b/Classes/Utils/NSURLConnection+SynchronousDelegate.h new file mode 100644 index 000000000..129b9d7e8 --- /dev/null +++ b/Classes/Utils/NSURLConnection+SynchronousDelegate.h @@ -0,0 +1,26 @@ +/* NSURLConnection+SynchronousDelegate.h + * + * Copyright (C) 2012 Belledonne Comunications, Grenoble, France + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#import + +@interface NSURLConnection (SynchronousDelegate) + ++ (NSData *)sendSynchronousRequest:(NSURLRequest *)request returningResponse:(NSURLResponse **)response error:(NSError **)error delegate:(id) delegate; + +@end diff --git a/Classes/Utils/NSURLConnection+SynchronousDelegate.m b/Classes/Utils/NSURLConnection+SynchronousDelegate.m new file mode 100644 index 000000000..e5ec7ca90 --- /dev/null +++ b/Classes/Utils/NSURLConnection+SynchronousDelegate.m @@ -0,0 +1,177 @@ +/* NSURLConnection+SynchronousDelegate.m + * + * Copyright (C) 2012 Belledonne Comunications, Grenoble, France + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#import "NSURLConnection+SynchronousDelegate.h" + +@interface NSURLConnectionSynchronousDelegate : NSObject { + @private + id _delegate; + dispatch_group_t _group; +} + +@property (readonly) NSMutableData *data; +@property (readonly) NSError *error; +@property (readonly) NSURLResponse *response; + +- (id)initWithDelegate:(id)delagate group:(dispatch_group_t)group; + +@end + +@implementation NSURLConnectionSynchronousDelegate + +@synthesize data; +@synthesize error; +@synthesize response; + +- (id)initWithDelegate:(id)delagate group:(dispatch_group_t)group{ + self = [super init]; + if(self) { + self->_delegate = [delagate retain]; + self->_group = group; + self->data = nil; + self->error = nil; + self->response = nil; + } + return self; +} + +- (void)dealloc { + [_delegate release]; + [data release]; + [error release]; + [response release]; + [super dealloc]; +} + +- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)aerror { + error = [aerror retain]; + if([_delegate respondsToSelector:@selector(connection:didFailWithError:)]) { + [_delegate connection:connection didFailWithError:aerror]; + } + dispatch_group_leave(_group); + CFRunLoopStop(CFRunLoopGetCurrent()); +} + +- (BOOL)connectionShouldUseCredentialStorage:(NSURLConnection *)connection { + if([_delegate respondsToSelector:@selector(connectionShouldUseCredentialStorage:)]) { + return [_delegate connectionShouldUseCredentialStorage:connection]; + } + + return YES; +} + +- (BOOL)connection:(NSURLConnection *)connection canAuthenticateAgainstProtectionSpace:(NSURLProtectionSpace *)protectionSpace { + if([_delegate respondsToSelector:@selector(connection:canAuthenticateAgainstProtectionSpace:)]) { + return [_delegate connection:connection canAuthenticateAgainstProtectionSpace:protectionSpace]; + } + return NO; +} + +- (void)connection:(NSURLConnection *)connection didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge { + if([_delegate respondsToSelector:@selector(connection:didReceiveAuthenticationChallenge:)]) { + [_delegate connection:connection didReceiveAuthenticationChallenge:challenge]; + } else { + [challenge.sender continueWithoutCredentialForAuthenticationChallenge:challenge]; + } +} + +- (void)connection:(NSURLConnection *)connection didCancelAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge { + if([_delegate respondsToSelector:@selector(connection:didCancelAuthenticationChallenge:)]) { + [_delegate connection:connection didCancelAuthenticationChallenge:challenge]; + } +} + +- (NSURLRequest *)connection:(NSURLConnection *)connection willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)aresponse { + if([_delegate respondsToSelector:@selector(connection:willSendRequest:redirectResponse:)]) { + return [_delegate connection:connection willSendRequest:request redirectResponse:aresponse]; + } + return request; +} + +- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)aresponse { + response = [aresponse retain]; + if([_delegate respondsToSelector:@selector(connection:didReceiveResponse:)]) { + [_delegate connection:connection didReceiveResponse:aresponse]; + } +} + +- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)adata { + if([_delegate respondsToSelector:@selector(connection:didReceiveData:)]) { + [_delegate connection:connection didReceiveData:adata]; + } + if(data == nil) { + data = [[NSMutableData alloc] initWithCapacity:[adata length]]; + } + [data appendData:adata]; +} + +- (void)connection:(NSURLConnection *)connection didSendBodyData:(NSInteger)bytesWritten totalBytesWritten:(NSInteger)totalBytesWritten totalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite { + if([_delegate respondsToSelector:@selector(connection:didSendBodyData:totalBytesWritten:totalBytesExpectedToWrite:)]) { + return [_delegate connection:connection didSendBodyData:bytesWritten totalBytesWritten:totalBytesWritten totalBytesExpectedToWrite:totalBytesExpectedToWrite]; + } +} + +- (NSCachedURLResponse *)connection:(NSURLConnection *)connection willCacheResponse:(NSCachedURLResponse *)cachedResponse { + if([_delegate respondsToSelector:@selector(connection:willCacheResponse:)]) { + return [_delegate connection:connection willCacheResponse:cachedResponse]; + } + return cachedResponse; +} + +- (void)connectionDidFinishLoading:(NSURLConnection *)connection { + if([_delegate respondsToSelector:@selector(connectionDidFinishLoading:)]) { + [_delegate connectionDidFinishLoading:connection]; + } + dispatch_group_leave(_group); + CFRunLoopStop(CFRunLoopGetCurrent()); +} + +@end + +@implementation NSURLConnection (SynchronousDelegate) + ++ (NSData *)sendSynchronousRequest:(NSURLRequest *)request returningResponse:(NSURLResponse **)response error:(NSError **)error delegate:(id) delegate { + dispatch_group_t group = dispatch_group_create(); + dispatch_group_enter(group); + + NSURLConnectionSynchronousDelegate *privateDelegate = [[NSURLConnectionSynchronousDelegate alloc] initWithDelegate:delegate group:group]; + + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, (unsigned long)NULL), ^() { + NSURLConnection *connection = [NSURLConnection connectionWithRequest:request delegate:privateDelegate]; + if(connection) { + [connection start]; + + CFRunLoopRun(); + } + }); + + // wait for block finished + dispatch_group_wait(group, DISPATCH_TIME_FOREVER); + dispatch_release(group); + + NSData *data = [privateDelegate data]; + *error = [privateDelegate error]; + *response = [privateDelegate response]; + + [delegate release]; + + return data; +} + +@end diff --git a/buschjaeger-Info.plist b/buschjaeger-Info.plist index d574087b9..2de36bc42 100644 --- a/buschjaeger-Info.plist +++ b/buschjaeger-Info.plist @@ -72,5 +72,7 @@ UIStatusBarStyle UIStatusBarStyleBlackOpaque + UISupportedInterfaceOrientations + diff --git a/linphone.xcodeproj/project.pbxproj b/linphone.xcodeproj/project.pbxproj index 8a358aafd..29e32a40e 100755 --- a/linphone.xcodeproj/project.pbxproj +++ b/linphone.xcodeproj/project.pbxproj @@ -106,8 +106,6 @@ 344ABDE81484E723007420B6 /* libzrtpcpp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 344ABDE71484E723007420B6 /* libzrtpcpp.a */; }; 344ABDF114850AE9007420B6 /* libc++.1.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 344ABDEF14850AE9007420B6 /* libc++.1.dylib */; settings = {ATTRIBUTES = (Weak, ); }; }; 344ABDF214850AE9007420B6 /* libstdc++.6.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 344ABDF014850AE9007420B6 /* libstdc++.6.dylib */; settings = {ATTRIBUTES = (Weak, ); }; }; - 570B130115FE44AF00DE62B6 /* libmediastreamer_voip.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 570B130015FE44AF00DE62B6 /* libmediastreamer_voip.a */; }; - 570B130315FE44ED00DE62B6 /* libmediastreamer_base.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 570B130215FE44ED00DE62B6 /* libmediastreamer_base.a */; }; 57F005C415EE2CCF00914747 /* linphonerc in Resources */ = {isa = PBXBuildFile; fileRef = 57F005C315EE2CCF00914747 /* linphonerc */; }; 57F005C515EE2CCF00914747 /* linphonerc in Resources */ = {isa = PBXBuildFile; fileRef = 57F005C315EE2CCF00914747 /* linphonerc */; }; 7066FC0C13E830E400EFC6DC /* libvpx.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7066FC0B13E830E400EFC6DC /* libvpx.a */; }; @@ -159,6 +157,8 @@ D35E7582159328EB0066B1C1 /* UIAddressTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = D35E7580159328EB0066B1C1 /* UIAddressTextField.m */; }; D36FB2D51589EF7C0036F6F2 /* UIPauseButton.m in Sources */ = {isa = PBXBuildFile; fileRef = D36FB2D41589EF7C0036F6F2 /* UIPauseButton.m */; }; D36FB2D61589EF7C0036F6F2 /* UIPauseButton.m in Sources */ = {isa = PBXBuildFile; fileRef = D36FB2D41589EF7C0036F6F2 /* UIPauseButton.m */; }; + D37490841612E3F200A62D02 /* NSURLConnection+SynchronousDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = D37490831612E3F200A62D02 /* NSURLConnection+SynchronousDelegate.m */; }; + D37490851612E3F200A62D02 /* NSURLConnection+SynchronousDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = D37490831612E3F200A62D02 /* NSURLConnection+SynchronousDelegate.m */; }; D376EAE1160082A4007C8226 /* trash.png in Resources */ = {isa = PBXBuildFile; fileRef = D376EAE0160082A4007C8226 /* trash.png */; }; D376EAE2160082A4007C8226 /* trash.png in Resources */ = {isa = PBXBuildFile; fileRef = D376EAE0160082A4007C8226 /* trash.png */; }; D376EAE816008454007C8226 /* ringtone_01_1600.wav in Resources */ = {isa = PBXBuildFile; fileRef = D376EAE316008454007C8226 /* ringtone_01_1600.wav */; }; @@ -257,12 +257,6 @@ D37CD3A215E2452C0028869A /* BuschJaegerStationTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D37CD3A015E2452B0028869A /* BuschJaegerStationTableViewController.m */; }; D37DC7181594AF3400B2A5EB /* MessageUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D37DC7171594AF3400B2A5EB /* MessageUI.framework */; }; D37DC7191594AF3F00B2A5EB /* MessageUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D37DC7171594AF3400B2A5EB /* MessageUI.framework */; }; - D37EE10916032DA4003608A6 /* libmediastreamer_base.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 22405EE916006F0700B92522 /* libmediastreamer_base.a */; }; - D37EE10A16032DA4003608A6 /* libmediastreamer_voip.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 22405EEA16006F0700B92522 /* libmediastreamer_voip.a */; }; - D37EE10B16032DC2003608A6 /* libmediastreamer_base.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 22405EE916006F0700B92522 /* libmediastreamer_base.a */; }; - D37EE10C16032DC2003608A6 /* libmediastreamer_voip.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 22405EEA16006F0700B92522 /* libmediastreamer_voip.a */; }; - D37EE162160377D7003608A6 /* DTActionSheet.m in Sources */ = {isa = PBXBuildFile; fileRef = D37EE161160377D7003608A6 /* DTActionSheet.m */; }; - D37EE163160377D7003608A6 /* DTActionSheet.m in Sources */ = {isa = PBXBuildFile; fileRef = D37EE161160377D7003608A6 /* DTActionSheet.m */; }; D380800515C28A7A005BE9BC /* UILinphone.m in Sources */ = {isa = PBXBuildFile; fileRef = D380800415C28A7A005BE9BC /* UILinphone.m */; }; D380800615C28A7A005BE9BC /* UILinphone.m in Sources */ = {isa = PBXBuildFile; fileRef = D380800415C28A7A005BE9BC /* UILinphone.m */; }; D380801315C299D0005BE9BC /* ColorSpaceUtilites.m in Sources */ = {isa = PBXBuildFile; fileRef = D380801215C299D0005BE9BC /* ColorSpaceUtilites.m */; }; @@ -289,6 +283,8 @@ D3C6526815AC1A8F0092A874 /* UIEditableTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = D3C6526615AC1A8F0092A874 /* UIEditableTableViewCell.m */; }; D3EA53FD159850E80037DC6B /* LinphoneManager.m in Sources */ = {isa = PBXBuildFile; fileRef = D3EA53FC159850E80037DC6B /* LinphoneManager.m */; }; D3EA53FE159850E80037DC6B /* LinphoneManager.m in Sources */ = {isa = PBXBuildFile; fileRef = D3EA53FC159850E80037DC6B /* LinphoneManager.m */; }; + D3F5F9801609C1F000D3DA1A /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 22744043106F33FC006EC466 /* Security.framework */; }; + D3F5F9821609C1FF00D3DA1A /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 22744043106F33FC006EC466 /* Security.framework */; }; D3F7998115BD32370018C273 /* TPMultiLayoutViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D3F7998015BD32370018C273 /* TPMultiLayoutViewController.m */; }; D3F7998215BD32370018C273 /* TPMultiLayoutViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D3F7998015BD32370018C273 /* TPMultiLayoutViewController.m */; }; D3F9A9EE15AF277E0045320F /* UACellBackgroundView.m in Sources */ = {isa = PBXBuildFile; fileRef = D3F9A9ED15AF277D0045320F /* UACellBackgroundView.m */; }; @@ -578,8 +574,6 @@ 344ABDE71484E723007420B6 /* libzrtpcpp.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libzrtpcpp.a; path = "liblinphone-sdk/apple-darwin/lib/libzrtpcpp.a"; sourceTree = ""; }; 344ABDEF14850AE9007420B6 /* libc++.1.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libc++.1.dylib"; path = "usr/lib/libc++.1.dylib"; sourceTree = SDKROOT; }; 344ABDF014850AE9007420B6 /* libstdc++.6.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libstdc++.6.dylib"; path = "usr/lib/libstdc++.6.dylib"; sourceTree = SDKROOT; }; - 570B130015FE44AF00DE62B6 /* libmediastreamer_voip.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmediastreamer_voip.a; path = "liblinphone-sdk/apple-darwin/lib/libmediastreamer_voip.a"; sourceTree = ""; }; - 570B130215FE44ED00DE62B6 /* libmediastreamer_base.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmediastreamer_base.a; path = "liblinphone-sdk/apple-darwin/lib/libmediastreamer_base.a"; sourceTree = ""; }; 57F005C315EE2CCF00914747 /* linphonerc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = linphonerc; path = Resources/linphonerc; sourceTree = ""; }; 7066FC0B13E830E400EFC6DC /* libvpx.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libvpx.a; path = "liblinphone-sdk/apple-darwin/lib/libvpx.a"; sourceTree = ""; }; 70E542F213E147E3002BA2C0 /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; }; @@ -617,6 +611,8 @@ D35E7580159328EB0066B1C1 /* UIAddressTextField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIAddressTextField.m; sourceTree = ""; }; D36FB2D31589EF7C0036F6F2 /* UIPauseButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIPauseButton.h; sourceTree = ""; }; D36FB2D41589EF7C0036F6F2 /* UIPauseButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIPauseButton.m; sourceTree = ""; }; + D37490821612E3F200A62D02 /* NSURLConnection+SynchronousDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSURLConnection+SynchronousDelegate.h"; path = "Classes/Utils/NSURLConnection+SynchronousDelegate.h"; sourceTree = SOURCE_ROOT; }; + D37490831612E3F200A62D02 /* NSURLConnection+SynchronousDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSURLConnection+SynchronousDelegate.m"; path = "Classes/Utils/NSURLConnection+SynchronousDelegate.m"; sourceTree = SOURCE_ROOT; }; D376EAE0160082A4007C8226 /* trash.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = trash.png; path = Resources/trash.png; sourceTree = ""; }; D376EAE316008454007C8226 /* ringtone_01_1600.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = ringtone_01_1600.wav; path = Resources/ringtone_01_1600.wav; sourceTree = ""; }; D376EAE416008454007C8226 /* ringtone_02_1600.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = ringtone_02_1600.wav; path = Resources/ringtone_02_1600.wav; sourceTree = ""; }; @@ -755,6 +751,7 @@ D37DC7181594AF3400B2A5EB /* MessageUI.framework in Frameworks */, 70E542F313E147E3002BA2C0 /* OpenGLES.framework in Frameworks */, 70E542F513E147EB002BA2C0 /* QuartzCore.framework in Frameworks */, + D3F5F9821609C1FF00D3DA1A /* Security.framework in Frameworks */, 2264B6D211200342002C2C53 /* SystemConfiguration.framework in Frameworks */, 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, 344ABDF114850AE9007420B6 /* libc++.1.dylib in Frameworks */, @@ -813,6 +810,7 @@ D37DC7191594AF3F00B2A5EB /* MessageUI.framework in Frameworks */, 22D8F15D147548E2008C97DB /* OpenGLES.framework in Frameworks */, 22D8F15C147548E2008C97DB /* QuartzCore.framework in Frameworks */, + D3F5F9801609C1F000D3DA1A /* Security.framework in Frameworks */, 22D8F173147548E2008C97DB /* SystemConfiguration.framework in Frameworks */, 22D8F166147548E2008C97DB /* UIKit.framework in Frameworks */, 22D8F178147548E2008C97DB /* libresolv.dylib in Frameworks */, @@ -1228,8 +1226,6 @@ 220FAD2910765B400068D98F /* libgsm.a */, 223148E31178A08200637D6A /* libilbc.a */, 2211DB911475562600DEE054 /* liblinphone.a */, - 22405EE916006F0700B92522 /* libmediastreamer_base.a */, - 22405EEA16006F0700B92522 /* libmediastreamer_voip.a */, 226F2ED51344B0EF00F6EF27 /* libmsamr.a */, 226CDADE14E2D0B800513B67 /* libmsbcg729.a */, 223148E51178A09900637D6A /* libmsilbc.a */, @@ -1352,6 +1348,8 @@ D37EE15F160377D7003608A6 /* DTFoundation */, D32B9DFA15A2F131000B6DEC /* FastAddressBook.h */, D32B9DFB15A2F131000B6DEC /* FastAddressBook.m */, + D37490821612E3F200A62D02 /* NSURLConnection+SynchronousDelegate.h */, + D37490831612E3F200A62D02 /* NSURLConnection+SynchronousDelegate.m */, D326483615887D5200930C67 /* OrderedDictionary.h */, D326483715887D5200930C67 /* OrderedDictionary.m */, D3F7997E15BD31EC0018C273 /* TPMultiLayoutViewController */, @@ -1391,16 +1389,6 @@ path = Utils/ZBarSDK; sourceTree = ""; }; - D37EE15F160377D7003608A6 /* DTFoundation */ = { - isa = PBXGroup; - children = ( - D37EE160160377D7003608A6 /* DTActionSheet.h */, - D37EE161160377D7003608A6 /* DTActionSheet.m */, - ); - name = DTFoundation; - path = Utils/DTFoundation; - sourceTree = ""; - }; D37CD35615E22B0C0028869A /* Headers */ = { isa = PBXGroup; children = ( @@ -1455,6 +1443,16 @@ path = Resources; sourceTree = ""; }; + D37EE15F160377D7003608A6 /* DTFoundation */ = { + isa = PBXGroup; + children = ( + D37EE160160377D7003608A6 /* DTActionSheet.h */, + D37EE161160377D7003608A6 /* DTActionSheet.m */, + ); + name = DTFoundation; + path = Utils/DTFoundation; + sourceTree = ""; + }; D3F7997E15BD31EC0018C273 /* TPMultiLayoutViewController */ = { isa = PBXGroup; children = ( @@ -1745,6 +1743,7 @@ D3FE9F4B15E790D80024F3E4 /* UIHistoryDetailsCell.m in Sources */, D376EAF416008DF1007C8226 /* User.m in Sources */, D32EDD9B1600C450009A84C7 /* LevelPushButton.m in Sources */, + D37490841612E3F200A62D02 /* NSURLConnection+SynchronousDelegate.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1799,6 +1798,7 @@ D3FE9F4C15E790D80024F3E4 /* UIHistoryDetailsCell.m in Sources */, D376EAF516008DF1007C8226 /* User.m in Sources */, D32EDD9C1600C450009A84C7 /* LevelPushButton.m in Sources */, + D37490851612E3F200A62D02 /* NSURLConnection+SynchronousDelegate.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1847,6 +1847,7 @@ submodules/externals/speex/include, ); INFOPLIST_FILE = "buschjaeger-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 4.0; LIBRARY_SEARCH_PATHS = ( "$(BUILT_PRODUCTS_DIR)", "\"$(SRCROOT)/liblinphone-sdk/apple-darwin/lib/mediastreamer/plugins\"", @@ -1915,6 +1916,7 @@ submodules/externals/speex/include, ); INFOPLIST_FILE = "buschjaeger-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 4.0; LIBRARY_SEARCH_PATHS = ( "$(BUILT_PRODUCTS_DIR)", "\"$(SRCROOT)/liblinphone-sdk/apple-darwin/lib/mediastreamer/plugins\"", @@ -1958,6 +1960,7 @@ submodules/externals/speex/include, ); INFOPLIST_FILE = "buschjaeger-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 4.0; LIBRARY_SEARCH_PATHS = ( "$(BUILT_PRODUCTS_DIR)", "\"$(SRCROOT)/liblinphone-sdk/apple-darwin/lib/mediastreamer/plugins\"", @@ -1969,7 +1972,7 @@ OTHER_LDFLAGS = ""; PRODUCT_NAME = "buschjaeger-no-gpl-thirdparties"; SKIP_INSTALL = NO; - TARGETED_DEVICE_FAMILY = 1; + TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; @@ -2000,6 +2003,7 @@ submodules/externals/speex/include, ); INFOPLIST_FILE = "buschjaeger-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 4.0; LIBRARY_SEARCH_PATHS = ( "$(BUILT_PRODUCTS_DIR)", "\"$(SRCROOT)/liblinphone-sdk/apple-darwin/lib/mediastreamer/plugins\"", @@ -2011,7 +2015,7 @@ OTHER_LDFLAGS = ""; PRODUCT_NAME = "buschjaeger-no-gpl-thirdparties"; SKIP_INSTALL = NO; - TARGETED_DEVICE_FAMILY = 1; + TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; }; @@ -2043,6 +2047,7 @@ submodules/externals/speex/include, ); INFOPLIST_FILE = "buschjaeger-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 4.0; LIBRARY_SEARCH_PATHS = ( "$(BUILT_PRODUCTS_DIR)", "\"$(SRCROOT)/liblinphone-sdk/apple-darwin/lib/mediastreamer/plugins\"", @@ -2054,7 +2059,7 @@ OTHER_LDFLAGS = ""; PRODUCT_NAME = "buschjaeger-no-gpl-thirdparties"; SKIP_INSTALL = NO; - TARGETED_DEVICE_FAMILY = 1; + TARGETED_DEVICE_FAMILY = "1,2"; }; name = Distribution; }; @@ -2086,6 +2091,7 @@ submodules/externals/speex/include, ); INFOPLIST_FILE = "buschjaeger-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 4.0; LIBRARY_SEARCH_PATHS = ( "$(BUILT_PRODUCTS_DIR)", "\"$(SRCROOT)/liblinphone-sdk/apple-darwin/lib/mediastreamer/plugins\"", @@ -2097,7 +2103,7 @@ OTHER_LDFLAGS = ""; PRODUCT_NAME = "buschjaeger-no-gpl-thirdparties"; SKIP_INSTALL = NO; - TARGETED_DEVICE_FAMILY = 1; + TARGETED_DEVICE_FAMILY = "1,2"; }; name = DistributionAdhoc; }; @@ -2154,7 +2160,7 @@ submodules/externals/speex/include, ); INFOPLIST_FILE = "buschjaeger-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 5.1; + IPHONEOS_DEPLOYMENT_TARGET = 4.0; LIBRARY_SEARCH_PATHS = ( "$(BUILT_PRODUCTS_DIR)", "\"$(SRCROOT)/liblinphone-sdk/apple-darwin/lib/mediastreamer/plugins\"", @@ -2224,7 +2230,7 @@ submodules/externals/speex/include, ); INFOPLIST_FILE = "buschjaeger-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 5.1; + IPHONEOS_DEPLOYMENT_TARGET = 4.0; LIBRARY_SEARCH_PATHS = ( "$(BUILT_PRODUCTS_DIR)", "\"$(SRCROOT)/liblinphone-sdk/apple-darwin/lib/mediastreamer/plugins\"",