From aa6587f92e7fb17c7017785d13ec1757f60ec928 Mon Sep 17 00:00:00 2001 From: Brieuc Viel Date: Thu, 11 Jan 2018 15:56:58 +0100 Subject: [PATCH 01/21] [ContactDisplay] fix settings display phone only --- Classes/Utils/Utils.m | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Classes/Utils/Utils.m b/Classes/Utils/Utils.m index 1899e3b48..443c87f31 100644 --- a/Classes/Utils/Utils.m +++ b/Classes/Utils/Utils.m @@ -575,13 +575,15 @@ Contact *contact = [FastAddressBook getContactWithAddress:addr]; if (contact) { [ContactDisplay setDisplayNameLabel:label forContact:contact]; + addressLabel.text = [NSString stringWithUTF8String:linphone_address_as_string_uri_only(addr)]; + addressLabel.hidden = FALSE; } else { label.text = [FastAddressBook displayNameForAddress:addr]; + if([LinphoneManager.instance lpConfigBoolForKey:@"display_phone_only" inSection:@"app"]) + addressLabel.hidden = TRUE; + else + addressLabel.text = [NSString stringWithUTF8String:linphone_address_as_string_uri_only(addr)]; } - if([LinphoneManager.instance lpConfigStringForKey:@"display_phone_only" inSection:@"app"]) - addressLabel.text = [NSString stringWithUTF8String:linphone_address_as_string_uri_only(addr)]; - else - addressLabel.hidden = TRUE; } From 321b3550be72bad4a84b3ed8f0a1543827367c9e Mon Sep 17 00:00:00 2001 From: Brieuc Viel Date: Wed, 17 Jan 2018 15:59:38 +0100 Subject: [PATCH 02/21] [Contact] fix fetch Contact -> SIP service only ++ --- Classes/Contact.m | 27 +++++++++++++++------------ Classes/ContactDetailsTableView.m | 21 +++++++++++++++++---- Classes/LinphoneManager.m | 2 +- 3 files changed, 33 insertions(+), 17 deletions(-) diff --git a/Classes/Contact.m b/Classes/Contact.m index d7a5ad375..4974e1339 100644 --- a/Classes/Contact.m +++ b/Classes/Contact.m @@ -40,11 +40,14 @@ if (_person.instantMessageAddresses != NULL) { for (CNLabeledValue *sipAddr in _person.instantMessageAddresses) { NSString *username = sipAddr.value.username; - if (username) - [_sipAddresses addObject:username]; + NSString *service = sipAddr.value.service; + if (username && ([service isEqualToString:LinphoneManager.instance.contactSipField] || ([service isEqualToString:@"INSTANT_MESSAGING_NAME"] && [FastAddressBook isSipURI:username]))){ + [_sipAddresses addObject:username]; + } } } } + for (CNLabeledValue *email in _person.emailAddresses) { [_emails addObject:email.value]; } @@ -225,11 +228,11 @@ CNInstantMessageAddress *cNSipMsgAddr; if ([normSip containsString:@"@"]) cNSipMsgAddr = [[CNInstantMessageAddress alloc] - initWithUsername:normSip service:[normSip componentsSeparatedByString:@"@"][1]]; + initWithUsername:normSip service:@"SIP"];//service:[normSip componentsSeparatedByString:@"@"][1]]; else cNSipMsgAddr = [[CNInstantMessageAddress alloc] initWithUsername:normSip - service:normSip]; + service:@"SIP"]; CNLabeledValue *sipAddress = [CNLabeledValue labeledValueWithLabel:NULL value:cNSipMsgAddr]; NSMutableArray *> @@ -244,13 +247,13 @@ CNInstantMessageAddress *cNSipMsgAddr; if ([[FastAddressBook normalizeSipURI:normSip] containsString:@"@"]) cNSipMsgAddr = [[CNInstantMessageAddress alloc] - initWithUsername:sip - service:[[FastAddressBook normalizeSipURI:normSip] - componentsSeparatedByString:@"@"][1]]; + initWithUsername:sip service:@"SIP"]; + //service:[[FastAddressBook normalizeSipURI:normSip] + // componentsSeparatedByString:@"@"][1]]; else cNSipMsgAddr = - [[CNInstantMessageAddress alloc] initWithUsername:normSip - service:normSip]; + [[CNInstantMessageAddress alloc] initWithUsername:normSip service:@"SIP"]; + //service:normSip]; CNLabeledValue *sipAddress = [CNLabeledValue labeledValueWithLabel:NULL value:cNSipMsgAddr]; NSMutableArray *> @@ -351,12 +354,12 @@ cNSipMsgAddr = [[CNInstantMessageAddress alloc] initWithUsername:[normSip componentsSeparatedByString:@"@"][0] - service:[normSip - componentsSeparatedByString:@"@"][1]]; + service:@"SIP"]; + //service:[normSip componentsSeparatedByString:@"@"][1]]; else cNSipMsgAddr = [[CNInstantMessageAddress alloc] initWithUsername:normSip - service:normSip]; + service:@"SIP"]; CNLabeledValue *sipAddress = [CNLabeledValue labeledValueWithLabel:NULL value:cNSipMsgAddr]; diff --git a/Classes/ContactDetailsTableView.m b/Classes/ContactDetailsTableView.m index 97657c64e..a7685e5bc 100644 --- a/Classes/ContactDetailsTableView.m +++ b/Classes/ContactDetailsTableView.m @@ -75,12 +75,10 @@ - (void)addEntry:(UITableView *)tableview section:(NSInteger)section animated:(BOOL)animated value:(NSString *)value { bool added = FALSE; if (section == ContactSections_Number) { - if ([_contact.phones count] == - [_contact.person.phoneNumbers count]) + if ([_contact.phones count] == [_contact.person.phoneNumbers count]) added = [_contact addPhoneNumber:value]; } else if (section == ContactSections_Sip) { - if ([_contact.sipAddresses count] == - [_contact.person.instantMessageAddresses count]) + if ([_contact.sipAddresses count] == [self countSipAddressFromCNContact:_contact.person]) //[_contact.person.instantMessageAddresses count]) added = [_contact addSipAddress:value]; } else if (section == ContactSections_Email) { if ([_contact.emails count] == @@ -100,6 +98,21 @@ } } +-(NSInteger)countSipAddressFromCNContact:(CNContact*) mCNContact{ + NSInteger count = 0; + if (mCNContact.instantMessageAddresses != NULL) { + for (CNLabeledValue *sipAddr in mCNContact.instantMessageAddresses) { + NSString *username = sipAddr.value.username; + NSString *service = sipAddr.value.service; + if (username && ([service isEqualToString:LinphoneManager.instance.contactSipField] || ([service isEqualToString:@"INSTANT_MESSAGING_NAME"] && [FastAddressBook isSipURI:username]))){ + count ++; + } + } + } + return count; +} + + - (void)setContact:(Contact *)acontact { // if (acontact == _contact) // return; diff --git a/Classes/LinphoneManager.m b/Classes/LinphoneManager.m index a6f68c166..d93bbffe3 100644 --- a/Classes/LinphoneManager.m +++ b/Classes/LinphoneManager.m @@ -1855,7 +1855,7 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach device = [device stringByReplacingOccurrencesOfString:@" " withString:@"."]; linphone_core_set_user_agent(theLinphoneCore, device.UTF8String, LINPHONE_IOS_VERSION); - _contactSipField = [self lpConfigStringForKey:@"contact_im_type_value" withDefault:@"SIP"]; + _contactSipField = [self lpConfigStringForKey:@"contact_im_type_value" inSection:@"sip" withDefault:@"SIP"]; if (_fastAddressBook == nil) { _fastAddressBook = [[FastAddressBook alloc] init]; From c9a06be6baf9722f10d8c8e0efdd374240d52aa9 Mon Sep 17 00:00:00 2001 From: Brieuc Viel Date: Thu, 18 Jan 2018 09:53:41 +0100 Subject: [PATCH 03/21] [ChatContact] fixed sorted contact list search when creating a new chatroom --- Classes/ChatConversationCreateTableView.m | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/Classes/ChatConversationCreateTableView.m b/Classes/ChatConversationCreateTableView.m index ed1a66f14..c07dd7b76 100644 --- a/Classes/ChatConversationCreateTableView.m +++ b/Classes/ChatConversationCreateTableView.m @@ -15,7 +15,7 @@ @property(nonatomic, strong) NSMutableDictionary *contacts; @property(nonatomic, strong) NSDictionary *allContacts; -@property(nonatomic, strong) NSArray *sortedKeys; +@property(nonatomic, strong) NSMutableArray *contactsAddresses; @property(nonatomic, strong) NSArray *sortedAddresses; @end @@ -23,20 +23,17 @@ - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; - self.allContacts = - [[NSMutableDictionary alloc] initWithDictionary:LinphoneManager.instance.fastAddressBook.addressBookMap]; - self.sortedKeys = [[LinphoneManager.instance.fastAddressBook.addressBookMap allKeys] sortedArrayUsingSelector: @selector(compare:)]; - + self.allContacts = [[NSMutableDictionary alloc] initWithDictionary:LinphoneManager.instance.fastAddressBook.addressBookMap]; self.sortedAddresses = [[LinphoneManager.instance.fastAddressBook.addressBookMap allKeys] sortedArrayUsingComparator:^NSComparisonResult(id a, id b) { Contact* first = [_allContacts objectForKey:a]; Contact* second = [_allContacts objectForKey:b]; - if([[first.firstName lowercaseString] compare:[second.firstName lowercaseString]] == NSOrderedSame) return [[first.lastName lowercaseString] compare:[second.lastName lowercaseString]]; else return [[first.firstName lowercaseString] compare:[second.firstName lowercaseString]]; }]; self.contacts = [[NSMutableDictionary alloc] initWithCapacity:_allContacts.count]; + self.contactsAddresses = [NSMutableArray array]; [_searchBar becomeFirstResponder]; [_searchBar setText:@""]; [self searchBar:_searchBar textDidChange:_searchBar.text]; @@ -45,13 +42,14 @@ - (void)reloadDataWithFilter:(NSString *)filter { [_contacts removeAllObjects]; - + [_contactsAddresses removeAllObjects]; for (NSString* key in _sortedAddresses){ NSString *address = (NSString *)key; NSString *name = [FastAddressBook displayNameForContact:[_allContacts objectForKey:key]]; if ((filter.length == 0) || ([name.lowercaseString containsSubstring:filter.lowercaseString]) || ([address.lowercaseString containsSubstring:filter.lowercaseString])) { [_contacts setObject:name forKey:address] ; + [_contactsAddresses insertObject:address atIndex:[_contactsAddresses count]]; } } // also add current entry, if not listed @@ -64,9 +62,9 @@ linphone_address_destroy(addr); } if (nsuri.length > 0 && [_contacts valueForKey:nsuri] == nil) { - _contacts[nsuri] = filter; + [_contacts setObject:filter forKey:nsuri] ; + [_contactsAddresses insertObject:nsuri atIndex:[_contactsAddresses count]]; } - [self.tableView reloadData]; } @@ -84,8 +82,8 @@ if (cell == nil) { cell = [[UIChatCreateCell alloc] initWithIdentifier:kCellId]; } - LinphoneAddress *addr = [LinphoneUtils normalizeSipOrPhoneAddress:[_sortedAddresses objectAtIndex:indexPath.row]]; - cell.displayNameLabel.text = [_contacts objectForKey:[_sortedAddresses objectAtIndex:indexPath.row]]; + LinphoneAddress *addr = [LinphoneUtils normalizeSipOrPhoneAddress:[_contactsAddresses objectAtIndex:indexPath.row]]; + cell.displayNameLabel.text = [_contacts objectForKey:[_contactsAddresses objectAtIndex:indexPath.row]]; if (addr) { cell.addressLabel.text = [NSString stringWithUTF8String:linphone_address_as_string(addr)]; } else { From 6027b30ca634ff8da0aae8bee1a2d873c67c9f3d Mon Sep 17 00:00:00 2001 From: Brieuc Viel Date: Thu, 18 Jan 2018 10:51:18 +0100 Subject: [PATCH 04/21] [Bzrtp] update bzrtp submodule with fix for key prbm --- submodules/bzrtp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/bzrtp b/submodules/bzrtp index 37adaa053..7515af934 160000 --- a/submodules/bzrtp +++ b/submodules/bzrtp @@ -1 +1 @@ -Subproject commit 37adaa0536432149a51332d8eb04973a3ba6bac9 +Subproject commit 7515af934e5fa96c7e59f94f49c8bd25dd3ce071 From 9ed4a3939b874db6c0924a5eb7a936534d3ed4d1 Mon Sep 17 00:00:00 2001 From: Danmei Chen Date: Fri, 19 Jan 2018 15:57:14 +0100 Subject: [PATCH 05/21] update mediastreamer2 --- submodules/mediastreamer2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/mediastreamer2 b/submodules/mediastreamer2 index 927dda741..979034983 160000 --- a/submodules/mediastreamer2 +++ b/submodules/mediastreamer2 @@ -1 +1 @@ -Subproject commit 927dda7418fef78d92e1c3da18854841de9da605 +Subproject commit 97903498364ae2596e790cb2c2ce9ac76c04d64a From 954f5722dfd3d4a7b59166bd1bbc60a5d0749725 Mon Sep 17 00:00:00 2001 From: Danmei Chen Date: Fri, 19 Jan 2018 16:02:39 +0100 Subject: [PATCH 06/21] [Switch submodule branch] update srtp --- submodules/externals/srtp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/externals/srtp b/submodules/externals/srtp index 4caa4843b..59430f48d 160000 --- a/submodules/externals/srtp +++ b/submodules/externals/srtp @@ -1 +1 @@ -Subproject commit 4caa4843b4bfc54be596d309b5d00a81a35e3276 +Subproject commit 59430f48d4e1032238c34508c036ed5ca013d417 From 9d85c002680ee4cc2c04c9aa3d3122b014f5f687 Mon Sep 17 00:00:00 2001 From: Danmei Chen Date: Mon, 22 Jan 2018 10:32:44 +0100 Subject: [PATCH 07/21] update srtp --- submodules/externals/srtp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/externals/srtp b/submodules/externals/srtp index 59430f48d..451b1daa3 160000 --- a/submodules/externals/srtp +++ b/submodules/externals/srtp @@ -1 +1 @@ -Subproject commit 59430f48d4e1032238c34508c036ed5ca013d417 +Subproject commit 451b1daa314dfdb20d59433a92dda0319b5d8c11 From c5b83dccbe68745d6ebef7c2ec43a0d3b2d54eb0 Mon Sep 17 00:00:00 2001 From: Danmei Chen Date: Mon, 22 Jan 2018 17:44:14 +0100 Subject: [PATCH 08/21] update ms2 --- submodules/mediastreamer2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/mediastreamer2 b/submodules/mediastreamer2 index 979034983..c72fb8e79 160000 --- a/submodules/mediastreamer2 +++ b/submodules/mediastreamer2 @@ -1 +1 @@ -Subproject commit 97903498364ae2596e790cb2c2ce9ac76c04d64a +Subproject commit c72fb8e7994f1ccb61f89d77fdc9425df53a4033 From 367bf18082d9366f8df0a3e41be057364b63ff68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Turnel?= Date: Mon, 22 Jan 2018 17:53:38 +0100 Subject: [PATCH 09/21] Removed antlr3 dependency and updated submodules bellesip, cmake-builder --- .gitmodules | 3 --- submodules/belle-sip | 2 +- submodules/cmake-builder | 2 +- submodules/externals/antlr3 | 1 - 4 files changed, 2 insertions(+), 6 deletions(-) delete mode 160000 submodules/externals/antlr3 diff --git a/.gitmodules b/.gitmodules index d4527eeb8..752680c11 100644 --- a/.gitmodules +++ b/.gitmodules @@ -43,9 +43,6 @@ [submodule "submodules/belle-sip"] path = submodules/belle-sip url = git://git.linphone.org/belle-sip.git -[submodule "submodules/externals/antlr3"] - path = submodules/externals/antlr3 - url = git://git.linphone.org/antlr3.git [submodule "submodules/externals/opus"] path = submodules/externals/opus url = git://git.linphone.org/opus.git diff --git a/submodules/belle-sip b/submodules/belle-sip index d8c5e9e08..68f164801 160000 --- a/submodules/belle-sip +++ b/submodules/belle-sip @@ -1 +1 @@ -Subproject commit d8c5e9e08b3bd6640898e46850333f1ad900c8d2 +Subproject commit 68f1648017dde65edc8cd8054016fa3486a2955b diff --git a/submodules/cmake-builder b/submodules/cmake-builder index ed5a622a9..8560844ab 160000 --- a/submodules/cmake-builder +++ b/submodules/cmake-builder @@ -1 +1 @@ -Subproject commit ed5a622a91da4014b18470e2ef4fcfc5d482dc36 +Subproject commit 8560844abe7e5ad04721b23ca01e269cfa57f2bf diff --git a/submodules/externals/antlr3 b/submodules/externals/antlr3 deleted file mode 160000 index 311b6764e..000000000 --- a/submodules/externals/antlr3 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 311b6764e3f440db43617296ff856f7ec07bfdef From 0f3009d84b8e11d1ff039cafdda0f006198c26d8 Mon Sep 17 00:00:00 2001 From: Benjamin Reis Date: Tue, 23 Jan 2018 14:00:02 +0100 Subject: [PATCH 10/21] update bctbx --- submodules/bctoolbox | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/bctoolbox b/submodules/bctoolbox index 8a1d19db3..a7778bc6f 160000 --- a/submodules/bctoolbox +++ b/submodules/bctoolbox @@ -1 +1 @@ -Subproject commit 8a1d19db312444b0288db7dd62119c982d8beb1e +Subproject commit a7778bc6f0e2f7d8c491543ab8fd8d2faa4fec15 From fec5931d839ca43dee5d66ab99260c92ba2007fe Mon Sep 17 00:00:00 2001 From: Benjamin Reis Date: Tue, 23 Jan 2018 14:33:40 +0100 Subject: [PATCH 11/21] update readme --- README.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 5df3fa725..77337da66 100644 --- a/README.md +++ b/README.md @@ -20,20 +20,20 @@ Interested in helping translate Linphone? Contribute [on Transifex](https://www. ## Report bugs and submit patchs If you want to dig through Linphone code or report a bug, please read `CONTRIBUTING.md` first. You should also read this `README` entirely ;-). - + ## How to be a beta tester ? - + Enter the Beta : - Download TestFlight from the App Store and log in it with your apple-id - - Send an email to linphone-iphone@belledonne-communications.com, with object : [Beta test - Request], where you precise your apple-id you logged in TestFlight with + - Send an email to linphone-iphone@belledonne-communications.com, with object : [Beta test - Request], where you precise your apple-id you logged in TestFlight with - You will receive an invitation code to the beta in the following days via your email associated to your apple-id - Enter the invitation code received into TestFlight - Download Linphone from TestFlight - And voilà ! TestFlight will send you a notification every time a new beta test is available. - + Send a crash report : - It is done automatically by TestFlight - + Report a bug : - Open Linphone - Go to Settings —> Advanced —> Send logs @@ -68,7 +68,10 @@ Linphone for iPhone depends on liblinphone SDK. This SDK is generated from makef ## Incorporating our SDK in your project -After the SDK has been built, add all the `.framework` files located in `liblinphone-sdk/apple-darwin/Frameworks` to your XCode project Embedded Frameworks. +After the SDK has been built, add all the `.framework` files located in `liblinphone-sdk/apple-darwin/Frameworks` to your XCode project Embedded Frameworks and linked binaries. +Make sure that your project FRAMEWORK_SEARCH_PATHS contains "$(PROJECT_DIR)/liblinphone-sdk/apple-darwin/Frameworks" +Make sure that your project HEADER_SEARCH_PATHS contains "$(SRCROOT)/liblinphone-sdk/apple-darwin/include" +Make sure that your project LD_RUNPATH_SEARCH_PATHS contains "$(inherited) @executable_path/Frameworks"; Add a Run Script step to your build steps, put it after your step to embed frameworks, set it to use our `deploy.sh` script located in `liblinphone-sdk/apple-darwin/Tools`. ## Licensing: GPL third parties versus non GPL third parties From c26f2fe6c944bd2ae7da03963707811eaddd541d Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Tue, 23 Jan 2018 15:36:09 +0100 Subject: [PATCH 12/21] Fix build with updated cmake-builder. --- cmake_builder/CMakeLists.txt | 24 ++++++++++++++++++++++++ prepare.py | 6 +++++- submodules/cmake-builder | 2 +- 3 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 cmake_builder/CMakeLists.txt diff --git a/cmake_builder/CMakeLists.txt b/cmake_builder/CMakeLists.txt new file mode 100644 index 000000000..f226cc583 --- /dev/null +++ b/cmake_builder/CMakeLists.txt @@ -0,0 +1,24 @@ +############################################################################ +# CMakeLists.txt +# Copyright (C) 2017-2018 Belledonne Communications, Grenoble France +# +############################################################################ +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +############################################################################ + +lcb_blacklist_dependencies("libxsd" "soci") # linphone do not need them for the moment + diff --git a/prepare.py b/prepare.py index 7b8d7393a..cf35f4865 100755 --- a/prepare.py +++ b/prepare.py @@ -49,7 +49,11 @@ class IOSTarget(prepare.Target): self.config_file = 'configs/config-ios-' + arch + '.cmake' self.toolchain_file = 'toolchains/toolchain-ios-' + arch + '.cmake' self.output = 'liblinphone-sdk/' + arch + '-apple-darwin.ios' - self.external_source_path = os.path.join(current_path, 'submodules') + self.external_source_path = os.path.join(current_path, 'submodules') + external_builders_path = os.path.join(current_path, 'cmake_builder') + self.additional_args = [ + "-DLINPHONE_BUILDER_EXTERNAL_BUILDERS_PATH=" + external_builders_path + ] class IOSi386Target(IOSTarget): diff --git a/submodules/cmake-builder b/submodules/cmake-builder index 8560844ab..a6fcb1212 160000 --- a/submodules/cmake-builder +++ b/submodules/cmake-builder @@ -1 +1 @@ -Subproject commit 8560844abe7e5ad04721b23ca01e269cfa57f2bf +Subproject commit a6fcb1212de7e7b86ef339c61910b99419698006 From ae3f843f21518726986796b8463dc868bbf80f3d Mon Sep 17 00:00:00 2001 From: Christophe Deschamps Date: Wed, 31 Jan 2018 21:38:11 +0100 Subject: [PATCH 13/21] Do not remove proxy config --- linphone.xcodeproj/project.pbxproj | 38 ++++-------------------------- 1 file changed, 4 insertions(+), 34 deletions(-) diff --git a/linphone.xcodeproj/project.pbxproj b/linphone.xcodeproj/project.pbxproj index d10075176..879aee9f7 100755 --- a/linphone.xcodeproj/project.pbxproj +++ b/linphone.xcodeproj/project.pbxproj @@ -828,20 +828,6 @@ remoteGlobalIDString = FAB8A0141CAC546A00C6DFC1; remoteInfo = KIFFrameworkConsumerTests; }; - 8C8686D41FFE675F0044501F /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 630589F21B4E816900EFAE36 /* KIF.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 8CD87D4C1EF5105800ACA260; - remoteInfo = LinphoneManager; - }; - 8C8686D61FFE675F0044501F /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 630589F21B4E816900EFAE36 /* KIF.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 8CD87D541EF5105900ACA260; - remoteInfo = LinphoneManagerTests; - }; F08F119119C09C6B007D70C2 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */; @@ -2320,8 +2306,6 @@ 63058A071B4E816A00EFAE36 /* KIF.framework */, 633FC7C81CD7466400774B8B /* KIFFrameworkConsumer.app */, 633FC7CA1CD7466400774B8B /* KIFFrameworkConsumerTests.xctest */, - 8C8686D51FFE675F0044501F /* LinphoneManager.framework */, - 8C8686D71FFE675F0044501F /* LinphoneManagerTests.xctest */, ); name = Products; sourceTree = ""; @@ -3246,20 +3230,6 @@ remoteRef = 633FC7C91CD7466400774B8B /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; - 8C8686D51FFE675F0044501F /* LinphoneManager.framework */ = { - isa = PBXReferenceProxy; - fileType = wrapper.framework; - path = LinphoneManager.framework; - remoteRef = 8C8686D41FFE675F0044501F /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 8C8686D71FFE675F0044501F /* LinphoneManagerTests.xctest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = LinphoneManagerTests.xctest; - remoteRef = 8C8686D61FFE675F0044501F /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; /* End PBXReferenceProxy section */ /* Begin PBXResourcesBuildPhase section */ @@ -4606,7 +4576,7 @@ SDKROOT = iphoneos; STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = dynamic; TARGETED_DEVICE_FAMILY = "1,2"; - VALID_ARCHS = "arm64 armv7 i386 x86_64"; + VALID_ARCHS = "arm64 x86_64"; }; name = DistributionAdhoc; }; @@ -4705,7 +4675,7 @@ SDKROOT = iphoneos; STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = dynamic; TARGETED_DEVICE_FAMILY = "1,2"; - VALID_ARCHS = "arm64 armv7 i386 x86_64"; + VALID_ARCHS = "arm64 x86_64"; }; name = Release; }; @@ -4804,7 +4774,7 @@ SDKROOT = iphoneos; STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = dynamic; TARGETED_DEVICE_FAMILY = "1,2"; - VALID_ARCHS = "arm64 armv7 i386 x86_64"; + VALID_ARCHS = "arm64 x86_64"; }; name = Distribution; }; @@ -4905,7 +4875,7 @@ SDKROOT = iphoneos; STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = dynamic; TARGETED_DEVICE_FAMILY = "1,2"; - VALID_ARCHS = "arm64 armv7 i386 x86_64"; + VALID_ARCHS = "arm64 x86_64"; }; name = Debug; }; From 249e4eae7d4cab872e35074f01840f7581e0dce8 Mon Sep 17 00:00:00 2001 From: Brieuc Viel Date: Thu, 1 Feb 2018 14:28:28 +0100 Subject: [PATCH 14/21] [ContactParsing] update Contact loadData in ContactList to get faster parsing --- Classes/ContactsListTableView.m | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/Classes/ContactsListTableView.m b/Classes/ContactsListTableView.m index 40f8e7b3e..e5a3eaf4b 100644 --- a/Classes/ContactsListTableView.m +++ b/Classes/ContactsListTableView.m @@ -24,11 +24,13 @@ #import "Utils.h" @implementation ContactsListTableView +NSArray *sortedAddresses; #pragma mark - Lifecycle Functions - (void)initContactsTableViewController { addressBookMap = [[OrderedDictionary alloc] init]; + sortedAddresses = [[NSArray alloc] init]; [NSNotificationCenter.defaultCenter addObserver:self selector:@selector(onAddressBookUpdate:) @@ -129,16 +131,27 @@ static int ms_strcmpfuz(const char *fuzzy_word, const char *sentence) { - (void)loadData { _ongoing = TRUE; - LOGI(@"Load contact list"); + LOGI(@"====>>>> Load contact list - Start"); NSString* previous = [PhoneMainView.instance getPreviousViewName]; addressBookMap = [LinphoneManager.instance getLinphoneManagerAddressBookMap]; BOOL updated = [LinphoneManager.instance getContactsUpdated]; if(([previous isEqualToString:@"ContactsDetailsView"] && updated) || updated || [addressBookMap count] == 0){ [LinphoneManager.instance setContactsUpdated:FALSE]; @synchronized(addressBookMap) { + NSDictionary *allContacts = [[NSMutableDictionary alloc] initWithDictionary:LinphoneManager.instance.fastAddressBook.addressBookMap]; + sortedAddresses = [[LinphoneManager.instance.fastAddressBook.addressBookMap allKeys] sortedArrayUsingComparator:^NSComparisonResult(id a, id b) { + Contact* first = [allContacts objectForKey:a]; + Contact* second = [allContacts objectForKey:b]; + if([[first.firstName lowercaseString] compare:[second.firstName lowercaseString]] == NSOrderedSame) + return [[first.lastName lowercaseString] compare:[second.lastName lowercaseString]]; + else + return [[first.firstName lowercaseString] compare:[second.firstName lowercaseString]]; + }]; + + + LOGI(@"====>>>> Load contact list - Start 2 !!"); //Set all contacts from ContactCell to nil - for (NSInteger j = 0; j < [self.tableView numberOfSections]; ++j) - { + for (NSInteger j = 0; j < [self.tableView numberOfSections]; ++j){ for (NSInteger i = 0; i < [self.tableView numberOfRowsInSection:j]; ++i) { [[self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:i inSection:j]] setContact:nil]; @@ -147,7 +160,7 @@ static int ms_strcmpfuz(const char *fuzzy_word, const char *sentence) { // Reset Address book [addressBookMap removeAllObjects]; - for (NSString *addr in LinphoneManager.instance.fastAddressBook.addressBookMap) { + for (NSString *addr in sortedAddresses) { Contact *contact = nil; @synchronized(LinphoneManager.instance.fastAddressBook.addressBookMap) { contact = [LinphoneManager.instance.fastAddressBook.addressBookMap objectForKey:addr]; @@ -206,12 +219,13 @@ static int ms_strcmpfuz(const char *fuzzy_word, const char *sentence) { } [LinphoneManager.instance setLinphoneManagerAddressBookMap:addressBookMap]; } + LOGI(@"====>>>> Load contact list - End"); [super loadData]; _ongoing = FALSE; } - (void)loadSearchedData { - LOGI(@"Load contact list"); + LOGI(@"Load search contact list"); @synchronized(addressBookMap) { //Set all contacts from ContactCell to nil for (NSInteger j = 0; j < [self.tableView numberOfSections]; ++j) @@ -221,14 +235,13 @@ static int ms_strcmpfuz(const char *fuzzy_word, const char *sentence) { [[self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:i inSection:j]] setContact:nil]; } } - // Reset Address book [addressBookMap removeAllObjects]; NSMutableArray *subAr = [NSMutableArray new]; NSMutableArray *subArBegin = [NSMutableArray new]; NSMutableArray *subArContain = [NSMutableArray new]; [addressBookMap insertObject:subAr forKey:@"" selector:@selector(caseInsensitiveCompare:)]; - for (NSString *addr in LinphoneManager.instance.fastAddressBook.addressBookMap) { + for (NSString *addr in sortedAddresses) { @synchronized( LinphoneManager.instance.fastAddressBook.addressBookMap) { Contact *contact = From fc90f18d62bde1f4c2fe9a54df0c1471981128a4 Mon Sep 17 00:00:00 2001 From: Danmei Chen Date: Fri, 2 Feb 2018 10:13:38 +0100 Subject: [PATCH 15/21] update mediastreamer2 --- submodules/mediastreamer2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/mediastreamer2 b/submodules/mediastreamer2 index c72fb8e79..ccf9f4d79 160000 --- a/submodules/mediastreamer2 +++ b/submodules/mediastreamer2 @@ -1 +1 @@ -Subproject commit c72fb8e7994f1ccb61f89d77fdc9425df53a4033 +Subproject commit ccf9f4d79c76b9f8737e116d290616e4ced4c3e5 From 2f798fd48fc04fa92adc0d59ce28c5787400c5e6 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Mon, 5 Feb 2018 17:21:21 +0100 Subject: [PATCH 16/21] update bctoolbox --- submodules/bctoolbox | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/bctoolbox b/submodules/bctoolbox index a7778bc6f..25e640640 160000 --- a/submodules/bctoolbox +++ b/submodules/bctoolbox @@ -1 +1 @@ -Subproject commit a7778bc6f0e2f7d8c491543ab8fd8d2faa4fec15 +Subproject commit 25e640640000e2ea691c4eb6137e8edebf6b3a52 From fcae5844539daa17beb964b53f5d2cf92c778c99 Mon Sep 17 00:00:00 2001 From: Benjamin Reis Date: Tue, 6 Feb 2018 11:36:35 +0100 Subject: [PATCH 17/21] add logging info --- Classes/LinphoneAppDelegate.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Classes/LinphoneAppDelegate.m b/Classes/LinphoneAppDelegate.m index 95274f849..9a54ffac8 100644 --- a/Classes/LinphoneAppDelegate.m +++ b/Classes/LinphoneAppDelegate.m @@ -448,9 +448,10 @@ [LinphoneManager.instance startPushLongRunningTask:TRUE callId:callId]; } - // if we receive a remote notification, it is probably because our TCP background socket was no more working. + // if we receive a push notification, it is probably because our TCP background socket was no more working. // As a result, break it and refresh registers in order to make sure to receive incoming INVITE or MESSAGE if (!linphone_core_is_network_reachable(LC)) { + LOGI(@"Notification [%p] : network is down, restarting it.", userInfo); LinphoneManager.instance.connectivity = none; //Force connectivity to be discovered again [LinphoneManager.instance setupNetworkReachabilityCallback]; } From 7db24d7ef1277497e2192be03cd771a5f77a97dd Mon Sep 17 00:00:00 2001 From: Benjamin Reis Date: Wed, 7 Feb 2018 11:14:41 +0100 Subject: [PATCH 18/21] update linphone --- submodules/belle-sip | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/belle-sip b/submodules/belle-sip index 68f164801..dd5de8022 160000 --- a/submodules/belle-sip +++ b/submodules/belle-sip @@ -1 +1 @@ -Subproject commit 68f1648017dde65edc8cd8054016fa3486a2955b +Subproject commit dd5de8022ff5a1ef4ea2d4b2a5761658f1c6010c From 422d5d91a2ecabaaaf9db7aed39f2c7eb980867e Mon Sep 17 00:00:00 2001 From: Christophe Deschamps Date: Wed, 7 Feb 2018 12:20:34 +0100 Subject: [PATCH 19/21] Fetch organisation name for contact as used in displayName method. Crashes otherwise --- Classes/Utils/FastAddressBook.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/Utils/FastAddressBook.m b/Classes/Utils/FastAddressBook.m index 800c4c58a..7378e20b6 100644 --- a/Classes/Utils/FastAddressBook.m +++ b/Classes/Utils/FastAddressBook.m @@ -145,7 +145,7 @@ CNContactFamilyNameKey, CNContactGivenNameKey, CNContactNicknameKey, CNContactPostalAddressesKey, CNContactIdentifierKey, CNInstantMessageAddressUsernameKey, CNContactInstantMessageAddressesKey, - CNInstantMessageAddressUsernameKey, CNContactImageDataKey + CNInstantMessageAddressUsernameKey, CNContactImageDataKey, CNContactOrganizationNameKey ]; CNContactFetchRequest *request = [[CNContactFetchRequest alloc] initWithKeysToFetch:keysToFetch]; From b90513cdd35767521d81f1e6d06d62310caab788 Mon Sep 17 00:00:00 2001 From: Benjamin Reis Date: Thu, 8 Feb 2018 11:49:29 +0100 Subject: [PATCH 20/21] Revert "Do not remove proxy config" This reverts commit ae3f843f21518726986796b8463dc868bbf80f3d. --- linphone.xcodeproj/project.pbxproj | 38 ++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/linphone.xcodeproj/project.pbxproj b/linphone.xcodeproj/project.pbxproj index 879aee9f7..d10075176 100755 --- a/linphone.xcodeproj/project.pbxproj +++ b/linphone.xcodeproj/project.pbxproj @@ -828,6 +828,20 @@ remoteGlobalIDString = FAB8A0141CAC546A00C6DFC1; remoteInfo = KIFFrameworkConsumerTests; }; + 8C8686D41FFE675F0044501F /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 630589F21B4E816900EFAE36 /* KIF.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 8CD87D4C1EF5105800ACA260; + remoteInfo = LinphoneManager; + }; + 8C8686D61FFE675F0044501F /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 630589F21B4E816900EFAE36 /* KIF.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 8CD87D541EF5105900ACA260; + remoteInfo = LinphoneManagerTests; + }; F08F119119C09C6B007D70C2 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */; @@ -2306,6 +2320,8 @@ 63058A071B4E816A00EFAE36 /* KIF.framework */, 633FC7C81CD7466400774B8B /* KIFFrameworkConsumer.app */, 633FC7CA1CD7466400774B8B /* KIFFrameworkConsumerTests.xctest */, + 8C8686D51FFE675F0044501F /* LinphoneManager.framework */, + 8C8686D71FFE675F0044501F /* LinphoneManagerTests.xctest */, ); name = Products; sourceTree = ""; @@ -3230,6 +3246,20 @@ remoteRef = 633FC7C91CD7466400774B8B /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; + 8C8686D51FFE675F0044501F /* LinphoneManager.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = LinphoneManager.framework; + remoteRef = 8C8686D41FFE675F0044501F /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 8C8686D71FFE675F0044501F /* LinphoneManagerTests.xctest */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = LinphoneManagerTests.xctest; + remoteRef = 8C8686D61FFE675F0044501F /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; /* End PBXReferenceProxy section */ /* Begin PBXResourcesBuildPhase section */ @@ -4576,7 +4606,7 @@ SDKROOT = iphoneos; STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = dynamic; TARGETED_DEVICE_FAMILY = "1,2"; - VALID_ARCHS = "arm64 x86_64"; + VALID_ARCHS = "arm64 armv7 i386 x86_64"; }; name = DistributionAdhoc; }; @@ -4675,7 +4705,7 @@ SDKROOT = iphoneos; STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = dynamic; TARGETED_DEVICE_FAMILY = "1,2"; - VALID_ARCHS = "arm64 x86_64"; + VALID_ARCHS = "arm64 armv7 i386 x86_64"; }; name = Release; }; @@ -4774,7 +4804,7 @@ SDKROOT = iphoneos; STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = dynamic; TARGETED_DEVICE_FAMILY = "1,2"; - VALID_ARCHS = "arm64 x86_64"; + VALID_ARCHS = "arm64 armv7 i386 x86_64"; }; name = Distribution; }; @@ -4875,7 +4905,7 @@ SDKROOT = iphoneos; STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = dynamic; TARGETED_DEVICE_FAMILY = "1,2"; - VALID_ARCHS = "arm64 x86_64"; + VALID_ARCHS = "arm64 armv7 i386 x86_64"; }; name = Debug; }; From 4271d6a978d7f7c56859704aadb5a6222fe95b4c Mon Sep 17 00:00:00 2001 From: Benjamin Reis Date: Thu, 8 Feb 2018 12:00:32 +0100 Subject: [PATCH 21/21] update cmake bulder --- submodules/cmake-builder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/cmake-builder b/submodules/cmake-builder index a6fcb1212..e2fe49c93 160000 --- a/submodules/cmake-builder +++ b/submodules/cmake-builder @@ -1 +1 @@ -Subproject commit a6fcb1212de7e7b86ef339c61910b99419698006 +Subproject commit e2fe49c934beb86505391bc39189e1d5cc8e2b8b