diff --git a/Classes/AboutViewController.m b/Classes/AboutViewController.m index c0f3ef92b..d969ae16f 100644 --- a/Classes/AboutViewController.m +++ b/Classes/AboutViewController.m @@ -64,7 +64,7 @@ [linkLabel setText:NSLocalizedString(@"http://www.linphone.org", nil)]; [licenseLabel setText:NSLocalizedString(@"GNU General Public License V2 ", nil)]; - [copyrightLabel setText:NSLocalizedString(@"© 2010-2012 Belledonne Communications ", nil)]; + [copyrightLabel setText:NSLocalizedString(@"© 2010 Belledonne Communications ", nil)]; [linkLabel addGestureRecognizer:linkTapGestureRecognizer]; diff --git a/Classes/InAppProductsManager.h b/Classes/InAppProductsManager.h index b973336cd..f23a9cdeb 100644 --- a/Classes/InAppProductsManager.h +++ b/Classes/InAppProductsManager.h @@ -46,7 +46,14 @@ typedef NSString* IAPPurchaseNotificationStatus; //paid_account_id=test.autorenew_7days //receipt_validation_url=https://www.linphone.org/inapp.php //products_list=test.autorenew_7days -// Note: in Sandbox mode (test), autorenewal expire time is speed up (see http://stackoverflow.com/questions/8815271/what-expiry-date-should-i-see-for-in-app-purchase-in-the-application-sandbox) so that 7 days renewal is only 3 minutes! +// Note: in Sandbox mode (test), autorenewal expire time is speed up (see http://stackoverflow.com/questions/8815271/what-expiry-date-should-i-see-for-in-app-purchase-in-the-application-sandbox) so that 7 days renewal is only 3 minutes and: +//1 week = 3 minutes +//1 month = 5 minutes +//2 months = 10 minutes +//3 months = 15 minutes +//6 months = 30 minutes +//1 year = 1 hour + @interface InAppProductsManager : NSObject { NSString *latestReceiptMD5; @@ -64,11 +71,16 @@ typedef NSString* IAPPurchaseNotificationStatus; // TRUE if manager is available for usage - will be FALSE if an operation is already in progress or if not initialized or not enabled @property (readonly) BOOL available; +// TRUE if accountActivate was started but we did not receive response from server yet +@property (readonly) BOOL accountActivationInProgress; + - (BOOL)isPurchasedWithID:(NSString*)productId; // Purchase an account. You should not use this if manager is not available yet. -- (BOOL)purchaseAccount:(NSString *)phoneNumber withPassword:(NSString *)password andEmail:(NSString*)email; +- (BOOL)purchaseAccount:(NSString *)phoneNumber withPassword:(NSString *)password andEmail:(NSString*)email monthly:(BOOL)monthly; // Purchase a product. You should not use this if manager is not available yet. - (BOOL)purchaseWitID:(NSString *)productID; +// Activate purchased account. +- (BOOL)activateAccount:(NSString *)phoneNumber; // restore user purchases. You should not use this if manager is not available yet. Must be at a user action ONLY. - (BOOL)restore; diff --git a/Classes/InAppProductsManager.m b/Classes/InAppProductsManager.m index 316e78d7a..a9c35d7ac 100644 --- a/Classes/InAppProductsManager.m +++ b/Classes/InAppProductsManager.m @@ -32,9 +32,10 @@ #import "InAppProductsViewController.h" @interface InAppProductsManager() - @property (retain, nonatomic) NSDictionary *accountCreationData; - // needed because request:didFailWithError method is already used by SKProductsRequestDelegate... - @property (nonatomic, retain) InAppProductsXMLRPCDelegate *xmlrpc; +@property (retain, nonatomic) NSDate *expirationDate; +@property (retain, nonatomic) NSDictionary *accountCreationData; +// needed because request:didFailWithError method is already used by SKProductsRequestDelegate... +@property (nonatomic, retain) InAppProductsXMLRPCDelegate *xmlrpc; @end @implementation InAppProductsManager @@ -47,7 +48,7 @@ _enabled = (([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0) && ([SKPaymentQueue canMakePayments]) && ([[LinphoneManager instance] lpConfigBoolForKey:@"enabled" forSection:@"in_app_purchase"])); _initialized = false; _available = false; - + _accountActivationInProgress = false; if (_enabled) { self.xmlrpc = [[InAppProductsXMLRPCDelegate alloc] init]; _status = kIAPNotReady; @@ -64,7 +65,9 @@ if (!_enabled) return FALSE; for (NSString *prod in _productsIDPurchased) { - if ([prod isEqual: productID]) { + NSDate *now = [[[NSDate alloc] init] autorelease]; + // since multiple ID represent the same product, we must not check it + if (/*[prod isEqual: productID] &&*/[self.expirationDate earlierDate:now] == now) { bool isBought = true; LOGE(@"%@ is %s bought.", prod, isBought?"":"NOT"); return isBought; @@ -75,7 +78,7 @@ - (BOOL)purchaseWitID:(NSString *)productID { if (!_enabled||!_initialized||!_available) { - NSDictionary* dict = @{@"product_id":productID, @"error_msg": NSLocalizedString(@"In apps not ready yet", nil)}; + NSDictionary* dict = @{@"product_id":productID, @"error_msg": NSLocalizedString(@"Cannot purchase anything yet, please try again later.", nil)}; [self postNotificationforStatus:kIAPPurchaseFailed withDict:dict]; return FALSE; } @@ -95,9 +98,9 @@ } } -- (BOOL)purchaseAccount:(NSString *)phoneNumber withPassword:(NSString *)password andEmail:(NSString*)email { +- (BOOL)purchaseAccount:(NSString *)phoneNumber withPassword:(NSString *)password andEmail:(NSString*)email monthly:(BOOL)monthly { if (phoneNumber) { - NSString* productID = [[LinphoneManager instance] lpConfigStringForKey:@"paid_account_id" forSection:@"in_app_purchase"]; + NSString* productID = [[LinphoneManager instance] lpConfigStringForKey:(monthly?@"paid_account_id_monthly":@"paid_account_id") forSection:@"in_app_purchase"]; self.accountCreationData = @{ @"phoneNumber":[phoneNumber retain], @"password":[password retain], @"email":[email retain] }; if (![self purchaseWitID:productID]) { @@ -108,6 +111,34 @@ return false; } +- (BOOL)activateAccount:(NSString *)phoneNumber { + if (phoneNumber) { + NSString *receiptBase64 = [self getReceipt]; + if (receiptBase64) { + NSURL *URL = [NSURL URLWithString:[[LinphoneManager instance] lpConfigStringForKey:@"receipt_validation_url" forSection:@"in_app_purchase"]]; + XMLRPCRequest *request = [[XMLRPCRequest alloc] initWithURL: URL]; + //buying for the first time: need to create the account + //if ([transaction.transactionIdentifier isEqualToString:transaction.originalTransaction.transactionIdentifier]) { + [request setMethod: @"activate_account" withParameters:[NSArray arrayWithObjects: + @"", + phoneNumber, + receiptBase64, + @"", + @"apple", + nil]]; + _accountActivationInProgress = YES; + XMLRPCConnectionManager *manager = [XMLRPCConnectionManager sharedManager]; + [manager spawnConnectionWithXMLRPCRequest: request delegate: self.xmlrpc]; + LOGI(@"XMLRPC query %@", [request method]); + [request release]; + return true; + } else { + LOGE(@"Trying to activate account but no receipt available yet (probably doing it too soon)"); + } + } + return false; +} + -(BOOL)restore { if (!_enabled||!_initialized||!_available) { NSDictionary* dict = @{@"error_msg": NSLocalizedString(@"In apps not ready yet", nil)}; @@ -197,70 +228,66 @@ } } -- (void)validateReceipt: (SKPaymentTransaction*)transaction { - NSString *receiptBase64 = nil; +- (NSString*) getReceipt { NSURL *receiptURL = [[NSBundle mainBundle] appStoreReceiptURL]; - // Test whether the receipt is present at the above URL if(![[NSFileManager defaultManager] fileExistsAtPath:[receiptURL path]]) { // We are probably in sandbox environment, trying to retrieve it... + return nil; + } + + NSString *receiptBase64 = [[NSData dataWithContentsOfURL:receiptURL] base64EncodedStringWithOptions:0]; + LOGI(@"Found appstore receipt %@", [receiptBase64 md5]); + return receiptBase64; +} + +- (void)validateReceipt: (SKPaymentTransaction*)transaction { + NSString *receiptBase64 = [self getReceipt]; + if (receiptBase64 == nil) { SKRequest* req = [[SKReceiptRefreshRequest alloc] init]; LOGI(@"Receipt not found yet, trying to retrieve it..."); req.delegate = self; [req start]; return; } - - receiptBase64 = [[NSData dataWithContentsOfURL:receiptURL] base64EncodedStringWithOptions:0]; - LOGI(@"Found appstore receipt %@", [receiptBase64 md5]); - //only check the receipt if it has changed if (latestReceiptMD5 == nil || ![latestReceiptMD5 isEqualToString:[receiptBase64 md5]]) { + // transaction is null when restoring user purchases at application start or if user clicks the "restore" button // We must validate the receipt on our server NSURL *URL = [NSURL URLWithString:[[LinphoneManager instance] lpConfigStringForKey:@"receipt_validation_url" forSection:@"in_app_purchase"]]; - XMLRPCRequest *request = [[XMLRPCRequest alloc] initWithURL: URL]; - - // transaction is null when restoring user purchases at application start or if user clicks the "restore" button - if (!transaction || [transaction.payment.productIdentifier isEqualToString:[[LinphoneManager instance] lpConfigStringForKey:@"paid_account_id" forSection:@"in_app_purchase"]]) { - //buying for the first time: need to create the account - //if ([transaction.transactionIdentifier isEqualToString:transaction.originalTransaction.transactionIdentifier]) { - if (self.accountCreationData.count == 3) { - [request setMethod: @"create_account_from_in_app_purchase" withParameters:[NSArray arrayWithObjects: - @"", - [_accountCreationData objectForKey:@"phoneNumber"], - receiptBase64, - @"", - @"apple", - [_accountCreationData objectForKey:@"email"], - nil]]; - self.accountCreationData = nil; - // otherwise simply renewing - } else { - if ([[self getPhoneNumber] length] > 0) { + //buying for the first time: need to create the account + //if ([transaction.transactionIdentifier isEqualToString:transaction.originalTransaction.transactionIdentifier]) { + if (self.accountCreationData.count == 3) { + [request setMethod: @"create_account_from_in_app_purchase" withParameters:[NSArray arrayWithObjects: + @"", + [_accountCreationData objectForKey:@"phoneNumber"], + receiptBase64, + @"", + @"apple", + [_accountCreationData objectForKey:@"email"], + nil]]; + self.accountCreationData = nil; + // otherwise simply renewing + } else { + if ([[self getPhoneNumber] length] > 0) { [request setMethod: @"get_expiration_date" withParameters:[NSArray arrayWithObjects: [self getPhoneNumber], receiptBase64, @"", @"apple", nil]]; - } else { - LOGW(@"No SIP URI configured, doing nothing"); - _available = true; - return; - } + } else { + LOGW(@"No SIP URI configured, doing nothing"); + _available = true; + return; } - } else { - LOGE(@"Hum, not handling product with ID %@", transaction.payment.productIdentifier); - _available = true; - return; } - latestReceiptMD5 = [[receiptBase64 md5] retain]; XMLRPCConnectionManager *manager = [XMLRPCConnectionManager sharedManager]; [manager spawnConnectionWithXMLRPCRequest: request delegate: self.xmlrpc]; - LOGI(@"XMLRPC query %@: %@", [request method], [request body]); + LOGI(@"XMLRPC query %@", [request method]); [request release]; } else { LOGW(@"Not checking receipt since it has already been done!"); @@ -311,7 +338,7 @@ NSDictionary* dict = @{@"product_id": transaction.payment.productIdentifier}; [self postNotificationforStatus:kIAPPurchaseCancelled withDict:dict]; } else { - NSString* errlast = [NSString stringWithFormat:@"Purchase of %@ failed: %@.",transaction.payment.productIdentifier,transaction.error.localizedDescription]; + NSString* errlast = [NSString stringWithFormat:@"Purchase failed: %@.",transaction.error.localizedDescription]; LOGE(@"SKPaymentTransactionStateFailed: %@", errlast); NSDictionary* dict = @{@"product_id": transaction.payment.productIdentifier, @"error_msg": errlast}; [self postNotificationforStatus:kIAPPurchaseFailed withDict:dict]; @@ -324,7 +351,7 @@ - (void)paymentQueue:(SKPaymentQueue *)queue removedTransactions:(NSArray *)transactions { for(SKPaymentTransaction * transaction in transactions) { - LOGI(@"%@ was removed from the payment queue.", transaction.payment.productIdentifier); + LOGD(@"%@ was removed from the payment queue.", transaction.payment.productIdentifier); } } @@ -350,6 +377,10 @@ _available = true; + if ([[request method] isEqualToString:@"activate_account"]) { + _accountActivationInProgress = NO; + } + LOGI(@"XMLRPC response %@: %@", [request method], [response body]); NSString* productID = [[LinphoneManager instance] lpConfigStringForKey:@"paid_account_id" forSection:@"in_app_purchase"]; @@ -361,22 +392,26 @@ // response object can either be expiration date (long long number or an error string) double timeinterval = [[response object] doubleValue]; if (timeinterval != 0.0f) { - NSDate *expirationDate = [NSDate dateWithTimeIntervalSince1970:timeinterval/1000]; - NSDate *now = [[NSDate alloc] init]; - NSDictionary* dict = @{@"product_id": productID, @"expires_date": expirationDate}; - if ([expirationDate earlierDate:now] == expirationDate) { + self.expirationDate = [NSDate dateWithTimeIntervalSince1970:timeinterval/1000]; + NSDate *now = [[[NSDate alloc] init] autorelease]; + NSDictionary* dict = @{@"product_id": productID, @"expires_date": self.expirationDate}; + if ([self.expirationDate earlierDate:now] == self.expirationDate) { LOGW(@"Account has expired"); [self postNotificationforStatus:kIAPPurchaseExpired withDict:dict]; } else { + LOGI(@"Account valid until %@", self.expirationDate); [_productsIDPurchased addObject:productID]; [self postNotificationforStatus:kIAPPurchaseSucceeded withDict:dict]; } } else { + self.expirationDate = nil; NSString *error = [response object]; LOGE(@"Failed with error %@", error); NSString *errorMsg; if ([error isEqualToString:@"ERROR_ACCOUNT_ALREADY_EXISTS"]) { - errorMsg=NSLocalizedString(@"You have already registered an account.", nil); + errorMsg=NSLocalizedString(@"This account is already registered.", nil); + } else if ([error isEqualToString:@"ERROR_UID_ALREADY_IN_USE"]) { + errorMsg=NSLocalizedString(@"You already own an account.", nil); } else if ([error isEqualToString:@"ERROR_ACCOUNT_DOESNT_EXIST"]) { errorMsg=NSLocalizedString(@"You have already purchased an account but it does not exist anymore.", nil); } else if ([error isEqualToString:@"ERROR_PURCHASE_CANCELLED"]) { @@ -415,6 +450,10 @@ _available = true; + if ([[request method] isEqualToString:@"activate_account"]) { + _accountActivationInProgress = NO; + } + LOGE(@"Communication issue (%@)", [error localizedDescription]); NSString *errorString = [NSString stringWithFormat:NSLocalizedString(@"Communication issue (%@)", nil), [error localizedDescription]]; UIAlertView* errorView = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Communication issue", nil) @@ -434,7 +473,7 @@ [[NSNotificationCenter defaultCenter] postNotificationName:status object:self userInfo:nil]; LOGE(@"Not supported, triggering %@", status); } -- (BOOL)purchaseAccount:(NSString *)phoneNumber withPassword:(NSString *)password andEmail:(NSString*)email { [self postNotificationforStatus:kIAPPurchaseFailed]; return false; } +- (BOOL)purchaseAccount:(NSString *)phoneNumber withPassword:(NSString *)password andEmail:(NSString *)email monthly:(BOOL)monthly { [self postNotificationforStatus:kIAPPurchaseFailed]; return false; } - (BOOL)restore { [self postNotificationforStatus:kIAPRestoreFailed]; return false; } - (BOOL)retrievePurchases { [self postNotificationforStatus:kIAPRestoreFailed]; return false; } - (BOOL)purchaseWitID:(NSString *)productID { [self postNotificationforStatus:kIAPPurchaseFailed]; return FALSE; } @@ -444,6 +483,7 @@ - (void)XMLRPCRequest:(XMLRPCRequest *)request didReceiveResponse:(XMLRPCResponse *)response { } - (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions { } - (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response { } +- (BOOL)activateAccount:(NSString *)phoneNumber { return FALSE; } #endif @end @@ -470,6 +510,6 @@ } - (void)request:(XMLRPCRequest *)request didCancelAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge { - + } @end diff --git a/Classes/LinphoneManager.m b/Classes/LinphoneManager.m index 0ca716147..eaadf8ea1 100644 --- a/Classes/LinphoneManager.m +++ b/Classes/LinphoneManager.m @@ -194,11 +194,7 @@ struct codec_name_pref_table codec_pref_table[]={ } + (BOOL)runningOnIpad { -#ifdef UI_USER_INTERFACE_IDIOM - return (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad); -#else - return NO; -#endif + return ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad); } + (BOOL)isRunningTests { @@ -299,8 +295,6 @@ struct codec_name_pref_table codec_pref_table[]={ #endif } - _iapManager = [[InAppProductsManager alloc] init]; - [self migrateFromUserPrefs]; } return self; @@ -1403,6 +1397,8 @@ static BOOL libStarted = FALSE; // create linphone core [self createLinphoneCore]; + _iapManager = [[InAppProductsManager alloc] init]; + linphone_core_migrate_to_multi_transport(theLinphoneCore); // init audio session (just getting the instance will init) diff --git a/Classes/LinphoneUI/UICallBar.m b/Classes/LinphoneUI/UICallBar.m index 8847b39cf..92d86dedb 100644 --- a/Classes/LinphoneUI/UICallBar.m +++ b/Classes/LinphoneUI/UICallBar.m @@ -172,7 +172,7 @@ // Set selected+over background: IB lack ! [speakerButton setBackgroundImage:[UIImage imageNamed:@"speaker_on_over.png"] forState:(UIControlStateHighlighted | UIControlStateSelected)]; - [speakerButtonLandscape setBackgroundImage:[UIImage imageNamed:@"sspeaker_on_over_landscape.png"] + [speakerButtonLandscape setBackgroundImage:[UIImage imageNamed:@"speaker_on_over_landscape.png"] forState:(UIControlStateHighlighted | UIControlStateSelected)]; [LinphoneUtils buttonFixStates:speakerButton]; diff --git a/Classes/LinphoneUI/de.lproj/UICallBar.strings b/Classes/LinphoneUI/de.lproj/UICallBar.strings index c8663943d..2f3fddeb7 100644 Binary files a/Classes/LinphoneUI/de.lproj/UICallBar.strings and b/Classes/LinphoneUI/de.lproj/UICallBar.strings differ diff --git a/Classes/LinphoneUI/de.lproj/UICallBar~ipad.strings b/Classes/LinphoneUI/de.lproj/UICallBar~ipad.strings index 0e34b67fe..b403e5d70 100644 Binary files a/Classes/LinphoneUI/de.lproj/UICallBar~ipad.strings and b/Classes/LinphoneUI/de.lproj/UICallBar~ipad.strings differ diff --git a/Classes/LinphoneUI/de.lproj/UICallCell.strings b/Classes/LinphoneUI/de.lproj/UICallCell.strings index d88ef71c5..0c4232ce2 100644 Binary files a/Classes/LinphoneUI/de.lproj/UICallCell.strings and b/Classes/LinphoneUI/de.lproj/UICallCell.strings differ diff --git a/Classes/LinphoneUI/de.lproj/UIChatCell.strings b/Classes/LinphoneUI/de.lproj/UIChatCell.strings index f377a8290..ec85a65fa 100644 Binary files a/Classes/LinphoneUI/de.lproj/UIChatCell.strings and b/Classes/LinphoneUI/de.lproj/UIChatCell.strings differ diff --git a/Classes/LinphoneUI/de.lproj/UIChatRoomCell.strings b/Classes/LinphoneUI/de.lproj/UIChatRoomCell.strings index 4091aa28a..bb0ec0b8f 100644 Binary files a/Classes/LinphoneUI/de.lproj/UIChatRoomCell.strings and b/Classes/LinphoneUI/de.lproj/UIChatRoomCell.strings differ diff --git a/Classes/LinphoneUI/de.lproj/UIContactCell.strings b/Classes/LinphoneUI/de.lproj/UIContactCell.strings index 1e83d31ff..311f23136 100644 Binary files a/Classes/LinphoneUI/de.lproj/UIContactCell.strings and b/Classes/LinphoneUI/de.lproj/UIContactCell.strings differ diff --git a/Classes/LinphoneUI/de.lproj/UIContactDetailsFooter.strings b/Classes/LinphoneUI/de.lproj/UIContactDetailsFooter.strings index 44dceef6d..9dc62be3d 100644 Binary files a/Classes/LinphoneUI/de.lproj/UIContactDetailsFooter.strings and b/Classes/LinphoneUI/de.lproj/UIContactDetailsFooter.strings differ diff --git a/Classes/LinphoneUI/de.lproj/UIContactDetailsHeader.strings b/Classes/LinphoneUI/de.lproj/UIContactDetailsHeader.strings index fd30c299a..8ec7e8bdb 100644 Binary files a/Classes/LinphoneUI/de.lproj/UIContactDetailsHeader.strings and b/Classes/LinphoneUI/de.lproj/UIContactDetailsHeader.strings differ diff --git a/Classes/LinphoneUI/de.lproj/UIMainBar.strings b/Classes/LinphoneUI/de.lproj/UIMainBar.strings index 5edd38a0e..1396b82fd 100644 Binary files a/Classes/LinphoneUI/de.lproj/UIMainBar.strings and b/Classes/LinphoneUI/de.lproj/UIMainBar.strings differ diff --git a/Classes/LinphoneUI/de.lproj/UIMainBar~ipad.strings b/Classes/LinphoneUI/de.lproj/UIMainBar~ipad.strings index 2cb9e3a89..f5c0b2c61 100644 Binary files a/Classes/LinphoneUI/de.lproj/UIMainBar~ipad.strings and b/Classes/LinphoneUI/de.lproj/UIMainBar~ipad.strings differ diff --git a/Classes/LinphoneUI/de.lproj/UIStateBar.strings b/Classes/LinphoneUI/de.lproj/UIStateBar.strings index 9582df007..8be33cdc4 100644 Binary files a/Classes/LinphoneUI/de.lproj/UIStateBar.strings and b/Classes/LinphoneUI/de.lproj/UIStateBar.strings differ diff --git a/Classes/PhoneMainView.m b/Classes/PhoneMainView.m index 2abf1c10f..47143ea8d 100644 --- a/Classes/PhoneMainView.m +++ b/Classes/PhoneMainView.m @@ -626,7 +626,7 @@ static RootViewManager* rootViewManagerInstance = nil; } if (linphone_call_get_reason(call) == LinphoneReasonNotFound) { - lMessage = [NSString stringWithFormat : NSLocalizedString(@"'%@' not registered", nil), lUserName]; + lMessage = [NSString stringWithFormat : NSLocalizedString(@"%@ not registered", nil), lUserName]; } else { if (message != nil) { lMessage = [NSString stringWithFormat : NSLocalizedString(@"%@\nReason was: %@", nil), lMessage, message]; diff --git a/Classes/SettingsViewController.m b/Classes/SettingsViewController.m index 4f56f8a72..42c28edd4 100644 --- a/Classes/SettingsViewController.m +++ b/Classes/SettingsViewController.m @@ -595,6 +595,10 @@ static UICompositeViewDescription *compositeDescription = nil; LinphoneManager* lm = [LinphoneManager instance]; NSMutableSet *hiddenKeys = [NSMutableSet set]; +#ifndef HAVE_SSL + [hiddenKeys addObject:@"media_encryption_preference"]; +#endif + #ifndef DEBUG [hiddenKeys addObject:@"release_button"]; [hiddenKeys addObject:@"clear_cache_button"]; diff --git a/Classes/WizardViewController.m b/Classes/WizardViewController.m index 1d27f276b..874aa2094 100644 --- a/Classes/WizardViewController.m +++ b/Classes/WizardViewController.m @@ -933,7 +933,7 @@ static UICompositeViewDescription *compositeDescription = nil; NSString *identity = [self identityFromUsername:username]; [self checkUserExist:identity]; } else { - [iapm purchaseAccount:username withPassword:password andEmail:email]; + [iapm purchaseAccount:username withPassword:password andEmail:email monthly:FALSE]; // inAppPurchaseNotification will take care of bringing us to the next view now } } diff --git a/Classes/de.lproj/AboutViewController.strings b/Classes/de.lproj/AboutViewController.strings index ba945f814..fe932b98a 100644 Binary files a/Classes/de.lproj/AboutViewController.strings and b/Classes/de.lproj/AboutViewController.strings differ diff --git a/Classes/de.lproj/ChatRoomViewController.strings b/Classes/de.lproj/ChatRoomViewController.strings index baa97fae2..3afa89d93 100644 Binary files a/Classes/de.lproj/ChatRoomViewController.strings and b/Classes/de.lproj/ChatRoomViewController.strings differ diff --git a/Classes/de.lproj/ChatViewController.strings b/Classes/de.lproj/ChatViewController.strings index 947386cb9..f40dfd2ae 100644 Binary files a/Classes/de.lproj/ChatViewController.strings and b/Classes/de.lproj/ChatViewController.strings differ diff --git a/Classes/de.lproj/ContactDetailsViewController.strings b/Classes/de.lproj/ContactDetailsViewController.strings index d189b6234..4a8fe640e 100644 Binary files a/Classes/de.lproj/ContactDetailsViewController.strings and b/Classes/de.lproj/ContactDetailsViewController.strings differ diff --git a/Classes/de.lproj/ContactsViewController.strings b/Classes/de.lproj/ContactsViewController.strings index 9c47c94ff..fdd063fb9 100644 Binary files a/Classes/de.lproj/ContactsViewController.strings and b/Classes/de.lproj/ContactsViewController.strings differ diff --git a/Classes/de.lproj/DialerViewController.strings b/Classes/de.lproj/DialerViewController.strings index d747752ea..bbc5e3bbd 100644 Binary files a/Classes/de.lproj/DialerViewController.strings and b/Classes/de.lproj/DialerViewController.strings differ diff --git a/Classes/de.lproj/DialerViewController~ipad.strings b/Classes/de.lproj/DialerViewController~ipad.strings index ffeea8e15..2802cfdb5 100644 Binary files a/Classes/de.lproj/DialerViewController~ipad.strings and b/Classes/de.lproj/DialerViewController~ipad.strings differ diff --git a/Classes/de.lproj/HistoryDetailsViewController.strings b/Classes/de.lproj/HistoryDetailsViewController.strings index 97b098e95..1ab7796f5 100644 Binary files a/Classes/de.lproj/HistoryDetailsViewController.strings and b/Classes/de.lproj/HistoryDetailsViewController.strings differ diff --git a/Classes/de.lproj/HistoryViewController.strings b/Classes/de.lproj/HistoryViewController.strings index 0f6ab0c52..b1ce4a4ea 100644 Binary files a/Classes/de.lproj/HistoryViewController.strings and b/Classes/de.lproj/HistoryViewController.strings differ diff --git a/Classes/de.lproj/IncomingCallViewController.strings b/Classes/de.lproj/IncomingCallViewController.strings index 87b8afab2..53c9c18ae 100644 Binary files a/Classes/de.lproj/IncomingCallViewController.strings and b/Classes/de.lproj/IncomingCallViewController.strings differ diff --git a/Classes/de.lproj/IncomingCallViewController~ipad.strings b/Classes/de.lproj/IncomingCallViewController~ipad.strings index f33ecb5c5..b50cb2cce 100644 Binary files a/Classes/de.lproj/IncomingCallViewController~ipad.strings and b/Classes/de.lproj/IncomingCallViewController~ipad.strings differ diff --git a/Classes/de.lproj/WizardViews.strings b/Classes/de.lproj/WizardViews.strings index 1903a7734..208d593a1 100644 Binary files a/Classes/de.lproj/WizardViews.strings and b/Classes/de.lproj/WizardViews.strings differ diff --git a/Classes/zh_TW.lproj/FirstLoginViewController.strings b/Classes/zh_TW.lproj/FirstLoginViewController.strings new file mode 100644 index 000000000..389b7f246 Binary files /dev/null and b/Classes/zh_TW.lproj/FirstLoginViewController.strings differ diff --git a/Classes/zh_TW.lproj/WizardViews.strings b/Classes/zh_TW.lproj/WizardViews.strings new file mode 100644 index 000000000..302614eda Binary files /dev/null and b/Classes/zh_TW.lproj/WizardViews.strings differ diff --git a/Resources/ar.lproj/Localizable.strings b/Resources/ar.lproj/Localizable.strings index d880db10b..ad98c915c 100644 Binary files a/Resources/ar.lproj/Localizable.strings and b/Resources/ar.lproj/Localizable.strings differ diff --git a/Resources/de.lproj/Localizable.strings b/Resources/de.lproj/Localizable.strings index 4b2363230..cbef1d4c0 100644 Binary files a/Resources/de.lproj/Localizable.strings and b/Resources/de.lproj/Localizable.strings differ diff --git a/Resources/en.lproj/Localizable.strings b/Resources/en.lproj/Localizable.strings index 355e529da..0b8e79cf6 100644 Binary files a/Resources/en.lproj/Localizable.strings and b/Resources/en.lproj/Localizable.strings differ diff --git a/Resources/fr.lproj/Localizable.strings b/Resources/fr.lproj/Localizable.strings index 1a64d133b..e896d2d0b 100644 Binary files a/Resources/fr.lproj/Localizable.strings and b/Resources/fr.lproj/Localizable.strings differ diff --git a/Resources/ja.lproj/Localizable.strings b/Resources/ja.lproj/Localizable.strings index 64a65e458..8f2e68d29 100644 Binary files a/Resources/ja.lproj/Localizable.strings and b/Resources/ja.lproj/Localizable.strings differ diff --git a/Resources/nl.lproj/Localizable.strings b/Resources/nl.lproj/Localizable.strings index acc87f0db..880bf8b53 100644 Binary files a/Resources/nl.lproj/Localizable.strings and b/Resources/nl.lproj/Localizable.strings differ diff --git a/Resources/ru.lproj/Localizable.strings b/Resources/ru.lproj/Localizable.strings index 2539ab1e8..23de0527f 100644 Binary files a/Resources/ru.lproj/Localizable.strings and b/Resources/ru.lproj/Localizable.strings differ diff --git a/Resources/zh_TW.lproj/Localizable.strings b/Resources/zh_TW.lproj/Localizable.strings index d71ff4f90..9b46bcd9e 100644 Binary files a/Resources/zh_TW.lproj/Localizable.strings and b/Resources/zh_TW.lproj/Localizable.strings differ diff --git a/Settings/InAppSettings.bundle/Audio.plist b/Settings/InAppSettings.bundle/Audio.plist index 58f5cf6d0..b9b3278f4 100644 --- a/Settings/InAppSettings.bundle/Audio.plist +++ b/Settings/InAppSettings.bundle/Audio.plist @@ -16,7 +16,7 @@ Key speex_16k_preference Title - Speex 16Khz + Speex 16kHz Type PSToggleSwitchSpecifier @@ -26,7 +26,7 @@ Key speex_8k_preference Title - Speex 8Khz + Speex 8kHz Type PSToggleSwitchSpecifier @@ -46,7 +46,7 @@ Key silk_24k_preference Title - Silk 24Khz + Silk 24kHz Type PSToggleSwitchSpecifier @@ -56,7 +56,7 @@ Key silk_16k_preference Title - Silk 16Khz + Silk 16kHz Type PSToggleSwitchSpecifier @@ -128,7 +128,7 @@ Key g722_preference Title - G722 + G.722 Type PSToggleSwitchSpecifier @@ -138,7 +138,7 @@ Key g729_preference Title - G729 + G.729 Type PSToggleSwitchSpecifier @@ -158,7 +158,7 @@ Key ilbc_preference Title - ILBC + iLBC Type PSToggleSwitchSpecifier diff --git a/Settings/InAppSettings.bundle/Call.plist b/Settings/InAppSettings.bundle/Call.plist index 3b2503bfd..ae0855c79 100644 --- a/Settings/InAppSettings.bundle/Call.plist +++ b/Settings/InAppSettings.bundle/Call.plist @@ -28,7 +28,7 @@ Key substitute_+_by_00_preference Title - Substitue + by 00 + Substitute + by 00 Type PSToggleSwitchSpecifier diff --git a/Settings/InAppSettings.bundle/Video.plist b/Settings/InAppSettings.bundle/Video.plist index dfcd404b4..71e8964ff 100644 --- a/Settings/InAppSettings.bundle/Video.plist +++ b/Settings/InAppSettings.bundle/Video.plist @@ -74,7 +74,7 @@ Key mp4v-es_preference Title - mpeg4 + MPEG-4 Type PSToggleSwitchSpecifier @@ -84,7 +84,7 @@ Key h264_preference Title - h264 + H.264 Type PSToggleSwitchSpecifier diff --git a/Settings/InAppSettings.bundle/ar.lproj/Audio.strings b/Settings/InAppSettings.bundle/ar.lproj/Audio.strings index 981d99f7c..5cb4f358d 100644 Binary files a/Settings/InAppSettings.bundle/ar.lproj/Audio.strings and b/Settings/InAppSettings.bundle/ar.lproj/Audio.strings differ diff --git a/Settings/InAppSettings.bundle/ar.lproj/Call.strings b/Settings/InAppSettings.bundle/ar.lproj/Call.strings index 84718d8aa..38e1bd90d 100644 Binary files a/Settings/InAppSettings.bundle/ar.lproj/Call.strings and b/Settings/InAppSettings.bundle/ar.lproj/Call.strings differ diff --git a/Settings/InAppSettings.bundle/ar.lproj/Root.strings b/Settings/InAppSettings.bundle/ar.lproj/Root.strings index 4ccc20f65..e8f29b405 100644 Binary files a/Settings/InAppSettings.bundle/ar.lproj/Root.strings and b/Settings/InAppSettings.bundle/ar.lproj/Root.strings differ diff --git a/Settings/InAppSettings.bundle/ar.lproj/Video.strings b/Settings/InAppSettings.bundle/ar.lproj/Video.strings index 26e7a1a97..19bfcdd39 100644 Binary files a/Settings/InAppSettings.bundle/ar.lproj/Video.strings and b/Settings/InAppSettings.bundle/ar.lproj/Video.strings differ diff --git a/Settings/InAppSettings.bundle/de.lproj/Advanced.strings b/Settings/InAppSettings.bundle/de.lproj/Advanced.strings index ca5cd2cfb..aa724cfdd 100644 Binary files a/Settings/InAppSettings.bundle/de.lproj/Advanced.strings and b/Settings/InAppSettings.bundle/de.lproj/Advanced.strings differ diff --git a/Settings/InAppSettings.bundle/de.lproj/Audio.strings b/Settings/InAppSettings.bundle/de.lproj/Audio.strings new file mode 100644 index 000000000..e9c2a5512 Binary files /dev/null and b/Settings/InAppSettings.bundle/de.lproj/Audio.strings differ diff --git a/Settings/InAppSettings.bundle/de.lproj/Call.strings b/Settings/InAppSettings.bundle/de.lproj/Call.strings new file mode 100644 index 000000000..8597ac972 Binary files /dev/null and b/Settings/InAppSettings.bundle/de.lproj/Call.strings differ diff --git a/Settings/InAppSettings.bundle/de.lproj/Network.strings b/Settings/InAppSettings.bundle/de.lproj/Network.strings index cb18d9969..987d15c85 100644 Binary files a/Settings/InAppSettings.bundle/de.lproj/Network.strings and b/Settings/InAppSettings.bundle/de.lproj/Network.strings differ diff --git a/Settings/InAppSettings.bundle/de.lproj/Root.strings b/Settings/InAppSettings.bundle/de.lproj/Root.strings index d18e076dc..41d2a5e00 100644 Binary files a/Settings/InAppSettings.bundle/de.lproj/Root.strings and b/Settings/InAppSettings.bundle/de.lproj/Root.strings differ diff --git a/Settings/InAppSettings.bundle/de.lproj/Tunnel.strings b/Settings/InAppSettings.bundle/de.lproj/Tunnel.strings index 91c6ad49d..4ff7fc16b 100644 Binary files a/Settings/InAppSettings.bundle/de.lproj/Tunnel.strings and b/Settings/InAppSettings.bundle/de.lproj/Tunnel.strings differ diff --git a/Settings/InAppSettings.bundle/de.lproj/Video.strings b/Settings/InAppSettings.bundle/de.lproj/Video.strings new file mode 100644 index 000000000..3ff7eacd3 Binary files /dev/null and b/Settings/InAppSettings.bundle/de.lproj/Video.strings differ diff --git a/Settings/InAppSettings.bundle/en.lproj/Audio.strings b/Settings/InAppSettings.bundle/en.lproj/Audio.strings index 675c25120..3bf01c791 100644 --- a/Settings/InAppSettings.bundle/en.lproj/Audio.strings +++ b/Settings/InAppSettings.bundle/en.lproj/Audio.strings @@ -1,19 +1,19 @@ "Codecs" = "Codecs"; -"Speex 16Khz" = "Speex 16Khz"; -"Speex 8Khz" = "Speex 8Khz"; +"Speex 16kHz" = "Speex 16kHz"; +"Speex 8kHz" = "Speex 8kHz"; "Opus 48kHz" = "Opus 48kHz"; -"Silk 24Khz" = "Silk 24Khz"; -"Silk 16Khz" = "Silk 16Khz"; +"Silk 24kHz" = "Silk 24kHz"; +"Silk 16kHz" = "Silk 16kHz"; "AAC-ELD 16kHz" = "AAC-ELD 16kHz"; "AAC-ELD 22kHz" = "AAC-ELD 22kHz"; "AAC-ELD 32kHz" = "AAC-ELD 32kHz"; "AAC-ELD 44kHz" = "AAC-ELD 44kHz"; "AAC-ELD 48kHz" = "AAC-ELD 48kHz"; "AMR" = "AMR"; -"G722" = "G722"; -"G729" = "G729"; +"G.722" = "G.722"; +"G.729" = "G.729"; "GSM" = "GSM"; -"ILBC" = "ILBC"; +"iLBC" = "iLBC"; "PCMU" = "PCMU"; "PCMA" = "PCMA"; "Advanced" = "Advanced"; diff --git a/Settings/InAppSettings.bundle/en.lproj/Call.strings b/Settings/InAppSettings.bundle/en.lproj/Call.strings index a56e6ea0c..20d54ef56 100644 --- a/Settings/InAppSettings.bundle/en.lproj/Call.strings +++ b/Settings/InAppSettings.bundle/en.lproj/Call.strings @@ -1,5 +1,5 @@ "Prefix" = "Prefix"; -"Substitue + by 00" = "Substitue + by 00"; +"Substitute + by 00" = "Substitute + by 00"; "Send inband DTMFs" = "Send inband DTMFs"; "Send SIP INFO DTMFs" = "Send SIP INFO DTMFs"; "Incoming call timeout" = "Incoming call timeout"; diff --git a/Settings/InAppSettings.bundle/en.lproj/Root.strings b/Settings/InAppSettings.bundle/en.lproj/Root.strings index 317149125..a4f199b92 100644 --- a/Settings/InAppSettings.bundle/en.lproj/Root.strings +++ b/Settings/InAppSettings.bundle/en.lproj/Root.strings @@ -18,6 +18,7 @@ "Network" = "Network"; "Tunnel" = "Tunnel"; "Advanced" = "Advanced"; +"Extra features" = "Extra features"; "Development debug actions" = "Development debug actions"; "About" = "About"; "Quit" = "Quit"; diff --git a/Settings/InAppSettings.bundle/en.lproj/Video.strings b/Settings/InAppSettings.bundle/en.lproj/Video.strings index 675d4dc4f..598678c4c 100644 --- a/Settings/InAppSettings.bundle/en.lproj/Video.strings +++ b/Settings/InAppSettings.bundle/en.lproj/Video.strings @@ -4,6 +4,6 @@ "Show preview" = "Show preview"; "Preferred video size" = "Preferred video size"; "Codecs" = "Codecs"; -"mpeg4" = "mpeg4"; -"h264" = "h264"; +"MPEG-4" = "MPEG-4"; +"H.264" = "H.264"; "VP8" = "VP8"; diff --git a/Settings/InAppSettings.bundle/fr.lproj/Audio.strings b/Settings/InAppSettings.bundle/fr.lproj/Audio.strings index 9b6dadd5e..9bb1b7819 100644 Binary files a/Settings/InAppSettings.bundle/fr.lproj/Audio.strings and b/Settings/InAppSettings.bundle/fr.lproj/Audio.strings differ diff --git a/Settings/InAppSettings.bundle/fr.lproj/Call.strings b/Settings/InAppSettings.bundle/fr.lproj/Call.strings index 1468d2715..2ca653c3c 100644 Binary files a/Settings/InAppSettings.bundle/fr.lproj/Call.strings and b/Settings/InAppSettings.bundle/fr.lproj/Call.strings differ diff --git a/Settings/InAppSettings.bundle/fr.lproj/Root.strings b/Settings/InAppSettings.bundle/fr.lproj/Root.strings index 54f984e9f..8ca735725 100644 Binary files a/Settings/InAppSettings.bundle/fr.lproj/Root.strings and b/Settings/InAppSettings.bundle/fr.lproj/Root.strings differ diff --git a/Settings/InAppSettings.bundle/fr.lproj/Video.strings b/Settings/InAppSettings.bundle/fr.lproj/Video.strings index c6fabea20..d7b6da9ab 100644 Binary files a/Settings/InAppSettings.bundle/fr.lproj/Video.strings and b/Settings/InAppSettings.bundle/fr.lproj/Video.strings differ diff --git a/Settings/InAppSettings.bundle/ja.lproj/Audio.strings b/Settings/InAppSettings.bundle/ja.lproj/Audio.strings new file mode 100644 index 000000000..8dc312533 Binary files /dev/null and b/Settings/InAppSettings.bundle/ja.lproj/Audio.strings differ diff --git a/Settings/InAppSettings.bundle/ja.lproj/Root.strings b/Settings/InAppSettings.bundle/ja.lproj/Root.strings index 98079add0..08ed64e65 100644 Binary files a/Settings/InAppSettings.bundle/ja.lproj/Root.strings and b/Settings/InAppSettings.bundle/ja.lproj/Root.strings differ diff --git a/Settings/InAppSettings.bundle/ja.lproj/Video.strings b/Settings/InAppSettings.bundle/ja.lproj/Video.strings new file mode 100644 index 000000000..bb336f09c Binary files /dev/null and b/Settings/InAppSettings.bundle/ja.lproj/Video.strings differ diff --git a/Settings/InAppSettings.bundle/nl.lproj/Audio.strings b/Settings/InAppSettings.bundle/nl.lproj/Audio.strings new file mode 100644 index 000000000..8dc312533 Binary files /dev/null and b/Settings/InAppSettings.bundle/nl.lproj/Audio.strings differ diff --git a/Settings/InAppSettings.bundle/nl.lproj/Call.strings b/Settings/InAppSettings.bundle/nl.lproj/Call.strings new file mode 100644 index 000000000..779209858 Binary files /dev/null and b/Settings/InAppSettings.bundle/nl.lproj/Call.strings differ diff --git a/Settings/InAppSettings.bundle/nl.lproj/Root.strings b/Settings/InAppSettings.bundle/nl.lproj/Root.strings index ed3cb3911..a2f24cb67 100644 Binary files a/Settings/InAppSettings.bundle/nl.lproj/Root.strings and b/Settings/InAppSettings.bundle/nl.lproj/Root.strings differ diff --git a/Settings/InAppSettings.bundle/nl.lproj/Video.strings b/Settings/InAppSettings.bundle/nl.lproj/Video.strings new file mode 100644 index 000000000..bb336f09c Binary files /dev/null and b/Settings/InAppSettings.bundle/nl.lproj/Video.strings differ diff --git a/Settings/InAppSettings.bundle/ru.lproj/Audio.strings b/Settings/InAppSettings.bundle/ru.lproj/Audio.strings index a73f1679d..cbe619ed6 100644 Binary files a/Settings/InAppSettings.bundle/ru.lproj/Audio.strings and b/Settings/InAppSettings.bundle/ru.lproj/Audio.strings differ diff --git a/Settings/InAppSettings.bundle/ru.lproj/Call.strings b/Settings/InAppSettings.bundle/ru.lproj/Call.strings index ea8681e46..48bffaded 100644 Binary files a/Settings/InAppSettings.bundle/ru.lproj/Call.strings and b/Settings/InAppSettings.bundle/ru.lproj/Call.strings differ diff --git a/Settings/InAppSettings.bundle/ru.lproj/Root.strings b/Settings/InAppSettings.bundle/ru.lproj/Root.strings index 5fa091180..81e404f9c 100644 Binary files a/Settings/InAppSettings.bundle/ru.lproj/Root.strings and b/Settings/InAppSettings.bundle/ru.lproj/Root.strings differ diff --git a/Settings/InAppSettings.bundle/ru.lproj/Video.strings b/Settings/InAppSettings.bundle/ru.lproj/Video.strings index efffa34fb..645f88014 100644 Binary files a/Settings/InAppSettings.bundle/ru.lproj/Video.strings and b/Settings/InAppSettings.bundle/ru.lproj/Video.strings differ diff --git a/Settings/InAppSettings.bundle/zh_TW.lproj/Advanced.strings b/Settings/InAppSettings.bundle/zh_TW.lproj/Advanced.strings new file mode 100644 index 000000000..ce4023744 Binary files /dev/null and b/Settings/InAppSettings.bundle/zh_TW.lproj/Advanced.strings differ diff --git a/Settings/InAppSettings.bundle/zh_TW.lproj/Audio.strings b/Settings/InAppSettings.bundle/zh_TW.lproj/Audio.strings new file mode 100644 index 000000000..8dc312533 Binary files /dev/null and b/Settings/InAppSettings.bundle/zh_TW.lproj/Audio.strings differ diff --git a/Settings/InAppSettings.bundle/zh_TW.lproj/Root.strings b/Settings/InAppSettings.bundle/zh_TW.lproj/Root.strings index d23b62fb8..602fdf1a3 100644 Binary files a/Settings/InAppSettings.bundle/zh_TW.lproj/Root.strings and b/Settings/InAppSettings.bundle/zh_TW.lproj/Root.strings differ diff --git a/Settings/InAppSettings.bundle/zh_TW.lproj/Video.strings b/Settings/InAppSettings.bundle/zh_TW.lproj/Video.strings new file mode 100644 index 000000000..bb336f09c Binary files /dev/null and b/Settings/InAppSettings.bundle/zh_TW.lproj/Video.strings differ diff --git a/Tools/imgur_upload.sh b/Tools/imgur_upload.sh index 1df935021..541d22b62 100755 --- a/Tools/imgur_upload.sh +++ b/Tools/imgur_upload.sh @@ -1,39 +1,39 @@ -#!/usr/bin/env bash +#!/bin/bash -x # Install underscore-cli for hacking if ! which underscore &> /dev/null; then - npm install -g underscore-cli + npm install -g underscore-cli fi cd Screens -# Prepare location to collect delete commands -if test "$TRAVIS_BUILD_NUMBER" = ""; then - TRAVIS_BUILD_NUMBER="dev" -fi -output_dir="Screens" -download_cmds="" +if "*.png" 2>/dev/null; then + # Prepare location to collect delete commands + if test "$TRAVIS_BUILD_NUMBER" = ""; then + TRAVIS_BUILD_NUMBER="dev" + fi + output_dir="Screens" + download_cmds="" -# curl from http://imgur.com/tools/imgurbash.sh via http://imgur.com/tools -# Documentation: http://code.google.com/p/imgur-api/source/browse/wiki/ImageUploading.wiki?r=82 -api_key=$IMGUR_KEY -oIFS=$IFS -IFS=$'\n' -for filepath in $(find . -name '*.png'); do -# echo "File $filepath" -# echo "Command: curl https://api.imgur.com/3/upload.json -H \"Authorization: Client-ID $api_key\" -F "image=@\"$filepath\""" - result="$(curl https://api.imgur.com/3/upload.json -H "Authorization: Client-ID $api_key" -F "image=@\"$filepath\"" )" - # result='{"rsp":{"stat":"ok","image":{"image_hash":"dKZ0YK9","delete_hash":"r0MsZp11K9vawLf","original_image":"http:\/\/i.imgur.com\/dKZ0YK9.png","large_thumbnail":"http:\/\/i.imgur.com\/dKZ0YK9l.jpg","small_thumbnail":"http:\/\/i.imgur.com\/dKZ0YK9s.jpg","imgur_page":"http:\/\/imgur.com\/dKZ0YK9","delete_page":"http:\/\/imgur.com\/delete\/r0MsZp11K9vawLf"}}}' - lol="$(echo $result | underscore extract success)" - if test $lol != "true"; then - echo "There was a problem uploading \"$filepath\"" 1>&2 - echo "$result" 1>&2 - else - download_cmds="${download_cmds}wget $(echo "$result" | underscore extract 'data.link')\n" - fi -done -IFS=$oIFS -echo "All uploads complete!" -echo "" -echo "Download via:" -echo -e " $download_cmds" + # curl from http://imgur.com/tools/imgurbash.sh via http://imgur.com/tools + # Documentation: http://code.google.com/p/imgur-api/source/browse/wiki/ImageUploading.wiki?r=82 + api_key=$IMGUR_KEY + for filepath in *.png; do + # echo "File $filepath" + # echo "Command: curl https://api.imgur.com/3/upload.json -H \"Authorization: Client-ID $api_key\" -F "image=@\"$filepath\""" + result="$(curl https://api.imgur.com/3/upload.json -H "Authorization: Client-ID $api_key" -F "image=@\"$filepath\"" )" + + # result='{"rsp":{"stat":"ok","image":{"image_hash":"dKZ0YK9","delete_hash":"r0MsZp11K9vawLf","original_image":"http:\/\/i.imgur.com\/dKZ0YK9.png","large_thumbnail":"http:\/\/i.imgur.com\/dKZ0YK9l.jpg","small_thumbnail":"http:\/\/i.imgur.com\/dKZ0YK9s.jpg","imgur_page":"http:\/\/imgur.com\/dKZ0YK9","delete_page":"http:\/\/imgur.com\/delete\/r0MsZp11K9vawLf"}}}' + succeeded="$(echo $result | underscore extract success)" + if [ "$succeeded" != "true" ]; then + echo "There was a problem uploading \"$filepath\": $result" + else + download_cmds="${download_cmds}wget $(echo "$result" | underscore extract 'data.link')\n" + fi + done + echo "All uploads complete!" + echo "" + echo "Download via: $download_cmds" +else + echo "Could not find any PNG in $PWD, something must be broken!" +fi diff --git a/Tools/tag_missing_resources.sh b/Tools/tag_missing_resources.sh index a568297f8..93a2df735 100755 --- a/Tools/tag_missing_resources.sh +++ b/Tools/tag_missing_resources.sh @@ -47,15 +47,19 @@ already_sync=$(mktemp -t tag_missing_resources) to_sync=$(mktemp -t tag_missing_resources) grep -oE '([^ /"])*.png' ../linphone.xcodeproj/project.pbxproj | sort -u > $already_sync -find ../Resources/ -name *.png -exec basename {} \; | sort -u > $to_sync +find ../Resources/ -not -path '*/Images.xcassets/*' -name '*.png' -exec basename {} \; | sort -u > $to_sync # clean red tags -cd ../Resources && tag -r red $(cat $to_sync $already_sync) && cd - 1>/dev/null +for file in $to_sync $already_sync; do + find ../Resources -name $file -exec tag -r red {} \; +done # 'comm' command output files contained in second file but not in first nor in common non_synced_files=$(comm -13 $already_sync $to_sync) -cd ../Resources/ && tag -a red $non_synced_files && cd - 1>/dev/null +for file in $non_synced_files; do + find ../Resources -name $file -exec tag -a red {} \; +done rm $already_sync $to_sync diff --git a/linphone.xcodeproj/project.pbxproj b/linphone.xcodeproj/project.pbxproj index c92f71bc4..c93638ddd 100755 --- a/linphone.xcodeproj/project.pbxproj +++ b/linphone.xcodeproj/project.pbxproj @@ -126,6 +126,8 @@ 639CEB061A1DF4F1004DE38F /* UIChatRoomCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 639CEB081A1DF4F1004DE38F /* UIChatRoomCell.xib */; }; 639CEB091A1DF4FA004DE38F /* UIChatCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 639CEB0B1A1DF4FA004DE38F /* UIChatCell.xib */; }; 63CD4B4F1A5AAC8C00B84282 /* DTAlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = 63CD4B4E1A5AAC8C00B84282 /* DTAlertView.m */; }; + 63D2680F1B174A5E00A2CC11 /* numpad_one_voicemail_default.png in Resources */ = {isa = PBXBuildFile; fileRef = 63D2680D1B174A5E00A2CC11 /* numpad_one_voicemail_default.png */; }; + 63D268101B174A5E00A2CC11 /* numpad_one_voicemail_over.png in Resources */ = {isa = PBXBuildFile; fileRef = 63D2680E1B174A5E00A2CC11 /* numpad_one_voicemail_over.png */; }; 63E59A3F1ADE70D900646FB3 /* InAppProductsManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 63E59A3E1ADE70D900646FB3 /* InAppProductsManager.m */; }; 63FB30351A680E73008CA393 /* UIRoundedImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 63FB30341A680E73008CA393 /* UIRoundedImageView.m */; }; 70571E1A13FABCB000CDD3C2 /* rootca.pem in Resources */ = {isa = PBXBuildFile; fileRef = 70571E1913FABCB000CDD3C2 /* rootca.pem */; }; @@ -1045,6 +1047,8 @@ 639CEB0D1A1DF52C004DE38F /* ru */ = {isa = PBXFileReference; fileEncoding = 2483028224; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/UICallCell.strings; sourceTree = ""; }; 63CD4B4D1A5AAC8C00B84282 /* DTAlertView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DTAlertView.h; sourceTree = ""; }; 63CD4B4E1A5AAC8C00B84282 /* DTAlertView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DTAlertView.m; sourceTree = ""; }; + 63D2680D1B174A5E00A2CC11 /* numpad_one_voicemail_default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = numpad_one_voicemail_default.png; path = Resources/numpad_one_voicemail_default.png; sourceTree = ""; }; + 63D2680E1B174A5E00A2CC11 /* numpad_one_voicemail_over.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = numpad_one_voicemail_over.png; path = Resources/numpad_one_voicemail_over.png; sourceTree = ""; }; 63E59A3D1ADE6ECB00646FB3 /* InAppProductsManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InAppProductsManager.h; sourceTree = ""; }; 63E59A3E1ADE70D900646FB3 /* InAppProductsManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InAppProductsManager.m; sourceTree = ""; }; 63EF7FDC1A24B5810017A416 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/AboutViewController.strings; sourceTree = ""; }; @@ -2806,6 +2810,8 @@ D3F83F3F1582223B00336684 /* numpad_nine_over.png */, D3F83F2E1582223B00336684 /* numpad_one_default.png */, D3F83F2F1582223B00336684 /* numpad_one_over.png */, + 63D2680D1B174A5E00A2CC11 /* numpad_one_voicemail_default.png */, + 63D2680E1B174A5E00A2CC11 /* numpad_one_voicemail_over.png */, D3F83F3A1582223B00336684 /* numpad_seven_default.png */, D3F83F3B1582223B00336684 /* numpad_seven_over.png */, D3F83F401582223B00336684 /* numpad_sharp_default.png */, @@ -3328,6 +3334,7 @@ 70571E1A13FABCB000CDD3C2 /* rootca.pem in Resources */, D347347E1580E5F8003C7B8C /* history_default.png in Resources */, D347347F1580E5F8003C7B8C /* history_selected.png in Resources */, + 63D268101B174A5E00A2CC11 /* numpad_one_voicemail_over.png in Resources */, D38327F31580FE3A00FA0D23 /* contacts_default.png in Resources */, D38327F41580FE3A00FA0D23 /* contacts_selected.png in Resources */, D38327F51580FE3A00FA0D23 /* dialer_default.png in Resources */, @@ -3528,6 +3535,7 @@ 639CEB061A1DF4F1004DE38F /* UIChatRoomCell.xib in Resources */, D3A8BB7B15A6CC3200F96BE5 /* chat_bubble_outgoing.png in Resources */, D3A8BB7D15A6CC3200F96BE5 /* chat_bubble_incoming.png in Resources */, + 63D2680F1B174A5E00A2CC11 /* numpad_one_voicemail_default.png in Resources */, F0C1F9101A28781F009402C9 /* corner-left-bottom.png in Resources */, D3A8BB7F15A6CC3200F96BE5 /* setup_back_disabled.png in Resources */, D3A8BB8115A6CC3200F96BE5 /* setup_cancel_disabled.png in Resources */, diff --git a/submodules/belle-sip b/submodules/belle-sip index 97bdfd1f5..1ffd89057 160000 --- a/submodules/belle-sip +++ b/submodules/belle-sip @@ -1 +1 @@ -Subproject commit 97bdfd1f51c441c441e713de8c1d50cd037cda5d +Subproject commit 1ffd890571879bba9a58251dfe7dd5249c011517