get the version of linphone-sdk

This commit is contained in:
Danmei Chen 2019-04-08 11:22:22 +02:00
parent b35c949a87
commit 62d80ce36c
2 changed files with 13 additions and 1 deletions

View file

@ -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"];

12
Podfile
View file

@ -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