From 13647bab39ff297dc3a9f25fc49eff7b466d7a76 Mon Sep 17 00:00:00 2001 From: EDSGH Date: Tue, 7 Feb 2017 17:04:56 -0800 Subject: [PATCH 1/6] Corrected BUILDING.md and MAINTAINING.md instructions so new developers will have a successful build in XCode. Current instructions from BUILDING.md were not current and incomplete nor referenced MAINTAINING.md. --- BUILDING.md | 41 +++++++++++++++++++++++++++++++++++++---- MAINTAINING.md | 37 +------------------------------------ 2 files changed, 38 insertions(+), 40 deletions(-) diff --git a/BUILDING.md b/BUILDING.md index 2767c3aab..04badb278 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -22,27 +22,60 @@ sudo gem update carthage update ``` If you don't have carthage, here are install instructions: + ``` + https://github.com/Carthage/Carthage#installing-carthage + ``` -4) Open the `Signal.xcworkspace` in Xcode. +4) We don't currently have an automated build (cocoapod/carthage) setup for +the WebRTC.framework and we need the libraries for a successful XCode build. +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/ + + +5) Open the `Signal.xcworkspace` in Xcode. ``` open Signal.xcworkspace + ``` -5) In the Signal target on the General tab, change the Team drop down to your own. On the Capabilities tab turn off Push Notifications and Data Protection. Only Background Modes should remain on. +6) In the Signal target on the General tab, change the Team drop down to your own. On the Capabilities tab turn off Push Notifications and Data Protection. Only Background Modes should remain on. -6) Some of our build scripts, like running tests, expect your Derived +7) Some of our build scripts, like running tests, expect your Derived Data directory to be `$(PROJECT_DIR)/build`. In Xcode, go to `Preferences-> Locations`, and set the "Derived Data" dropdown to "Relative" and the text field value to "build". -7) Build and Run and you are ready to go! +8) Build and Run and you are ready to go! ## Known issues 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. +If you would like to contribute a transation please read the MAINTAINING.md file in this directory. diff --git a/MAINTAINING.md b/MAINTAINING.md index 68fbe7482..5c1a3ede1 100644 --- a/MAINTAINING.md +++ b/MAINTAINING.md @@ -1,43 +1,8 @@ -Apart from the general `BUILDING.md` there are certain things that have +qApart from the general `BUILDING.md` there are certain things that have to be done by Signal-iOS maintainers. For transperancy and bus factor, they are outlined here. -## Dependencies - -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/ - ## Translations Read more about translations in [TRANSLATIONS.md](signal/translations/TRANSLATIONS.md) From 98a57d69c7e4ad4f9771c0b8c0e9b9410d21fa6c Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Mon, 13 Feb 2017 09:35:54 -0500 Subject: [PATCH 2/6] Revert "Corrected BUILDING.md and MAINTAINING.md instructions so new developers will have a successful build in XCode. Current instructions from BUILDING.md were not current and incomplete nor referenced MAINTAINING.md." This reverts commit 13647bab39ff297dc3a9f25fc49eff7b466d7a76. --- BUILDING.md | 41 ++++------------------------------------- MAINTAINING.md | 37 ++++++++++++++++++++++++++++++++++++- 2 files changed, 40 insertions(+), 38 deletions(-) diff --git a/BUILDING.md b/BUILDING.md index 04badb278..2767c3aab 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -22,60 +22,27 @@ sudo gem update carthage update ``` If you don't have carthage, here are install instructions: - ``` - https://github.com/Carthage/Carthage#installing-carthage - ``` -4) We don't currently have an automated build (cocoapod/carthage) setup for -the WebRTC.framework and we need the libraries for a successful XCode build. -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/ - - -5) Open the `Signal.xcworkspace` in Xcode. +4) Open the `Signal.xcworkspace` in Xcode. ``` open Signal.xcworkspace - ``` -6) In the Signal target on the General tab, change the Team drop down to your own. On the Capabilities tab turn off Push Notifications and Data Protection. Only Background Modes should remain on. +5) In the Signal target on the General tab, change the Team drop down to your own. On the Capabilities tab turn off Push Notifications and Data Protection. Only Background Modes should remain on. -7) Some of our build scripts, like running tests, expect your Derived +6) Some of our build scripts, like running tests, expect your Derived Data directory to be `$(PROJECT_DIR)/build`. In Xcode, go to `Preferences-> Locations`, and set the "Derived Data" dropdown to "Relative" and the text field value to "build". -8) Build and Run and you are ready to go! +7) Build and Run and you are ready to go! ## Known issues 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. -If you would like to contribute a transation please read the MAINTAINING.md file in this directory. diff --git a/MAINTAINING.md b/MAINTAINING.md index 5c1a3ede1..68fbe7482 100644 --- a/MAINTAINING.md +++ b/MAINTAINING.md @@ -1,8 +1,43 @@ -qApart from the general `BUILDING.md` there are certain things that have +Apart from the general `BUILDING.md` there are certain things that have to be done by Signal-iOS maintainers. For transperancy and bus factor, they are outlined here. +## Dependencies + +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/ + ## Translations Read more about translations in [TRANSLATIONS.md](signal/translations/TRANSLATIONS.md) From 602fbcfb80b37cbb9fcb1084888b615bc9de18fd Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Tue, 31 Jan 2017 12:26:19 -0500 Subject: [PATCH 3/6] Slightly revise Carthage build instructions. // FREEBIE --- BUILDING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BUILDING.md b/BUILDING.md index 2767c3aab..71c122e99 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -19,7 +19,7 @@ sudo gem update 3) Some dependencies are added via carthage. Run: ``` -carthage update +carthage checkout ``` If you don't have carthage, here are install instructions: ``` From 12dabd004ddb40933320ba008608e2d1f31e4c4e Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Tue, 31 Jan 2017 12:34:22 -0500 Subject: [PATCH 4/6] Refine Carthage instructions. // FREEBIE --- BUILDING.md | 1 + 1 file changed, 1 insertion(+) diff --git a/BUILDING.md b/BUILDING.md index 71c122e99..b44882e43 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -20,6 +20,7 @@ sudo gem update 3) Some dependencies are added via carthage. Run: ``` carthage checkout +carthage build ``` If you don't have carthage, here are install instructions: ``` From f02d325952ab011abda6e85c88f24b2f5f0b2d81 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Fri, 10 Feb 2017 14:40:39 -0500 Subject: [PATCH 5/6] Update the Carthage submodule. // FREEBIE --- Carthage | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Carthage b/Carthage index 74ffe85a9..6b7d2c33e 160000 --- a/Carthage +++ b/Carthage @@ -1 +1 @@ -Subproject commit 74ffe85a9a0b0cd557220c0a7c6b019db85787fd +Subproject commit 6b7d2c33e274c26b13d3511fbd8b52b50401737a From 9e7ca5d87cd899d2165b4fadd4dbb70a015f6ab8 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Fri, 10 Feb 2017 14:57:00 -0500 Subject: [PATCH 6/6] 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 b44882e43..3f77b20aa 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 68fbe7482..c7bcbabfc 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