From 9e7ca5d87cd899d2165b4fadd4dbb70a015f6ab8 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Fri, 10 Feb 2017 14:57:00 -0500 Subject: [PATCH] Refine Carthage instructions. // FREEBIE --- BUILDING.md | 33 +++++++++++++++++++++++++++++++-- MAINTAINING.md | 31 +++---------------------------- 2 files changed, 34 insertions(+), 30 deletions(-) diff --git a/BUILDING.md b/BUILDING.md index b44882e4328..3f77b20aaf5 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -17,11 +17,15 @@ occasionally, CocoaPods itself will need to be updated. Do this with sudo gem update ``` -3) Some dependencies are added via carthage. Run: +3) Some dependencies are added via carthage. However, our prebuilt WebRTC.framework also resides in the Carthage directory. + +Run: ``` -carthage checkout +// DO NOT run: `carthage update` or `carthage checkout`. +git submodule update --init carthage build ``` + If you don't have carthage, here are install instructions: ``` https://github.com/Carthage/Carthage#installing-carthage @@ -46,4 +50,29 @@ value to "build". Features related to push notifications are known to be not working for third-party contributors since Apple's Push Notification service pushs will only work with Open Whisper Systems production code signing certificate. +### Building WebRTC + +A prebuilt version of WebRTC.framework resides in our Carthage submodule (see above). +However, if you'd like to build it from souce, this is how it's done. + +These instructions are derived from the WebRTC documentation: + +https://webrtc.org/native-code/ios/ + + # 1. Install depot tools + cd + git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git + cd depot_tools + export PATH=/depot_tools:"$PATH" + # 2. Fetch webrtc source + cd + mkdir webrtc + cd webrtc + fetch --nohooks webrtc_ios + gclient sync + # 3. Build webrtc + cd src + webrtc/build/ios/build_ios_libs.sh + # 4. Move the WebRTC.framework into Signal-iOS's Carthage directory + mv out_ios_libs/WebRTC.framework /Carthage/Build/iOS/ diff --git a/MAINTAINING.md b/MAINTAINING.md index 68fbe7482bc..c7bcbabfcaf 100644 --- a/MAINTAINING.md +++ b/MAINTAINING.md @@ -9,34 +9,9 @@ Keeping cocoapods based dependencies is easy enough. `pod update` -### WebRTC - -We don't currently have an automated build (cocoapod/carthage) setup for -the WebRTC.framework. Instead, read the WebRTC upstream source and build -setup instructions here: - -https://webrtc.org/native-code/ios/ - -Once you have your build environment set up and the WebRTC source downloaded: - - # The specific set of commands that worked for me were somewhat different. - # 1. Install depot tools - cd - git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git - cd depot_tools - export PATH=/depot_tools:"$PATH" - # 2. Fetch webrtc source - cd - mkdir webrtc - cd webrtc - fetch --nohooks webrtc_ios - gclient sync - # 3. Build webrtc - # NOTE: build_ios_libs.sh only worked for me from inside "src" - cd src - webrtc/build/ios/build_ios_libs.sh - # NOTE: It's Carthage/Build/iOS, not Carthage/Builds - mv out_ios_libs/WebRTC.framework ../../Signal-iOS/Carthage/Build/iOS/ +Similarly, Carthage dependencies can be updated like so: + +`carthage update` ## Translations