From 565cb66ec55def8122827cfa1dec7b7cfaa1d802 Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Wed, 14 Oct 2015 14:21:43 +0200 Subject: [PATCH 01/19] Settings: fix crash when adding an account without assistant --- Classes/LinphoneCoreSettingsStore.m | 3 +-- Classes/Utils/FastAddressBook.m | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Classes/LinphoneCoreSettingsStore.m b/Classes/LinphoneCoreSettingsStore.m index 451dbefb4..0aae9d65b 100644 --- a/Classes/LinphoneCoreSettingsStore.m +++ b/Classes/LinphoneCoreSettingsStore.m @@ -519,8 +519,6 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args); // was a new proxy config, add it linphone_core_add_proxy_config(lc, proxyCfg); linphone_core_set_default_proxy_config(lc, proxyCfg); - // reload address book to prepend proxy config domain to contacts' phone number - [[[LinphoneManager instance] fastAddressBook] reload]; } bad_proxy: @@ -545,6 +543,7 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args); otherButtonTitles:nil] show]; } } + // reload address book to prepend proxy config domain to contacts' phone number [[[LinphoneManager instance] fastAddressBook] reload]; } diff --git a/Classes/Utils/FastAddressBook.m b/Classes/Utils/FastAddressBook.m index fc4694d45..f9b88bd8b 100644 --- a/Classes/Utils/FastAddressBook.m +++ b/Classes/Utils/FastAddressBook.m @@ -183,8 +183,8 @@ static void sync_address_book(ABAddressBookRef addressBook, CFDictionaryRef info } - (void)loadData { - ABAddressBookRevert(addressBook); @synchronized(addressBookMap) { + ABAddressBookRevert(addressBook); [addressBookMap removeAllObjects]; CFArrayRef lContacts = ABAddressBookCopyArrayOfAllPeople(addressBook); From 197cb77f8695a09977655181b4ffdd9ac187e43f Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Thu, 15 Oct 2015 11:48:25 +0200 Subject: [PATCH 02/19] update belle-sip and linphone (fix webrtc interop issue) --- submodules/belle-sip | 2 +- submodules/linphone | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/submodules/belle-sip b/submodules/belle-sip index 0efd4dfd5..1ced63785 160000 --- a/submodules/belle-sip +++ b/submodules/belle-sip @@ -1 +1 @@ -Subproject commit 0efd4dfd5b37fb28ba1ecbabcc8d37defddfd517 +Subproject commit 1ced637855bb052f2475847c867f648338b84376 diff --git a/submodules/linphone b/submodules/linphone index 4e3ea86c9..6ebb90ffb 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit 4e3ea86c90cf125f1348dc4f296540d1696e5851 +Subproject commit 6ebb90ffbed731c57fc8c9193ab97350cb89ec41 From ede21a9acae764da9c244dbc0c534109897afbf9 Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Thu, 15 Oct 2015 12:14:00 +0200 Subject: [PATCH 03/19] xcode: bump version --- linphone-Info.plist | 4 ++-- .../xcshareddata/xcschemes/linphone.xcscheme | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/linphone-Info.plist b/linphone-Info.plist index fb0c22ce2..24982b408 100644 --- a/linphone-Info.plist +++ b/linphone-Info.plist @@ -24,7 +24,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 3.8.5 + 3.8.6 CFBundleURLTypes @@ -53,7 +53,7 @@ CFBundleVersion - 2.4 + 2.4.1 LSRequiresIPhoneOS UIApplicationExitsOnSuspend diff --git a/linphone.xcodeproj/xcshareddata/xcschemes/linphone.xcscheme b/linphone.xcodeproj/xcshareddata/xcschemes/linphone.xcscheme index 9781b8192..97800868c 100644 --- a/linphone.xcodeproj/xcshareddata/xcschemes/linphone.xcscheme +++ b/linphone.xcodeproj/xcshareddata/xcschemes/linphone.xcscheme @@ -1,7 +1,7 @@ + version = "1.8"> @@ -37,10 +37,10 @@ + shouldUseLaunchSchemeArgsEnv = "YES" + buildConfiguration = "Debug"> @@ -66,11 +66,11 @@ From d48213741ad8b52ff7169a148df9fa99b58b9890 Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Fri, 16 Oct 2015 10:44:00 +0200 Subject: [PATCH 04/19] ChatRoom: avoid potential misposition of chatbubble when sending text --- Classes/ChatRoomViewController.m | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Classes/ChatRoomViewController.m b/Classes/ChatRoomViewController.m index 452e5392a..f24e58882 100644 --- a/Classes/ChatRoomViewController.m +++ b/Classes/ChatRoomViewController.m @@ -283,11 +283,10 @@ static void message_status(LinphoneChatMessage *msg, LinphoneChatMessageState st [LinphoneManager setValueInMessageAppData:[internalUrl absoluteString] forKey:@"localimage" inMessage:msg]; } + linphone_chat_room_send_message2(chatRoom, msg, message_status, (__bridge void *)(self)); [tableController addChatEntry:msg]; [tableController scrollToBottom:true]; - linphone_chat_room_send_message2(chatRoom, msg, message_status, (__bridge void *)(self)); - return TRUE; } From a1d534fd36a761083c81edbd4fe98c03da835cef Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Fri, 16 Oct 2015 11:09:03 +0200 Subject: [PATCH 05/19] Utils.m: properly handle UTF8 logging --- Classes/Utils/Utils.m | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Classes/Utils/Utils.m b/Classes/Utils/Utils.m index 06ba6f344..8b857cf36 100644 --- a/Classes/Utils/Utils.m +++ b/Classes/Utils/Utils.m @@ -28,15 +28,17 @@ va_list args; va_start(args, format); NSString *str = [[NSString alloc] initWithFormat:format arguments:args]; + NSStringEncoding enc = CFStringConvertEncodingToNSStringEncoding(CFStringGetSystemEncoding()); + const char *utf8str = [str cStringUsingEncoding:enc]; int filesize = 20; const char *filename = strchr(file, '/') ? strrchr(file, '/') + 1 : file; if (severity <= ORTP_DEBUG) { // lol: ortp_debug(XXX) can be disabled at compile time, but ortp_log(ORTP_DEBUG, xxx) will always be valid even // not in debug build... - ortp_debug("%*s:%3d - %s", filesize, filename + MAX((int)strlen(filename) - filesize, 0), line, str.UTF8String); + ortp_debug("%*s:%3d - %s", filesize, filename + MAX((int)strlen(filename) - filesize, 0), line, utf8str); } else { ortp_log(severity, "%*s:%3d - %s", filesize, filename + MAX((int)strlen(filename) - filesize, 0), line, - str.UTF8String); + utf8str); } va_end(args); } From b2810ed06339becaa764cb9455a3c47149048251 Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Fri, 16 Oct 2015 15:22:13 +0200 Subject: [PATCH 06/19] UTF8: fix potential crash when contacts had invalid characters --- Classes/ContactDetailsViewController.m | 3 +- Classes/LinphoneCoreSettingsStore.m | 24 ++++----- Classes/LinphoneManager.m | 67 ++++++++------------------ Classes/Utils/Utils.m | 3 +- Classes/WizardViewController.m | 14 +++--- 5 files changed, 39 insertions(+), 72 deletions(-) diff --git a/Classes/ContactDetailsViewController.m b/Classes/ContactDetailsViewController.m index f87ed3cb7..7d03e6b0f 100644 --- a/Classes/ContactDetailsViewController.m +++ b/Classes/ContactDetailsViewController.m @@ -149,8 +149,7 @@ static void sync_address_book(ABAddressBookRef addressBook, CFDictionaryRef info - (void)addCurrentContactContactField:(NSString *)address { - LinphoneAddress *linphoneAddress = - linphone_address_new([address cStringUsingEncoding:[NSString defaultCStringEncoding]]); + LinphoneAddress *linphoneAddress = linphone_address_new(address.UTF8String); NSString *username = [NSString stringWithUTF8String:linphone_address_get_username(linphoneAddress)]; if (([username rangeOfString:@"@"].length > 0) && diff --git a/Classes/LinphoneCoreSettingsStore.m b/Classes/LinphoneCoreSettingsStore.m index 0aae9d65b..67b91cf22 100644 --- a/Classes/LinphoneCoreSettingsStore.m +++ b/Classes/LinphoneCoreSettingsStore.m @@ -416,7 +416,7 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args); proxyAddress = [NSString stringWithFormat:@"sip:%@", proxyAddress]; } - char *proxy = ms_strdup([proxyAddress cStringUsingEncoding:[NSString defaultCStringEncoding]]); + char *proxy = ms_strdup(proxyAddress.UTF8String); LinphoneAddress *proxy_addr = linphone_address_new(proxy); if (proxy_addr) { @@ -442,15 +442,14 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args); char normalizedUserName[256]; LinphoneAddress *linphoneAddress = linphone_address_new("sip:user@domain.com"); - linphone_proxy_config_normalize_number(proxyCfg, - [username cStringUsingEncoding:[NSString defaultCStringEncoding]], - normalizedUserName, sizeof(normalizedUserName)); + linphone_proxy_config_normalize_number(proxyCfg, username.UTF8String, normalizedUserName, + sizeof(normalizedUserName)); linphone_address_set_username(linphoneAddress, normalizedUserName); - linphone_address_set_domain(linphoneAddress, [domain cStringUsingEncoding:[NSString defaultCStringEncoding]]); + linphone_address_set_domain(linphoneAddress, [domain UTF8String]); const char *identity = linphone_address_as_string_uri_only(linphoneAddress); - const char *password = [accountPassword cStringUsingEncoding:[NSString defaultCStringEncoding]]; - const char *ha1 = [accountHa1 cStringUsingEncoding:[NSString defaultCStringEncoding]]; + const char *password = [accountPassword UTF8String]; + const char *ha1 = [accountHa1 UTF8String]; if (linphone_proxy_config_set_identity(proxyCfg, identity) == -1) { error = NSLocalizedString(@"Invalid username or domain", nil); @@ -468,8 +467,7 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args); } if ([prefix length] > 0) { - linphone_proxy_config_set_dial_prefix(proxyCfg, - [prefix cStringUsingEncoding:[NSString defaultCStringEncoding]]); + linphone_proxy_config_set_dial_prefix(proxyCfg, [prefix UTF8String]); } if ([self objectForKey:@"substitute_+_by_00_preference"]) { @@ -744,8 +742,7 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args); } else if ([lTunnelPrefMode isEqualToString:@"auto"]) { mode = tunnel_auto; } else { - LOGE(@"Unexpected tunnel mode [%s]", - [lTunnelPrefMode cStringUsingEncoding:[NSString defaultCStringEncoding]]); + LOGE(@"Unexpected tunnel mode [%s]", [lTunnelPrefMode UTF8String]); } } @@ -779,9 +776,8 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args); NSString *username = [self stringForKey:@"primary_username_preference"]; LinphoneAddress *parsed = linphone_core_get_primary_contact_parsed(lc); if (parsed != NULL) { - linphone_address_set_display_name(parsed, - [displayname cStringUsingEncoding:[NSString defaultCStringEncoding]]); - linphone_address_set_username(parsed, [username cStringUsingEncoding:[NSString defaultCStringEncoding]]); + linphone_address_set_display_name(parsed, [displayname UTF8String]); + linphone_address_set_username(parsed, [username UTF8String]); char *contact = linphone_address_as_string(parsed); linphone_core_set_primary_contact(lc, contact); ms_free(contact); diff --git a/Classes/LinphoneManager.m b/Classes/LinphoneManager.m index 67489abd7..0376b561f 100644 --- a/Classes/LinphoneManager.m +++ b/Classes/LinphoneManager.m @@ -495,8 +495,7 @@ exit_dbmigration: NSString *chatDBFileName = [LinphoneManager documentFile:kLinphoneInternalChatDBFilename]; if ([self migrateChatDBIfNeeded:theLinphoneCore]) { // if a migration was performed, we should reinitialize the chat database - linphone_core_set_chat_database_path(theLinphoneCore, - [chatDBFileName cStringUsingEncoding:[NSString defaultCStringEncoding]]); + linphone_core_set_chat_database_path(theLinphoneCore, [chatDBFileName UTF8String]); } /* AVPF migration */ @@ -797,6 +796,7 @@ static void linphone_iphone_display_status(struct _LinphoneCore *lc, const char @"state" : [NSNumber numberWithInt:state], @"message" : [NSString stringWithUTF8String:message] }; + LOGI(@"Call %p changed to state %s: %s", call, linphone_call_state_to_string(state), message); [[NSNotificationCenter defaultCenter] postNotificationName:kLinphoneCallUpdate object:self userInfo:dict]; } @@ -960,8 +960,7 @@ static void linphone_iphone_popup_password_request(LinphoneCore *lc, const char address = [FastAddressBook getContactDisplayName:contact]; } else { if ([[LinphoneManager instance] lpConfigBoolForKey:@"show_contacts_emails_preference"] == true) { - LinphoneAddress *linphoneAddress = - linphone_address_new([address cStringUsingEncoding:[NSString defaultCStringEncoding]]); + LinphoneAddress *linphoneAddress = linphone_address_new([address UTF8String]); address = [NSString stringWithUTF8String:linphone_address_get_username(linphoneAddress)]; linphone_address_destroy(linphoneAddress); } @@ -1338,8 +1337,7 @@ static LinphoneCoreVTable linphonec_vtable = {.show = NULL, // get default config from bundle NSString *zrtpSecretsFileName = [LinphoneManager documentFile:@"zrtp_secrets"]; NSString *chatDBFileName = [LinphoneManager documentFile:kLinphoneInternalChatDBFilename]; - const char *lRootCa = - [[LinphoneManager bundleFile:@"rootca.pem"] cStringUsingEncoding:[NSString defaultCStringEncoding]]; + const char *lRootCa = [[LinphoneManager bundleFile:@"rootca.pem"] UTF8String]; NSString *device = [NSString stringWithFormat:@"%@_%@_iOS%@", [NSBundle.mainBundle objectForInfoDictionaryKey:@"CFBundleDisplayName"], @@ -1354,20 +1352,15 @@ static LinphoneCoreVTable linphonec_vtable = {.show = NULL, linphone_core_set_root_ca(theLinphoneCore, lRootCa); // Set audio assets - const char *lRing = - [[LinphoneManager bundleFile:@"ring.wav"] cStringUsingEncoding:[NSString defaultCStringEncoding]]; + const char *lRing = [[LinphoneManager bundleFile:@"ring.wav"] UTF8String]; linphone_core_set_ring(theLinphoneCore, lRing); - const char *lRingBack = - [[LinphoneManager bundleFile:@"ringback.wav"] cStringUsingEncoding:[NSString defaultCStringEncoding]]; + const char *lRingBack = [[LinphoneManager bundleFile:@"ringback.wav"] UTF8String]; linphone_core_set_ringback(theLinphoneCore, lRingBack); - const char *lPlay = - [[LinphoneManager bundleFile:@"hold.wav"] cStringUsingEncoding:[NSString defaultCStringEncoding]]; + const char *lPlay = [[LinphoneManager bundleFile:@"hold.wav"] UTF8String]; linphone_core_set_play_file(theLinphoneCore, lPlay); - linphone_core_set_zrtp_secrets_file(theLinphoneCore, - [zrtpSecretsFileName cStringUsingEncoding:[NSString defaultCStringEncoding]]); - linphone_core_set_chat_database_path(theLinphoneCore, - [chatDBFileName cStringUsingEncoding:[NSString defaultCStringEncoding]]); + linphone_core_set_zrtp_secrets_file(theLinphoneCore, [zrtpSecretsFileName UTF8String]); + linphone_core_set_chat_database_path(theLinphoneCore, [chatDBFileName UTF8String]); [self migrationLinphoneSettings]; @@ -1375,7 +1368,7 @@ static LinphoneCoreVTable linphonec_vtable = {.show = NULL, NSString *path = [LinphoneManager bundleFile:@"nowebcamCIF.jpg"]; if (path) { - const char *imagePath = [path cStringUsingEncoding:[NSString defaultCStringEncoding]]; + const char *imagePath = [path UTF8String]; LOGI(@"Using '%s' as source image for no webcam", imagePath); linphone_core_set_static_picture(theLinphoneCore, imagePath); } @@ -1403,8 +1396,7 @@ static LinphoneCoreVTable linphonec_vtable = {.show = NULL, linphone_core_enable_video(theLinphoneCore, FALSE, FALSE); } - LOGI(@"Linphone [%s] started on [%s]", linphone_core_get_version(), - [[UIDevice currentDevice].model cStringUsingEncoding:[NSString defaultCStringEncoding]]); + LOGI(@"Linphone [%s] started on [%s]", linphone_core_get_version(), [[UIDevice currentDevice].model UTF8String]); // Post event NSDictionary *dict = [NSDictionary dictionaryWithObject:[NSValue valueWithPointer:theLinphoneCore] forKey:@"core"]; @@ -1482,22 +1474,18 @@ static BOOL libStarted = FALSE; libmswebrtc_init(); // Set audio assets - const char *lRing = - [[LinphoneManager bundleFile:@"ring.wav"] cStringUsingEncoding:[NSString defaultCStringEncoding]]; + const char *lRing = [[LinphoneManager bundleFile:@"ring.wav"] UTF8String]; lp_config_set_string(configDb, "sound", "local_ring", lRing); - const char *lRingBack = - [[LinphoneManager bundleFile:@"ringback.wav"] cStringUsingEncoding:[NSString defaultCStringEncoding]]; + const char *lRingBack = [[LinphoneManager bundleFile:@"ringback.wav"] UTF8String]; lp_config_set_string(configDb, "sound", "ringback_tone", lRingBack); - const char *lPlay = - [[LinphoneManager bundleFile:@"hold.wav"] cStringUsingEncoding:[NSString defaultCStringEncoding]]; + const char *lPlay = [[LinphoneManager bundleFile:@"hold.wav"] UTF8String]; lp_config_set_string(configDb, "sound", "hold_music", lPlay); theLinphoneCore = linphone_core_new_with_config(&linphonec_vtable, configDb, (__bridge void *)(self) /* user_data */); /* set the CA file no matter what, since the remote provisioning could be hitting an HTTPS server */ - const char *lRootCa = - [[LinphoneManager bundleFile:@"rootca.pem"] cStringUsingEncoding:[NSString defaultCStringEncoding]]; + const char *lRootCa = [[LinphoneManager bundleFile:@"rootca.pem"] UTF8String]; linphone_core_set_root_ca(theLinphoneCore, lRootCa); linphone_core_set_user_certificates_path(theLinphoneCore, [[LinphoneManager cacheDirectory] UTF8String]); @@ -1810,8 +1798,7 @@ static int comp_call_state_paused(const LinphoneCall *call, const void *param) { factory = factoryIpad; } NSString *confiFileName = [LinphoneManager documentFile:@"linphonerc"]; - configDb = lp_config_new_with_factory([confiFileName cStringUsingEncoding:[NSString defaultCStringEncoding]], - [factory cStringUsingEncoding:[NSString defaultCStringEncoding]]); + configDb = lp_config_new_with_factory([confiFileName UTF8String], [factory UTF8String]); } #pragma mark - Audio route Functions @@ -1845,7 +1832,7 @@ static void audioRouteChangeListenerCallback(void *inUserData, // 1 OSStatus lStatus = AudioSessionGetProperty(kAudioSessionProperty_AudioRoute, &lNewRouteSize, &lNewRoute); if (!lStatus && lNewRouteSize > 0) { NSString *route = (__bridge NSString *)lNewRoute; - LOGI(@"Current audio route is [%s]", [route cStringUsingEncoding:[NSString defaultCStringEncoding]]); + LOGI(@"Current audio route is [%s]", [route UTF8String]); speakerEnabled = [route isEqualToString:@"Speaker"] || [route isEqualToString:@"SpeakerAndMicrophone"]; if (![LinphoneManager runningOnIpad] && [route isEqualToString:@"HeadsetBT"] && !speakerEnabled) { @@ -1949,18 +1936,7 @@ static void audioRouteChangeListenerCallback(void *inUserData, // 1 // Continue by checking that the provided address is a valid SIP address, abort otherwise. if ([address length] == 0) { // no address provided... nothing to do - } else if (![address canBeConvertedToEncoding:[NSString defaultCStringEncoding]]) { - UIAlertView *error = [[UIAlertView alloc] - initWithTitle:NSLocalizedString(@"Invalid SIP address", nil) - message:NSLocalizedString( - @"Some invalid characters where found in the given SIP address. Please correct it.", - nil) - delegate:nil - cancelButtonTitle:NSLocalizedString(@"Cancel", nil) - otherButtonTitles:nil]; - [error show]; - } else if ((addr = linphone_core_interpret_url( - theLinphoneCore, [address cStringUsingEncoding:[NSString defaultCStringEncoding]])) == NULL) { + } else if ((addr = linphone_core_interpret_url(theLinphoneCore, address.UTF8String)) == NULL) { UIAlertView *error = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Invalid SIP address", nil) message:NSLocalizedString(@"Either configure a SIP proxy server from settings prior to place a " @@ -1979,14 +1955,13 @@ static void audioRouteChangeListenerCallback(void *inUserData, // 1 LOGI(@"Enabling low bandwidth mode"); linphone_call_params_enable_low_bandwidth(lcallParams, YES); } + if (displayName != nil) { - linphone_address_set_display_name(addr, - [displayName cStringUsingEncoding:[NSString defaultCStringEncoding]]); + linphone_address_set_display_name(addr, displayName.UTF8String); } if ([[LinphoneManager instance] lpConfigBoolForKey:@"override_domain_with_default_one"]) { linphone_address_set_domain( - addr, [[[LinphoneManager instance] lpConfigStringForKey:@"domain" forSection:@"wizard"] - cStringUsingEncoding:[NSString defaultCStringEncoding]]); + addr, [[[LinphoneManager instance] lpConfigStringForKey:@"domain" forSection:@"wizard"] UTF8String]); } if (transfer) { diff --git a/Classes/Utils/Utils.m b/Classes/Utils/Utils.m index 8b857cf36..1fe48024a 100644 --- a/Classes/Utils/Utils.m +++ b/Classes/Utils/Utils.m @@ -28,8 +28,7 @@ va_list args; va_start(args, format); NSString *str = [[NSString alloc] initWithFormat:format arguments:args]; - NSStringEncoding enc = CFStringConvertEncodingToNSStringEncoding(CFStringGetSystemEncoding()); - const char *utf8str = [str cStringUsingEncoding:enc]; + const char *utf8str = [str cStringUsingEncoding:NSString.defaultCStringEncoding]; int filesize = 20; const char *filename = strchr(file, '/') ? strrchr(file, '/') + 1 : file; if (severity <= ORTP_DEBUG) { diff --git a/Classes/WizardViewController.m b/Classes/WizardViewController.m index 64d4a24ac..fc6a5efed 100644 --- a/Classes/WizardViewController.m +++ b/Classes/WizardViewController.m @@ -381,8 +381,8 @@ static UICompositeViewDescription *compositeDescription = nil; NSString *server_address = domain; char normalizedUserName[256]; - linphone_proxy_config_normalize_number(proxyCfg, [username cStringUsingEncoding:[NSString defaultCStringEncoding]], - normalizedUserName, sizeof(normalizedUserName)); + linphone_proxy_config_normalize_number(proxyCfg, [username UTF8String], normalizedUserName, + sizeof(normalizedUserName)); const char *identity = linphone_proxy_config_get_identity(proxyCfg); if (!identity || !*identity) @@ -450,8 +450,8 @@ static UICompositeViewDescription *compositeDescription = nil; char normalizedUsername[256]; LinphoneAddress *linphoneAddress = linphone_address_new(addr); - linphone_proxy_config_normalize_number(proxyCfg, [username cStringUsingEncoding:[NSString defaultCStringEncoding]], - normalizedUsername, sizeof(normalizedUsername)); + linphone_proxy_config_normalize_number(proxyCfg, [username UTF8String], normalizedUsername, + sizeof(normalizedUsername)); linphone_address_set_username(linphoneAddress, normalizedUsername); linphone_address_set_domain(linphoneAddress, [domain UTF8String]); @@ -473,8 +473,7 @@ static UICompositeViewDescription *compositeDescription = nil; - (NSString *)identityFromUsername:(NSString *)username { char normalizedUserName[256]; LinphoneAddress *linphoneAddress = linphone_address_new("sip:user@domain.com"); - linphone_proxy_config_normalize_number(NULL, [username cStringUsingEncoding:[NSString defaultCStringEncoding]], - normalizedUserName, sizeof(normalizedUserName)); + linphone_proxy_config_normalize_number(NULL, [username UTF8String], normalizedUserName, sizeof(normalizedUserName)); linphone_address_set_username(linphoneAddress, normalizedUserName); linphone_address_set_domain( linphoneAddress, [[[LinphoneManager instance] lpConfigStringForKey:@"domain" forSection:@"wizard"] UTF8String]); @@ -567,8 +566,7 @@ static UICompositeViewDescription *compositeDescription = nil; - (void)loadWizardConfig:(NSString *)rcFilename { NSString *fullPath = [@"file://" stringByAppendingString:[LinphoneManager bundleFile:rcFilename]]; - linphone_core_set_provisioning_uri([LinphoneManager getLc], - [fullPath cStringUsingEncoding:[NSString defaultCStringEncoding]]); + linphone_core_set_provisioning_uri([LinphoneManager getLc], [fullPath UTF8String]); [[LinphoneManager instance] lpConfigSetInt:1 forKey:@"transient_provisioning" forSection:@"misc"]; [[LinphoneManager instance] resetLinphoneCore]; } From 2b9ba85f283574dee173183eba7638e010611070 Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Mon, 19 Oct 2015 12:09:16 +0200 Subject: [PATCH 07/19] submodules: update belle-sip and linphone to fix crash in contacts parsing when containing unicode characters --- submodules/belle-sip | 2 +- submodules/linphone | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/submodules/belle-sip b/submodules/belle-sip index 1ced63785..611b6c3b1 160000 --- a/submodules/belle-sip +++ b/submodules/belle-sip @@ -1 +1 @@ -Subproject commit 1ced637855bb052f2475847c867f648338b84376 +Subproject commit 611b6c3b1d237dc9fa4113c39c2f5f070235b783 diff --git a/submodules/linphone b/submodules/linphone index 6ebb90ffb..c10bceadc 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit 6ebb90ffbed731c57fc8c9193ab97350cb89ec41 +Subproject commit c10bceadcbe0ab668d07fbb539a435bf9e0ebebe From 22cbaac20bd197728438a56a7afba3cc92ed32fa Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Mon, 19 Oct 2015 12:19:42 +0200 Subject: [PATCH 08/19] i18n: update translations --- Classes/WizardViewController.m | 33 ++++++++++-------- Resources/ar.lproj/Localizable.strings | Bin 32936 -> 32626 bytes Resources/de.lproj/Localizable.strings | Bin 35326 -> 35302 bytes Resources/en.lproj/Localizable.strings | Bin 33748 -> 33068 bytes Resources/fr.lproj/Localizable.strings | Bin 35112 -> 35088 bytes Resources/ja.lproj/Localizable.strings | Bin 29718 -> 29694 bytes Resources/nl.lproj/Localizable.strings | Bin 35016 -> 34992 bytes Resources/ru.lproj/Localizable.strings | Bin 34176 -> 34144 bytes Resources/zh_TW.lproj/Localizable.strings | Bin 33656 -> 33608 bytes .../en.lproj/Root.strings | 1 + 10 files changed, 20 insertions(+), 14 deletions(-) diff --git a/Classes/WizardViewController.m b/Classes/WizardViewController.m index fc6a5efed..e02ca09b8 100644 --- a/Classes/WizardViewController.m +++ b/Classes/WizardViewController.m @@ -411,7 +411,7 @@ static UICompositeViewDescription *compositeDescription = nil; linphone_address_destroy(parsedAddress); UIAlertView *errorView = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Check error(s)", nil) - message:NSLocalizedString(@"Please enter a valid username", nil) + message:NSLocalizedString(@"Please enter a valid username.", nil) delegate:nil cancelButtonTitle:NSLocalizedString(@"Continue", nil) otherButtonTitles:nil, nil]; @@ -701,11 +701,13 @@ static UICompositeViewDescription *compositeDescription = nil; withTransport:(NSString *)transport { NSMutableString *errors = [NSMutableString string]; if ([username length] == 0) { - [errors appendString:[NSString stringWithFormat:NSLocalizedString(@"Please enter a valid username.\n", nil)]]; + [errors appendString:[NSString stringWithFormat:NSLocalizedString(@"Please enter a valid username.", nil)]]; + [errors appendString:@"\n"]; } if (domain != nil && [domain length] == 0) { - [errors appendString:[NSString stringWithFormat:NSLocalizedString(@"Please enter a valid domain.\n", nil)]]; + [errors appendString:[NSString stringWithFormat:NSLocalizedString(@"Please enter a valid domain.", nil)]]; + [errors appendString:@"\n"]; } if ([errors length]) { @@ -779,26 +781,28 @@ static UICompositeViewDescription *compositeDescription = nil; NSInteger password_length = [[LinphoneManager instance] lpConfigIntForKey:@"password_length" forSection:@"wizard"]; if ([username length] < username_length) { - [errors - appendString:[NSString stringWithFormat:NSLocalizedString( - @"The username is too short (minimum %d characters).\n", nil), - username_length]]; + [errors appendString:[NSString stringWithFormat:NSLocalizedString( + @"The username is too short (minimum %d characters).", nil), + username_length]]; + [errors appendString:@"\n"]; } if ([password length] < password_length) { - [errors - appendString:[NSString stringWithFormat:NSLocalizedString( - @"The password is too short (minimum %d characters).\n", nil), - password_length]]; + [errors appendString:[NSString stringWithFormat:NSLocalizedString( + @"The password is too short (minimum %d characters).", nil), + password_length]]; + [errors appendString:@"\n"]; } if (![password2 isEqualToString:password]) { - [errors appendString:NSLocalizedString(@"The passwords are different.\n", nil)]; + [errors appendString:NSLocalizedString(@"The passwords are different.", nil)]; + [errors appendString:@"\n"]; } NSPredicate *emailTest = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", @".+@.+\\.[A-Za-z]{2}[A-Za-z]*"]; if (![emailTest evaluateWithObject:email]) { - [errors appendString:NSLocalizedString(@"The email is invalid.\n", nil)]; + [errors appendString:NSLocalizedString(@"The email is invalid.", nil)]; + [errors appendString:@"\n"]; } if ([errors length]) { @@ -837,7 +841,8 @@ static UICompositeViewDescription *compositeDescription = nil; NSMutableString *errors = [NSMutableString string]; if ([username length] == 0) { - [errors appendString:[NSString stringWithFormat:NSLocalizedString(@"Please enter a valid username.\n", nil)]]; + [errors appendString:[NSString stringWithFormat:NSLocalizedString(@"Please enter a valid username.", nil)]]; + [errors appendString:@"\n"]; } if ([errors length]) { diff --git a/Resources/ar.lproj/Localizable.strings b/Resources/ar.lproj/Localizable.strings index 66fea75f7b9b8a136fc0f483e723d3ace90215c7..921f348f97779bc9bfc840b70087726960622eee 100644 GIT binary patch delta 1213 zcmcIj!EVz)5S>(Ia!3V-N~nMkZqi`a#0jaBA|iq6#2XjW0~{!a2Iv7QkPsjhZV1yG zrwXw@!Kp&>oiE_PcW|tFtRmj5oi-S8!O&%T-W-t5=CnZt4E+fL<@%^}$?zFLX*+b+Z3V99RI<;wuc4-aKiiw&u zqE{57#R1RFtg4>FmAPaybUYHphDJ<7K_SIZEF@e0oOr{fl}$I!uoqaY>IK zAM2UbrL?;J>0IIh>Uz$vM;7^LAwZEF29XeG844D)P1!IfBL=uAwvHCF)?DmYK}(eN zfu`^`01ew%)-&pOrb+`OaGKh+ zp=zd!0v%CX2FT^ijz0E+=OH^rq(CS{tdIl#7KtTYQ^=uWa%NN3|EW<9@?-9qJK}W* zaDmw^(lY%u1tc1asx>qr%|zHoSnULz{3%i&I>>y~!Am?2k!YJa7r8}PX=w@qI~i*u zC(a#nM;XyGBn5gd*F${T|-@7hk1T*^G zC$mj1@mHGs!zXKUgP+*s0^e02rITd>q$UUWaBQCD&%!Pq%#g~E$B@F12_(}Q6c}|$Rg9Cr_=;`z^LZdP*(Fn8vQzS} U#SSTqAok{vR3^sFQE5w*0fh+~AOHXW delta 67 zcmaDhnd#qTrVUPB%rOjkn;pI0GlCeC4ZX8B&+_RJ1B!&b68L7e$hGW`N FWdIFx6$k(T diff --git a/Resources/en.lproj/Localizable.strings b/Resources/en.lproj/Localizable.strings index ad0a1f4a36a6688fce51a7199ddc1d29affb6ea3..4b27020b3dabc29c42549aea3c533252cfb904b4 100644 GIT binary patch delta 124 zcmcc8&a|e9X@i*io{ delta 444 zcmZ3}#B`;dX@i(Ma|}b?5D)~0g@Zb=N&1cAENM%r9$YjW4C}T)u$N{oafc#{J3?Q!vh?5ygfGUa@ zih-i#Kv57Iq$7|}3#1yPTLGvJB&)!X4&;{sS$UHuDo9R#lq6PP1l9vG38c1! zL61QR$g%}uC5B+2IW%+w(2n5AQx!x(?%+jn$K=Mi*v<2zb})j&$1z@baz>02G<@#G maZG*{69bn4vQcCNCa1+IAjyLHa1|*~nS8hi+h)E5IYj_y<##3k diff --git a/Resources/fr.lproj/Localizable.strings b/Resources/fr.lproj/Localizable.strings index 94f329f08a0e1923de226dad0aba29a59b427894..a103c4c9f332461dba19bfea7fde5753df7f6087 100644 GIT binary patch delta 50 zcmZ26iD|+lrVU13ldt&7Ot$lp+g#wajuFJ!Z0B=FY_eSPm(5}+T#TDlQh|g~+BYQt D1+o*J delta 78 zcmbO*iD|_orVU13%rOjkn+?5QGJ+VB4ZW-<$9Zc^?(@pp{LDv33@j*^{1vQF3@H{n_` E08w2S8UO$Q delta 64 zcmezOoN?L<#tnNMm}407Ht%+5WCSy;o&E}e7?aIIpMq)Wu=7w_dNND+1+b#a;o33) DB{UZ& diff --git a/Resources/nl.lproj/Localizable.strings b/Resources/nl.lproj/Localizable.strings index 7326dae19d81dc7ae9b3d6b76b3ec8394b46c2a0..ddbae2a991738a5845ce7332565ceafa67ca7c7a 100644 GIT binary patch delta 54 zcmX>xk!b@EJ@A}-z)Nd0pVuTtAj4<#2X7Ct$y>CACi^9Q0MVO6l9?DcN2N$GZZ1m= GQU(B$(H2Jl delta 74 zcmdlmk?F)lrVS4~nPV98HsAN$%LrmjzVE3$S;10d^DXZ%F|dGPvhZZ5qz_-*2M-x2 diff --git a/Resources/ru.lproj/Localizable.strings b/Resources/ru.lproj/Localizable.strings index 035caa73b386ce57055305b11c4a52b3fc7488df..7c6aeaeedec72fa69da58bc6eee0130ec892db8e 100644 GIT binary patch delta 73 zcmZqZW_r-Yv|)wEz>% delta 99 zcmaFR#njNvv|)t@a|}b?lQLH`&2MXEI+l*W?B6=YVo2mpAWEwKOq delta 165 zcmX@n#`L3&X~Qlz<`{;&$-VBTli#`VF~&@OXd6A*&zo=Z1UH$ Date: Mon, 19 Oct 2015 14:09:15 +0200 Subject: [PATCH 09/19] xcode: bump build 2.4.2 --- linphone-Info.plist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linphone-Info.plist b/linphone-Info.plist index 24982b408..0f533735d 100644 --- a/linphone-Info.plist +++ b/linphone-Info.plist @@ -53,7 +53,7 @@ CFBundleVersion - 2.4.1 + 2.4.2 LSRequiresIPhoneOS UIApplicationExitsOnSuspend From 8603e28f13b1aa319723f6f828da7a001ecf9359 Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Mon, 19 Oct 2015 14:51:08 +0200 Subject: [PATCH 10/19] UITester: fix test --- TestsUI/CallTester.m | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/TestsUI/CallTester.m b/TestsUI/CallTester.m index b51398e24..bc2085602 100644 --- a/TestsUI/CallTester.m +++ b/TestsUI/CallTester.m @@ -53,9 +53,10 @@ } - (void)testDialInvalidSIPURI { - [self callURI:@"123 😀"]; - [tester waitForViewWithAccessibilityLabel: - @"Some invalid characters where found in the given SIP address. Please correct it."]; + NSString *user = @"123 😀"; + [self callURI:user]; + [tester waitForViewWithAccessibilityLabel:[NSString + stringWithFormat:@"Cannot call %@.\nReason was: Call failed", user]]; [tester tapViewWithAccessibilityLabel:@"Cancel" traits:UIAccessibilityTraitButton]; } From 8de1f2368921000416bb5a8d6af63f62cde4a672 Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Tue, 20 Oct 2015 11:11:04 +0200 Subject: [PATCH 11/19] xcode: bump v2.4.3 and update translations --- .../HistoryDetailsViewController.strings | Bin 4860 -> 4866 bytes Resources/ar.lproj/Localizable.strings | Bin 32626 -> 31998 bytes Resources/de.lproj/Localizable.strings | Bin 35302 -> 34632 bytes Resources/fr.lproj/Localizable.strings | Bin 35088 -> 34430 bytes Resources/ja.lproj/Localizable.strings | Bin 29694 -> 29086 bytes Resources/nl.lproj/Localizable.strings | Bin 34992 -> 34352 bytes Resources/ru.lproj/Localizable.strings | Bin 34144 -> 33512 bytes Resources/zh_TW.lproj/Localizable.strings | Bin 33608 -> 32976 bytes .../ar.lproj/Root.strings | Bin 1448 -> 1578 bytes .../de.lproj/Root.strings | Bin 1502 -> 1642 bytes .../fr.lproj/Network.strings | Bin 940 -> 950 bytes .../fr.lproj/Root.strings | Bin 1532 -> 1654 bytes .../ja.lproj/Root.strings | Bin 1382 -> 1512 bytes .../nl.lproj/Root.strings | Bin 1430 -> 1560 bytes .../ru.lproj/Root.strings | Bin 1506 -> 1636 bytes .../zh_TW.lproj/Root.strings | Bin 1414 -> 1544 bytes linphone-Info.plist | 2 +- 17 files changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/fr.lproj/HistoryDetailsViewController.strings b/Classes/fr.lproj/HistoryDetailsViewController.strings index 92e95d51eb7ff3657379f22ff01a9f3c348af905..68f6a38f7627eb77e881552cab2f298964f23057 100644 GIT binary patch delta 56 zcmeyP+N8Fjj!QC;p#TU|8FCmD7>XJ48HyN67!n!s7)mByRGl2hqOkc6*B3@c$H{^` L&YSso-?0J!%}5Y< delta 43 zcmZot`=h#{j%%_Em)yi_3X|hl6gJ=C`ohTW%#g^C!;mxaqWR=JZk^2zyoXo;TU`$x diff --git a/Resources/ar.lproj/Localizable.strings b/Resources/ar.lproj/Localizable.strings index 921f348f97779bc9bfc840b70087726960622eee..d1c75784630432b32daf5f3bc3bcd8b5d9f2f8b9 100644 GIT binary patch delta 19 bcmezLkMZA6#tnPiHut&D5!`$xYMBZEb4Utw delta 253 zcmezOlkw9(#tnPiCLd7an*7UEV)6qwxyhT@BPPeV^KG8sc0y1%pCOkal|g|alOd0x zj3JRBhaq$F?-)r#1%`5l44_OAST>CzpP>|}A_b~afuRH}tH6*B)L8~plQ&skUUKq; t1Tn)Ru%2X~3XrKK40;SoK$a~KD=`EE&7rb={Al(~Ue6T0IV@s@3IKQ?KPvzL diff --git a/Resources/de.lproj/Localizable.strings b/Resources/de.lproj/Localizable.strings index b5abfbd2e16712ebc4d4079efdc048db57eb5ba5..94c93d6ec5ec17e2ee7da6d4bc066d11c23e4350 100644 GIT binary patch delta 19 acmaDhndw9y(*`5&&3Zn4!kgm~J2U`Qt_Se| delta 303 zcmX@n$MkG6(*`5&$#%Isll{EZCZ~B@Os>$3nEc0^Z?c4!%;YB~0-KGz`-Efj8FCp? z859^Y8S)s)7!nzBfUFcCKbau|$SVTkWQG!;iXw($plCTz6vPJUNMp!nCQsRrp* z0ICDYDlnu2`DH*>-sE}<$;pRW#p;W|dO#+D)Rr*lF(?69wm_`J5DYYjhHe1b5j?rs VLKNfJeA4a1-Q~&?~ diff --git a/Resources/ja.lproj/Localizable.strings b/Resources/ja.lproj/Localizable.strings index 901ca53868e4947d4425098f971550e9cb76f6c6..60a0b443bba4d03e333e216a1fe7f0dbeb87558e 100644 GIT binary patch delta 19 bcmezOoN?Y`#tk)&o2{HS@Ne!3E>ZvhWAF&* delta 236 zcmbRDnDO6p#tk)&0!j=D47Nb5#K4)pGbqbovVuy<p5)mjTt}O%61aoP3}_ nOt}cGCmE;$q_%`X4`?6E-e90PRI!B@#g@tTS+Se70!tJC!x}j- diff --git a/Resources/nl.lproj/Localizable.strings b/Resources/nl.lproj/Localizable.strings index ddbae2a991738a5845ce7332565ceafa67ca7c7a..3188422e2f6abc62286f654bcaee81aef223bf08 100644 GIT binary patch delta 19 bcmdlmk!eE@(}q1>n`e1j2yZS)u+abjSAGZv delta 247 zcmdnc!?a-{(}q1>lQ}enCSUNfntX&MV)7nezReT7QiO%`8FCp?859^Y8S)s)7!nzB z7&0dxOp-KIU?^wE0Lm1BWz!h)8A^dFQlKgo7)rph3JmE$on=5Zd6V@mBq#4{5i=|T o>q!Qx0GV3CpvRyDWZ43-5<@W194gz#i(=noN59z3pJMGa09R@|Y5)KL diff --git a/Resources/ru.lproj/Localizable.strings b/Resources/ru.lproj/Localizable.strings index 7c6aeaeedec72fa69da58bc6eee0130ec892db8e..0e71158cddb2c3f7d3f21952cdb3db0fd267eda2 100644 GIT binary patch delta 19 bcmaFR#q^?;X+w?Y<{+;#LYoi7El>jhUIGaf delta 283 zcmaFS%JiU%X+w?Ylp%kbh1*%ekp#&_ez>p5qSq4;-2b2kB@MH)8(uqKI xDPWz&ljk=|8Ww@s$v{0IdrBDe7?gl4TOd{f>Y;-Rcu`z1`JqqjX1AC{Y5;jWLUI5A diff --git a/Resources/zh_TW.lproj/Localizable.strings b/Resources/zh_TW.lproj/Localizable.strings index 4c936fb0dfd6981c42fb22d4270f4cf08d9668a0..e6e1aa27b3c51cdd3aee90a45db1f84c4be626bb 100644 GIT binary patch delta 19 bcmX@n#&n^PX+xj;<`j=@LYw!*^r!&zOs;bmnB0&NFw+eoRO>pCOkal|g|a zlOd0xj3JRBhaq$F*%(Pf1%`5l44_OAST>CzpP>|}A_b~afuRH}tH6*B)L8~plQ-E> xUUG6mvY25JSWhxg1<2GA20aEPAj=krl^BA7=1|!_el+_g2MR=Qc8cm#0|5TqJ-`3} diff --git a/Settings/InAppSettings.bundle/ar.lproj/Root.strings b/Settings/InAppSettings.bundle/ar.lproj/Root.strings index 916a33cdc24b2761c96d61d4948569e4409170ee..eb8acb1fdbeffcd176e7479592f55c60b074a5b4 100644 GIT binary patch delta 139 zcmZ3%y^3eU3f6ih21kZch7yK+1_g#hhCGI1hH{2fh9V#@8OYB8LIs9QhFl;_Wk>rFbu)0j3Y%)Uz)Z{#%z6`KAc??Pn)(l(> E0KG*UVE_OC delta 7 OcmaFGbB}w&Jyrk@2m^Bf diff --git a/Settings/InAppSettings.bundle/fr.lproj/Network.strings b/Settings/InAppSettings.bundle/fr.lproj/Network.strings index c2e7c915d1bb0f74c47e0a86d31247c48b46b302..5596b1afd1fe3704b1c1a56c045eeec638293d16 100644 GIT binary patch delta 20 bcmZ3(zKwlC5T^oz27?iUJA>xNz-VRwHQ)rM delta 10 RcmdnSzJ`55(8ic3W&jp{1HAwM diff --git a/Settings/InAppSettings.bundle/fr.lproj/Root.strings b/Settings/InAppSettings.bundle/fr.lproj/Root.strings index 9140a72ebc8f80ec1d9046a9d306afca568021cd..6bdd6e1fe0d8caacd6ed8e4d521d7b9e936085d6 100644 GIT binary patch delta 130 zcmXAh!3{uA5Jca_1x3hjLmafA1K}See0)TxN?RImaxlnblbxN}cSl!z+`(?hS(xcb zC~-`zSiD>%-%1G$on)!CmFikuH;j@@V<EDnN@&I;v B8h!u( delta 7 Ocmeyy^M`xGA65VmE(5y& diff --git a/Settings/InAppSettings.bundle/ja.lproj/Root.strings b/Settings/InAppSettings.bundle/ja.lproj/Root.strings index 44960cb5d2499657bcd17ecfb2e183f8f306bc8e..49354e451818769c6383aa66b8d8d60aa0a86e5f 100644 GIT binary patch delta 139 zcmaFH^@4jt8f(20gCj#JLkUAZg91Y$LmophLpeh#LlKad4CLnkp#noDLoN`eGNb@m Zi9offK+#GDC7_Hg5L04;H8TSj0|46(8a)62 delta 7 OcmaFC{fuiv8Y=(}C<6Zg diff --git a/Settings/InAppSettings.bundle/nl.lproj/Root.strings b/Settings/InAppSettings.bundle/nl.lproj/Root.strings index 2868adeda9587ff765092616e75979e63204264e..736487848b3aee141a8e67718243c7d8fe8eb260 100644 GIT binary patch delta 139 zcmbQnJ%eY%G}d}021kZch7yK+1_g#hhCGI1hH{2fh9V#@8OYB8LIs9QhFl;_Wk>(b##*n$;K)$QP{NSUpumvGkjGHWP|lFbPz2;91Nk{XsKAiPkPC#V3@JcX ZB2aBAP_&Xk2`FO=#FUs|&CI~X004zy8J_?E delta 7 OcmeC+Y2)6|#tHxl@&aK1 diff --git a/linphone-Info.plist b/linphone-Info.plist index 0f533735d..76ad681b3 100644 --- a/linphone-Info.plist +++ b/linphone-Info.plist @@ -53,7 +53,7 @@ CFBundleVersion - 2.4.2 + 2.4.3 LSRequiresIPhoneOS UIApplicationExitsOnSuspend From 29571b6de71011655797010a89ea866aadeebe8b Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Wed, 21 Oct 2015 11:10:13 +0200 Subject: [PATCH 12/19] Wizard: fix account creation --- Classes/WizardViewController.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Classes/WizardViewController.m b/Classes/WizardViewController.m index e02ca09b8..22a2c58ae 100644 --- a/Classes/WizardViewController.m +++ b/Classes/WizardViewController.m @@ -780,14 +780,14 @@ static UICompositeViewDescription *compositeDescription = nil; NSInteger username_length = [[LinphoneManager instance] lpConfigIntForKey:@"username_length" forSection:@"wizard"]; NSInteger password_length = [[LinphoneManager instance] lpConfigIntForKey:@"password_length" forSection:@"wizard"]; - if ([username length] < username_length) { + if (username_length > (int)username.length) { [errors appendString:[NSString stringWithFormat:NSLocalizedString( @"The username is too short (minimum %d characters).", nil), username_length]]; [errors appendString:@"\n"]; } - if ([password length] < password_length) { + if (password_length > (int)password.length) { [errors appendString:[NSString stringWithFormat:NSLocalizedString( @"The password is too short (minimum %d characters).", nil), password_length]]; From ca1b67f8e7ac6398c6706fd3612dd85bee6e6aec Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Fri, 23 Oct 2015 14:21:53 +0200 Subject: [PATCH 13/19] submodules: update linphone to fix pause issue with automatically starts video policy --- submodules/linphone | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/linphone b/submodules/linphone index c10bceadc..d39ba6f34 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit c10bceadcbe0ab668d07fbb539a435bf9e0ebebe +Subproject commit d39ba6f3470b10f8fde9cdbac64d6afb64c6c508 From 627e8d8081e89eec948f0e5c75e2a953f6b5c74e Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Wed, 28 Oct 2015 09:39:43 +0100 Subject: [PATCH 14/19] liblinphone: fix potential crash when interpretting URLs --- Classes/ContactDetailsViewController.m | 6 ++++-- Classes/LinphoneManager.m | 6 ++++-- Classes/LinphoneUI/Base.lproj/UICallBar.xib | 4 ++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Classes/ContactDetailsViewController.m b/Classes/ContactDetailsViewController.m index 7d03e6b0f..29c692297 100644 --- a/Classes/ContactDetailsViewController.m +++ b/Classes/ContactDetailsViewController.m @@ -150,7 +150,8 @@ static void sync_address_book(ABAddressBookRef addressBook, CFDictionaryRef info - (void)addCurrentContactContactField:(NSString *)address { LinphoneAddress *linphoneAddress = linphone_address_new(address.UTF8String); - NSString *username = [NSString stringWithUTF8String:linphone_address_get_username(linphoneAddress)]; + NSString *username = + linphoneAddress ? [NSString stringWithUTF8String:linphone_address_get_username(linphoneAddress)] : address; if (([username rangeOfString:@"@"].length > 0) && ([[LinphoneManager instance] lpConfigBoolForKey:@"show_contacts_emails_preference"] == true)) { @@ -161,7 +162,8 @@ static void sync_address_book(ABAddressBookRef addressBook, CFDictionaryRef info } else { [tableController addSipField:address]; } - linphone_address_destroy(linphoneAddress); + if (linphoneAddress) + linphone_address_destroy(linphoneAddress); [self enableEdit:FALSE]; [[tableController tableView] reloadData]; diff --git a/Classes/LinphoneManager.m b/Classes/LinphoneManager.m index 0376b561f..fdcb4f478 100644 --- a/Classes/LinphoneManager.m +++ b/Classes/LinphoneManager.m @@ -961,8 +961,10 @@ static void linphone_iphone_popup_password_request(LinphoneCore *lc, const char } else { if ([[LinphoneManager instance] lpConfigBoolForKey:@"show_contacts_emails_preference"] == true) { LinphoneAddress *linphoneAddress = linphone_address_new([address UTF8String]); - address = [NSString stringWithUTF8String:linphone_address_get_username(linphoneAddress)]; - linphone_address_destroy(linphoneAddress); + if (linphoneAddress) { + address = [NSString stringWithUTF8String:linphone_address_get_username(linphoneAddress)]; + linphone_address_destroy(linphoneAddress); + } } } if (address == nil) { diff --git a/Classes/LinphoneUI/Base.lproj/UICallBar.xib b/Classes/LinphoneUI/Base.lproj/UICallBar.xib index f76753d37..2fe10a1af 100644 --- a/Classes/LinphoneUI/Base.lproj/UICallBar.xib +++ b/Classes/LinphoneUI/Base.lproj/UICallBar.xib @@ -1,8 +1,8 @@ - + - + From ac38ca6467bdbd750a2a448a3bea8b6fddf148e9 Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Tue, 1 Dec 2015 11:43:20 +0100 Subject: [PATCH 15/19] update linphone/ms2 to fix iphone 6s audio issue --- submodules/linphone | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/linphone b/submodules/linphone index f99fe0ced..6a70c5c25 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit f99fe0ced506dd6588dae8cdbf7b624e6f2f999c +Subproject commit 6a70c5c257a02ce170cc0385c87d3e98eec94c81 From ee5e470359cefc9f16287d6ac4288ee7cf56ad27 Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Wed, 9 Dec 2015 14:37:41 +0100 Subject: [PATCH 16/19] README.md: add PATH setting step --- README.md | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index db78384e4..830f965c5 100644 --- a/README.md +++ b/README.md @@ -12,10 +12,12 @@ Here's how to launch Linphone for iPhone (more details below): 2. Install [HomeBrew, a package manager for OS X](http://brew.sh) (MacPorts is supported but deprecated). 3. Install Linphone dependencies: open iTerm.app in the current directory and list dependencies to install using: `./prepare.py` -4. Build SDK (see below for options and explanations): +4. Reorder your path so that brew tools are used instead of Apple's ones which are obsolete: + `export PATH=/usr/local/bin:$PATH` +5. Build SDK (see below for options and explanations): `./prepare.py -c && ./prepare.py && make` -5. Open linphone.xcodeproj in Xcode: `open linphone.xcodeproj` -6. Press `⌘R` and voilà! +6. Open linphone.xcodeproj in Xcode: `open linphone.xcodeproj` +7. Press `⌘R` and voilà! # Building the SDK @@ -36,7 +38,7 @@ This SDK can be generated in 2 flavors: * NO GPL third parties means that Linphone will only use non GPL code except for `liblinphone`, `mediastreamer2`, `oRTP` and `belle-sip`. If you choose this flavor, your final application is **still subject to GPL except if you have a [commercial license for the mentioned libraries](http://www.belledonne-communications.com/products.html)**. To generate the liblinphone multi arch SDK without GPL third parties, invoke: - ./prepare.py --disable-gpl-third-parties=no [other options] && make + ./prepare.py --disable-gpl-third-parties [other options] && make ## Customizing features @@ -113,19 +115,19 @@ MainStoryboard | | (mainViewController) | - UICompositeViewController : TPMultilayout + UICompositeView : TPMultilayout | - #---> view #--> stateBar + #---> view #--> statusBar | #--> contentView | #--> tabBar -When the application is started, the phoneMainView gets asked to transition to the Dialer view or the Wizard view. +When the application is started, the phoneMainView gets asked to transition to the Dialer view or the Assistant view. PhoneMainView exposes the -changeCurrentView: method, which will setup its -Any Linphone view is actually presented in the UICompositeViewController, with or without a stateBar and tabBar. +Any Linphone view is actually presented in the UICompositeView, with or without a statusBar and tabBar. -The UICompositeViewController consists of 3 areas laid out vertically. From top to bottom: StateBar, Content and TabBar. +The UICompositeView consists of 3 areas laid out vertically. From top to bottom: StatusBar, Content and TabBar. The TabBar is usually the UIMainBar, which is used as a navigation controller: clicking on each of the buttons will trigger a transition to another "view". From 6f74e5fe3567babd622fa41f444b2acaf56a5ad8 Mon Sep 17 00:00:00 2001 From: Sandrine Avakian Date: Tue, 15 Dec 2015 11:16:36 +0100 Subject: [PATCH 17/19] Update linphone-iphone with linphone submodules master branch version. --- submodules/linphone | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/linphone b/submodules/linphone index 6a70c5c25..f002a1526 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit 6a70c5c257a02ce170cc0385c87d3e98eec94c81 +Subproject commit f002a15267f28b6f5db98cb3fcfa3b05b5881ea7 From b1fd1e8f07abef6764184e08131301c298119bcc Mon Sep 17 00:00:00 2001 From: Sandrine Avakian Date: Mon, 21 Dec 2015 10:25:39 +0100 Subject: [PATCH 18/19] Update linphone-iphone with linphone submodules master branch version, including RTCP Feedback on AVP. --- submodules/linphone | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/linphone b/submodules/linphone index f002a1526..29d2355ba 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit f002a15267f28b6f5db98cb3fcfa3b05b5881ea7 +Subproject commit 29d2355ba7ee50a806999711098f348d61172ead From 38a322288c00c2d0555e34ec19d8aada52e561ac Mon Sep 17 00:00:00 2001 From: Sandrine Avakian Date: Wed, 23 Dec 2015 11:48:55 +0100 Subject: [PATCH 19/19] Propagating fixes for RTCP feedback in linphone. --- submodules/linphone | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/linphone b/submodules/linphone index 29d2355ba..af1070f04 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit 29d2355ba7ee50a806999711098f348d61172ead +Subproject commit af1070f04ce4c51b892315d52ebe0eacae2d4d47