79262199

Date: 2024-12-08 09:58:23
Score: 1
Natty:
Report link

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.

Reasons:
  • Blacklisted phrase (0.5): Thank you
  • Long answer (-1):
  • Has code block (-0.5):
  • User mentioned (1): @benoit-martins
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Mr Hery