summaryrefslogtreecommitdiff
path: root/protocols/Telegram/tdlib/td/example/ios/README.md
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2022-11-30 17:48:47 +0300
committerGeorge Hazan <ghazan@miranda.im>2022-11-30 17:48:47 +0300
commit0ece30dc7c0e34b4c5911969b8fa99c33c6d023c (patch)
tree671325d3fec09b999411e4e3ab84ef8259261818 /protocols/Telegram/tdlib/td/example/ios/README.md
parent46c53ffc6809c67e4607e99951a2846c382b63b2 (diff)
Telegram: update for TDLIB
Diffstat (limited to 'protocols/Telegram/tdlib/td/example/ios/README.md')
-rw-r--r--protocols/Telegram/tdlib/td/example/ios/README.md31
1 files changed, 18 insertions, 13 deletions
diff --git a/protocols/Telegram/tdlib/td/example/ios/README.md b/protocols/Telegram/tdlib/td/example/ios/README.md
index 25a1e68fcc..00d4312be4 100644
--- a/protocols/Telegram/tdlib/td/example/ios/README.md
+++ b/protocols/Telegram/tdlib/td/example/ios/README.md
@@ -1,18 +1,19 @@
-# Build for iOS
+# Universal XCFramework build example
Below are instructions for building TDLib for iOS, watchOS, tvOS, and also macOS.
-If you need only a macOS build, take a look at our build instructions for [macOS](https://github.com/tdlib/td#macos).
+If you need only a macOS build for the current architecture, take a look at [TDLib build instructions generator](https://tdlib.github.io/td/build.html).
For example of usage take a look at our [Swift example](https://github.com/tdlib/td/tree/master/example/swift).
To compile `TDLib` you will need to:
-* Install the latest Xcode command line tools.
-* Install other build dependencies, for example, using [Homebrew](https://brew.sh):
+* Install the latest Xcode via `xcode-select --install` or downloading it from [Xcode website](https://developer.apple.com/xcode/).
+ It is not enough to install only command line developer tools to build `TDLib` for iOS.
+* Install other build dependencies using [Homebrew](https://brew.sh):
```
-brew install gperf cmake
+brew install gperf cmake coreutils
```
-* If you don't want to build `TDLib` for macOS, you can pregenerate required source code files using CMake prepare_cross_compiling target:
+* If you don't want to build `TDLib` for macOS first, you **must** pregenerate required source code files using `CMake` prepare_cross_compiling target:
```
cd <path to TDLib sources>
mkdir native-build
@@ -20,22 +21,26 @@ cd native-build
cmake ..
cmake --build . --target prepare_cross_compiling
```
-* Build OpenSSL for iOS, watchOS, tvOS and macOS:
+* Build OpenSSL for iOS, watchOS, tvOS, and macOS:
```
cd <path to TDLib sources>/example/ios
./build-openssl.sh
```
-Here we use scripts from [Python Apple support](https://github.com/pybee/Python-Apple-support), but any other OpenSSL builds should work too.
-Built libraries should be stored in `third_party/openssl/<platform>`, because the next script will rely on this location.
-* Build TDLib for iOS, watchOS, tvOS and macOS:
+Here we use scripts from [Python Apple support](https://github.com/beeware/Python-Apple-support), but any other OpenSSL build should work too.
+[Python Apple support](https://github.com/beeware/Python-Apple-support) has known problems with spaces in the path to the current directory, so
+you need to ensure that there are no spaces in the path.
+Built OpenSSL libraries should be stored in the directory `third_party/openssl/<platform>`, because the next script will rely on this location.
+* Build TDLib for iOS, watchOS, tvOS, and macOS:
```
cd <path to TDLib sources>/example/ios
./build.sh
```
-This may take a while, because TDLib will be built about 10 times.
-Resulting library for iOS will work on any architecture (arv7, armv7s, arm64) and even on a simulator.
+This may take a while, because TDLib will be built about 16 times.
+Resulting XCFramework will work on any architecture and even on a simulator.
We use [CMake/iOS.cmake](https://github.com/tdlib/td/blob/master/CMake/iOS.cmake) toolchain, other toolchains may work too.
-Built libraries will be store in `tdjson` directory.
+Built libraries and XCFramework will be stored in `tdjson` directory.
Documentation for all available classes and methods can be found at https://core.telegram.org/tdlib/docs.
+
+If you receive an "error: SDK "appletvsimulator" cannot be located", you need to run the command "sudo xcode-select -s /Applications/Xcode.app/Contents/Developer" before running ./build.sh.