Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Telegram iOS app won't build with Xcode 6.1.1

I have downloaded the code source of Telegram app on their website. When I open the project in Xcode 6.1.1, I get the following error:

 UFW (M iphonesimulator): ERROR: Build failed Traceback (most recent call last): File"/Users/yanfeng/Library/Developer/Xcode/DerivedData/Build/Intermediates/MtProtoKit.build/Debug-iphonesimulator/MtProtoKit iOS.build/Script-D05A831218AFB3F9007F1076.sh", line 812, in <module>run_build()File "/Users/yanfeng/Library/Developer/Xcode/DerivedData/Build/Intermediates/MtProtoKit.build/Debug-iphonesimulator/MtProtoKit iOS.build/Script-D05A831218AFB3F9007F1076.sh", line 787, in run_build
    add_symlinks_to_framework(project)
  File "/Users/yanfeng/Library/Developer/Xcode/DerivedData/Build/Intermediates/MtProtoKit.build/Debug-iphonesimulator/MtProtoKit iOS.build/Script-D05A831218AFB3F9007F1076.sh", line 675, in add_symlinks_to_framework
    attempt_symlink(os.path.join(base_dir, "Versions", "Current"), os.environ['FRAMEWORK_VERSION'])
  File "/Users/yanfeng/Library/Developer/Xcode/DerivedData/Build/Intermediates/MtProtoKit.build/Debug-iphonesimulator/MtProtoKit iOS.build/Script-D05A831218AFB3F9007F1076.sh", line 493, in attempt_symlink
    os.stat(os.path.abspath(os.path.join(link_path, "..", link_to)))
OSError: [Errno 2] No such file or directory: '/Users/yanfeng/Library/Developer/Xcode/DerivedData/Build/Products/Debug-iphonesimulator/MtProtoKit iOS.framework/Versions/A'
Showing first 200 notices only
Command /bin/sh failed with exit code 1
like image 337
yanfeng_zheng Avatar asked Feb 06 '15 16:02

yanfeng_zheng


2 Answers

MtProtoKit requires https://github.com/kstenerud/iOS-Universal-Framework, so clone it, install "Real Framework", restart Xcode and enjoy!

like image 168
Ptah Avatar answered Sep 22 '22 11:09

Ptah


With Xcode 6, https://github.com/kstenerud/iOS-Universal-Framework is not required for building universal (arm64, armv7, armv7s, and simulator) frameworks for iOS.

You need to remove run script, fix library dependence and Xcode architectures configuration, also confirm architectures of linked binaries.

I maintained a working telegram iOS source code here: https://github.com/liruqi/Telegram-iOS

like image 33
liruqi Avatar answered Sep 21 '22 11:09

liruqi