No description
Find a file
2015-10-02 11:27:01 +02:00
.tx i10n: add Settings page to translatable resources 2015-04-20 14:39:55 +02:00
Classes FileTransferDelegate: stop reffing / unreffing chat messages in file transfer, this is not needed 2015-09-23 17:19:48 +02:00
LiblinphoneTester LiblinphoneTester: automatic scrolling during tests 2015-09-28 15:30:12 +02:00
linphone.xcodeproj xcode: remove unused static libraries 2015-09-25 15:20:03 +02:00
Resources ios9: fix project compilation for xcode7/ios9 and disable bitcode for yet. Warning: VPX build is broken yet 2015-09-18 12:31:12 +02:00
Settings/InAppSettings.bundle linphonerc: remove sharing_server_preference and use file_transfer_server_url to comply with liblinphone 2015-09-16 10:54:24 +02:00
submodules submodules: update cmake-builder 2015-10-01 17:18:12 +02:00
TestsLiblinphone ios9: fix project compilation for xcode7/ios9 and disable bitcode for yet. Warning: VPX build is broken yet 2015-09-18 12:31:12 +02:00
TestsUI travis: increase registration timeout 2015-10-02 11:27:01 +02:00
Tools travis: increase registration timeout 2015-10-02 11:27:01 +02:00
TutorialHellowWorld xcode: fix tutorial and liblinphone projects and add them to CI to avoid this in the future 2015-09-30 10:19:35 +02:00
.clang-format .clang-format: indent switch cases 2015-07-16 12:00:01 +02:00
.git-pre-commit .git-pre-commit: quit gracefully if clang-format is not found instead of erroring 2015-06-17 14:47:21 +02:00
.gitignore prepare.py: remove transient unused "libs" target, cleanup make help and fix make ipa generation 2015-09-03 10:37:09 +02:00
.gitmodules submodules: use our vpx copy to fix ios9 build 2015-09-22 14:55:07 +02:00
.travis.yml travis: stop --depth 1 for submodules, it won't work yet 2015-09-23 15:37:18 +02:00
iTunesArtwork iTunesArtwork must be at the root directory level 2012-12-14 08:17:51 +01:00
LICENCE Tests: restructure tests folder to get a constistent name convention 2015-07-09 14:03:31 +02:00
linphone-Info.plist ios9: fix project compilation for xcode7/ios9 and disable bitcode for yet. Warning: VPX build is broken yet 2015-09-18 12:31:12 +02:00
linphone_Prefix.pch ios9: fix project compilation for xcode7/ios9 and disable bitcode for yet. Warning: VPX build is broken yet 2015-09-18 12:31:12 +02:00
main.m clangformat: reformat all code style convention defined in .clang-format 2015-07-09 11:50:14 +02:00
prepare.py prepare.py: allow Xcode target and fix Tutorial project 2015-09-29 13:58:21 +02:00
README.md prepare.py: add option --enable-non-free-codecs and --enable-gpl-third-parties, remove HAVE_* options from Xcode project since there are now automatically stubbed by the SDK 2015-08-27 15:32:45 +02:00

Build Status

Linphone is a free VoIP and video softphone based on the SIP protocol.

Dialer screenshot

Getting started

Here's how to launch Linphone for iPhone (more details below):

  1. Install Xcode from AppStore.
  2. Install HomeBrew, a package manager for OS X (MacPorts is supported but deprecated).
  3. Install Linphone dependencies: open iTerm.app in the current directory and list dependencies to install using: ./prepare.py
  4. Build SDK (see below for options and explanations): ./prepare.py -c && ./prepare.py && make
  5. Open linphone.xcodeproj in Xcode: open linphone.xcodeproj
  6. Press ⌘R and voilà!

Building the SDK

Linphone for iPhone depends on liblinphone SDK. This SDK is generated from makefiles and shell scripts.

To generate the liblinphone multi-arch SDK in GPL mode, simply invoke:

    ./prepare.py [options] && make

The resulting SDK is located in liblinphone-sdk/ root directory.

