Git Product home page Git Product logo

fengjixuchui / telegram-ios Goto Github PK

View Code? Open in Web Editor NEW

This project forked from telegrammessenger/telegram-ios

0.0 0.0 0.0 600.56 MB

Telegram-iOS

Swift 32.35% Objective-C 9.31% C 52.71% Shell 0.09% Python 0.06% Objective-C++ 1.03% C++ 0.20% HTML 0.01% JavaScript 0.01% GLSL 0.01% Starlark 0.24% Makefile 0.63% Perl 0.12% CSS 0.01% Assembly 3.22% Coq 0.01% Cuda 0.02% Roff 0.01% Awk 0.01% Ruby 0.01%

telegram-ios's Introduction

Telegram iOS Source Code Compilation Guide

We welcome all developers to use our API and source code to create applications on our platform. There are several things we require from all developers for the moment.

Creating your Telegram Application

  1. Obtain your own api_id for your application.
  2. Please do not use the name Telegram for your app โ€” or make sure your users understand that it is unofficial.
  3. Kindly do not use our standard logo (white paper plane in a blue circle) as your app's logo.
  4. Please study our security guidelines and take good care of your users' data and privacy.
  5. Please remember to publish your code too in order to comply with the licences.

Compilation Guide

  1. Install Xcode (directly from https://developer.apple.com/download/more or using the App Store).
  2. Clone the project from GitHub:
git clone --recursive -j8 https://github.com/TelegramMessenger/Telegram-iOS.git
  1. Download Bazel 4.0.0
mkdir -p $HOME/bazel-dist
cd $HOME/bazel-dist
curl -O -L https://github.com/bazelbuild/bazel/releases/download/4.0.0/bazel-4.0.0-darwin-x86_64
mv bazel-* bazel

Verify that it's working

chmod +x bazel
./bazel --version
  1. Adjust configuration parameters
mkdir -p $HOME/telegram-configuration
cp -R build-system/example-configuration/* $HOME/telegram-configuration/
  • Modify the values in variables.bzl
  • Replace the provisioning profiles in provisioning with valid files
  1. (Optional) Create a build cache directory to speed up rebuilds
mkdir -p "$HOME/telegram-bazel-cache"
  1. Build the app
python3 build-system/Make/Make.py \
    --bazel="$HOME/bazel-dist/bazel" \
    --cacheDir="$HOME/telegram-bazel-cache" \
    build \
    --configurationPath="$HOME/telegram-configuration" \
    --buildNumber=100001 \
    --configuration=release_universal
  1. (Optional) Generate an Xcode project
python3 build-system/Make/Make.py \
    --bazel="$HOME/bazel-dist/bazel" \
    --cacheDir="$HOME/telegram-bazel-cache" \
    generateProject \
    --configurationPath="$HOME/telegram-configuration" \
    --disableExtensions

It is possible to generate a project that does not require any codesigning certificates to be installed: add --disableProvisioningProfiles flag:

python3 build-system/Make/Make.py \
    --bazel="$HOME/bazel-dist/bazel" \
    --cacheDir="$HOME/telegram-bazel-cache" \
    generateProject \
    --configurationPath="$HOME/telegram-configuration" \
    --disableExtensions \
    --disableProvisioningProfiles

Tip: use --disableExtensions when developing to speed up development by not building application extensions and the WatchOS app.

Tips

Bazel is used to build the app. To simplify the development setup a helper script is provided (build-system/Make/Make.py). See help:

python3 build-system/Make/Make.py --help
python3 build-system/Make/Make.py build --help
python3 build-system/Make/Make.py generateProject --help

Each release is built using specific Xcode and Bazel versions (see versions.json). The helper script checks the versions of installed software and reports an error if they don't match the ones specified in versions.json. There are flags that allow to bypass these checks:

python3 build-system/Make/Make.py --overrideBazelVersion build ... # Don't check the version of Bazel
python3 build-system/Make/Make.py --overrideXcodeVersion build ... # Don't check the version of Xcode

telegram-ios's People

Contributors

aaronschubert0 avatar adlai-holler avatar appleguy avatar ashtom avatar buba447 avatar derandereandi avatar diederich avatar eanagel avatar ejensen avatar eke avatar frayxrulez avatar garrettmoon avatar grishka avatar hannahmbanana avatar hermet avatar john-preston avatar laktyushin avatar lappp9 avatar levi avatar lumaxis avatar maicki avatar matkovivan avatar nguyenhuy avatar overtake avatar petertechstories avatar rcancro avatar rnystrom avatar secretiverhyme avatar smohantty avatar tewha avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.