I am creating a voip call based project with Linphone and I have also successfully build and run the Linphone project and successfully run audio and video call. Now I am integra
With Xcode 11 using macos 10.15.6 Catalina
https://github.com/BelledonneCommunications/linphone-sdk/blob/master/README.md
Using a local linphone SDK Clone the linphone-sdk repository from out gitlab:
$ git clone https://gitlab.linphone.org/BC/public/linphone-sdk.git --recursive
$ git submodule update --init --recursive
Or
$ git clone --recurse-submodules https://gitlab.linphone.org/BC/public/linphone-sdk.git
Rebuild the project:
PODFILE_PATH= pod install where is your build directory of the linphone-sdk project, containing the linphone-sdk.podspec file and a linphone-sdk ouptut directory comprising built frameworks and resources.
Pod file looks like
source "https://gitlab.linphone.org/BC/public/podspec.git"
source "https://github.com/CocoaPods/Specs.git"
def common_pods
use_frameworks!
pod 'linphone-sdk', '4.4.0'
end
Then open linphone.xcworkspace with Xcode to build and run the app.
$ git clone https://gitlab.linphone.org/BC/public/linphone-sdk.git -- recursive
$ git submodule update --init --recursive
Or
$ git clone --recurse-submodules https://gitlab.linphone.org/BC/public/linphone-sdk.git
Goto the build directory
$ mkdir build && cd build
———————————
https://gitlab.linphone.org/BC/public/linphone-cmake-builder/blob/ios-3.13.19/README.python.md
first, install brew
$ brew install cmake
$ brew install yasm
$ brew install pkg-config
Install pip ->
$ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
$ python get-pip.py
$ python -m pip install pystache //Check by $ python -m pip list
$ brew install doxygen
———————————
$ cmake .. -G Xcode -DLINPHONESDK_PLATFORM=IOS -DENABLE_G729=YES -DENABLE_G729B_CNG=YES -DENABLE_VCARD=OFF -DENABLE_ILBC=OFF -DENABLE_SILK=OFF -DENABLE_ISAC=OFF -DENABLE_MKV=OFF -DENABLE_GSM=OFF -DENABLE_DOC=OFF -DENABLE_UNIT_TESTS=OFF -DENABLE_LIME=OFF -DENABLE_GPL_THIRD_PARTIES=OFF -DENABLE_NON_FREE_CODECS=OFF
Note - in this step we will also enable G729 dedec support in our linphone sdk.
$ cmake --build . --config RelWithDebInfo
The compilation process is done now need to integrate with Xcode
Find compiled sdk in below directory linphone-sdk -> build -> linphone-sdk -> apple-darwin
6 (Optional). If experience script causes application crash due to fat library used our project, There is a minor change in the script, I found a solution from this URL - Errors building Xcode Project after adding in Run Script fatal error: lipo: input file
APP_PATH="${TARGET_BUILD_DIR}/${WRAPPER_NAME}"
find "$APP_PATH" -name '*.framework' -type d | while read -r FRAMEWORK
do
FRAMEWORK_EXECUTABLE_NAME=$(defaults read "$FRAMEWORK/Info.plist" CFBundleExecutable)
FRAMEWORK_EXECUTABLE_PATH="$FRAMEWORK/$FRAMEWORK_EXECUTABLE_NAME"
echo "Executable is $FRAMEWORK_EXECUTABLE_PATH"
# Start of Script modify - identify if the framework is FAT. If it is, then it skips it.
if [ ! -f "${FRAMEWORK_EXECUTABLE_PATH}" ]; then
continue
fi
if xcrun lipo -info "${FRAMEWORK_EXECUTABLE_PATH}" | grep --silent "Non-fat"; then
echo "Framework non-fat, skipping: $FRAMEWORK_EXECUTABLE_NAME"
continue
fi
echo "Thinning framework $FRAMEWORK_EXECUTABLE_NAME"
# end of Script modify
EXTRACTED_ARCHS=()
for ARCH in $ARCHS
do
echo "Extracting $ARCH from $FRAMEWORK_EXECUTABLE_NAME"
lipo -extract "$ARCH" "$FRAMEWORK_EXECUTABLE_PATH" -o "$FRAMEWORK_EXECUTABLE_PATH-$ARCH"
EXTRACTED_ARCHS+=("$FRAMEWORK_EXECUTABLE_PATH-$ARCH")
done
echo "Merging extracted architectures: ${ARCHS}"
lipo -o "$FRAMEWORK_EXECUTABLE_PATH-merged" -create "${EXTRACTED_ARCHS[@]}"
rm "${EXTRACTED_ARCHS[@]}"
echo "Replacing original executable with thinned version"
rm "$FRAMEWORK_EXECUTABLE_PATH"
mv "$FRAMEWORK_EXECUTABLE_PATH-merged" "$FRAMEWORK_EXECUTABLE_PATH"
done
Note: If your case was Adding script causes app crash as I mentioned in 6th point but every time adding the script, have to pod de integrate help me avoid it.
:) Now enjoy using linphone sdk in your project.
#Update - add 5th point fo compile for upload the app to the app store and G729 codec configuration.
LinphoneManager class already include many useful features - like good watch and use of linphone core with good logging and etc and etc, but not all of them (unfortunately).