diff --git a/Classes/LinphoneManager.m b/Classes/LinphoneManager.m index f6802c127..01f267f68 100644 --- a/Classes/LinphoneManager.m +++ b/Classes/LinphoneManager.m @@ -1846,7 +1846,7 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"], [[UIDevice currentDevice] name]]]; - linphone_core_set_user_agent(theLinphoneCore, device.UTF8String, "4.1-221-g241bbf9 (master)"); // TODO : update Linphone_sdk_version automatically + linphone_core_set_user_agent(theLinphoneCore, device.UTF8String, LINPHONE_SDK_VERSION); _contactSipField = [self lpConfigStringForKey:@"contact_im_type_value" inSection:@"sip" withDefault:@"SIP"]; diff --git a/Podfile b/Podfile index 4c19c8d47..757d0f9ee 100644 --- a/Podfile +++ b/Podfile @@ -81,6 +81,15 @@ target 'richNotifications' do end post_install do |installer| + # Get the version of linphone-sdk + installer.pod_targets.each do |target| + if target.pod_name == 'linphone-sdk' + target.specs.each do |spec| + $linphone_sdk_version = spec.version + end + end + end + app_project = Xcodeproj::Project.open(Dir.glob("*.xcodeproj")[0]) app_project.native_targets.each do |target| if target.name == 'linphone' @@ -99,6 +108,9 @@ post_install do |installer| config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] = '$(inherited) USE_CRASHLYTHICSS=1' end end + + config.build_settings['OTHER_CFLAGS'] = '$(inherited) -DBCTBX_LOG_DOMAIN=\"ios\" -DCHECK_VERSION_UPDATE=FALSE -DENABLE_QRCODE=TRUE -DENABLE_SMS_INVITE=TRUE',"-DLINPHONE_SDK_VERSION=\\\"#{$linphone_sdk_version}\\\"" + app_project.save end end