xcodeswiftuilinphone

Linphone SDK: Library not loaded: @rpath/liblibbelle-sip-tester.dylib


I faced the this issue since upgrade to xcode 16 and running on device ios18.

I have done few work out from ChatGPT and StackOverflow, seems nothing fixed the issues.

Here's are few thing I done but still fail (just to make sure no one shares the same non-workout solution):

  1. Change the Always Embed Swift Standard Libraries to YES.
  2. Add the linphonetester.xcfromework in the list of embedded binaries.
  3. Upgrade all dependencies to ios13 or ios15
  4. Re-install & restart xcode
  5. Add runpath @executable_path/Frameworks
  6. Add other linker flag -rpath @executable_path/Frameworks

These step I followed, but nothings worked out. Its been almost 2 weeks from the update to xcode 16.

Here's the podfile:

platform :ios, '15.6'
source "https://gitlab.linphone.org/BC/public/podspec.git"
source "https://github.com/CocoaPods/Specs.git"

def basic_pods
    pod 'linphone-sdk', '> 5.4.0-alpha'
end

target 'MyApp' do
  use_frameworks!
  
  pod 'SQLite.swift', '~> 0.14.0'
  
  basic_pods
  
  pod 'ModalPresenter'
  pod "Firebase"
  pod 'Firebase/Core'
  pod 'Firebase/Messaging'
end

I have posted issues on the official linphone github repos, but seems no replies yet.


Solution

  • Here's my walk-through base on @benoit-martins (linphone github) suggestion and it works very well. Thank you!

    Walkthrough: Setting Up Linphone SDK for iOS with CocoaPods

    Prerequisites

    Ensure you have the following installed on your system:


    Step-by-Step Guide

    1. Clone and Prepare the SDK Repository

    1. Clone the SDK repository to your local machine:
      cd /Users/<YOUR USERNAME>
      git clone https://gitlab.linphone.org/BC/public/linphone-sdk.git
      cd linphone-sdk
      
    2. Update the repository and its submodules:
      git pull
      git submodule update --init --recursive
      

    2. Set Up Python Environment

    1. Upgrade pip:
      python3 -m pip install --upgrade pip
      
    2. Create and activate a virtual environment:
      python3 -m venv venv
      source venv/bin/activate
      
    3. Install the required Python modules:
      pip install pystache six
      
    4. Confirm the modules are installed:
      pip list
      

    3. Build the iOS SDK

    1. Run the cmake command (inside the activated virtual environment):
      cmake --preset=ios-sdk -G Ninja -B IOS_64_RELEASE \
        -DPYTHON_EXECUTABLE=$(which python3) \
        -DENABLE_PQCRYPTO=YES \
        -DLINPHONESDK_IOS_ARCHS=arm64 \
        -DENABLE_NON_FREE_FEATURES=YES \
        -DENABLE_GPL_THIRD_PARTIES=YES \
        -DENABLE_G729=YES \
        -DCMAKE_CONFIGURATION_TYPES=ReleaseWithDebInfo
      
    2. Build the SDK:
      cmake --build IOS_64_RELEASE --config RelWithDebInfo -j5
      

    4. Verify the Build Output

    Check if the build output exists at the following path:

    /Users/<YOUR USERNAME>/linphone-sdk/IOS_64_RELEASE
    

    The folder should contain the linphone-sdk.podspec file.


    5. Configure Your CocoaPods Podfile

    1. Edit your Podfile to include the local build of Linphone SDK:
      platform :ios, '15.6'
      source "https://github.com/CocoaPods/Specs.git"
      
      def basic_pods
        pod 'linphone-sdk', :path => '/Users/<YOUR USERNAME>/linphone-sdk/IOS_64_RELEASE'
      end
      
      target 'MyAppLinphone' do
        use_frameworks!
      
        pod 'SQLite.swift', '~> 0.14.0'
        pod 'ModalPresenter'
        pod "Firebase"
        pod 'Firebase/Core'
        pod 'Firebase/Messaging'
      
        basic_pods
      end
      

    6. Install CocoaPods Dependencies

    Navigate to your project directory where the Podfile is located and run:

    pod upgrade
    pod install
    

    7. Test Your Application

    Run your app to verify the integration works successfully.