Licensing: GPL third parties versus non GPL third parties

This SDK can be generated in 2 flavors:

  • GPL third parties enabled means that liblinphone includes GPL third parties like FFmpeg or X264. If you choose this flavor, your final application must comply with GPL in any case. This is the default mode.

  • NO GPL third parties means that Linphone will only use non GPL code except for liblinphone, mediastreamer2, oRTP and belle-sip. If you choose this flavor, your final application is still subject to GPL except if you have a commercial license for the mentioned libraries. To generate the liblinphone multi arch SDK without GPL third parties, invoke:

      ./prepare.py --disable-gpl-third-parties=no [other options] && make
    

Customizing features

You can enable all non-free codecs using --enable-non-free-codecs. You can also choose to enable/disable features one by one (custom audio/video codecs, media encryption, etc.). To get a list of all features, the simplest way is to invoke prepare.py with --list-features:

    ./prepare.py --list-features

You can for instance enable X264 by using:

    ./prepare.py -DENABLE_X264=ON [other options]

Built architectures

4 architectures currently exists on iOS:

  • 64 bits ARM64 for iPhone 5s, iPad Air, iPad mini 2, iPhone 6, iPhone 6 Plus, iPad Air 2, iPad mini 3.
  • 32 bits ARMv7 for older devices.
  • 64 bits x86_64 for simulator for all ARM64 devices.
  • 32 bits i386 for simulator for all ARMv7 older devices.

Note: We are not compiling for the 32 bits i386 simulator by default because Xcode default device (iPhone 6) runs in 64 bits. If you want to enable it, you should invoke prepare.py with i386 argument: ./prepare.py i386 [other options].

Upgrading your iOS SDK

Simply re-invoking make should update your SDK. If compilation fails, you may need to rebuilding everything by invoking:

    ./prepare.py -c && ./prepare.py [options] && make

Building the application

After the SDK is built, just open the Linphone Xcode project with Xcode, and press Run.

Note regarding third party components subject to license

The liblinphone SDK is compiled with third parties code that are subject to patent license, specially: AMR, SILK G729 and H264 codecs. Linphone controls the embedding of these codecs by generating dummy libraries when there are not available. You can enable them using prepare.py script (see --enable-non-free-codecs option). Before embedding these 4 codecs in the final application, make sure to have the right to do so.

Testing the application

We are using the KIF framework to test the UI of Linphone. It is used as a submodule (instead of CocoaPods) for ease.

Simply press ⌘U and the default simulator / device will launch and try to pass all the tests.

Limitations and known bugs

  • Video capture will not work in simulator (not implemented in it).

Debugging the SDK

Sometime it can be useful to step into liblinphone SDK functions. To allow Xcode to enable breakpoint within liblinphone, SDK must be built with debug symbols by using option --debug:

    ./prepare.py --debug [other options] && make

Debugging mediastreamer2

For iOS specific media development like audio video capture/playback it may be interesting to use mediastream test tool. The project submodule/liblinphone.xcodeproj can be used for this purpose.

Quick UI reference

  • The app is contained in a window, which resides in the MainStoryboard file.
  • The delegate is set to LinphoneAppDelegate in main.m, in the UIApplicationMain() by passing its class
  • Basic layout:

MainStoryboard | | (rootViewController) | PhoneMainView ---> view #--> app background | | | #--> statusbar background | | (mainViewController) | UICompositeViewController : TPMultilayout | #---> view #--> stateBar | #--> contentView | #--> tabBar

When the application is started, the phoneMainView gets asked to transition to the Dialer view or the Wizard view. PhoneMainView exposes the -changeCurrentView: method, which will setup its Any Linphone view is actually presented in the UICompositeViewController, with or without a stateBar and tabBar.

The UICompositeViewController consists of 3 areas laid out vertically. From top to bottom: StateBar, Content and TabBar. The TabBar is usually the UIMainBar, which is used as a navigation controller: clicking on each of the buttons will trigger a transition to another "view".