【问题标题】:Telegram iOS app won't build with Xcode 6.1.1Telegram iOS 应用程序无法使用 Xcode 6.1.1 构建
【发布时间】:2015-04-06 20:42:03
【问题描述】:

我已经在their website下载了Telegram app的代码源。当我在 Xcode 6.1.1 中打开项目时,出现以下错误:

 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

【问题讨论】:

  • 找到解决方案了吗?
  • 我遇到了同样的问题,但我很困惑,因为没有'/Users/Me/Library/...'目录
  • 我已经安装了“Real Framework”并构建成功,但是当我运行它时说“由于未捕获的异常'NSInternalInconsistencyException'而终止应用程序,原因:'请获取您自己的apiId和apiHash在my.telegam.org",获取 apiId 和 apiHash 以及如何替换它。没找到

标签: ios xcode telegram


【解决方案1】:

在 Xcode 6 中,为 iOS 构建通用(arm64、armv7、armv7s 和模拟器)框架不需要https://github.com/kstenerud/iOS-Universal-Framework

您需要删除运行脚本,修复库依赖和 Xcode 架构配置,还要确认链接二进制文件的架构。

我在这里维护了一个工作电报 iOS 源代码:https://github.com/liruqi/Telegram-iOS

【讨论】:

    【解决方案2】:

    MtProtoKit 需要https://github.com/kstenerud/iOS-Universal-Framework,所以克隆它,安装“Real Framework”,重新启动 Xcode 并享受!

    【讨论】:

    • 为什么那个 repo 说“这个 repo 终于可以退役了”?听起来苹果现在在某个地方原生拥有它?
    • 我安装了,但现在有一个不同的错误文件存在并且不是符号链接:/Users/me/Library/Developer/Xcode/DerivedData/Telegraph-ewgajxvcwslxioahymccndyrlivl/Build/Products/Debug-iphonesimulator /MtProtoKit iOS.framework/Headers
    • 您需要删除 '/Users//Library/Developer/Xcode/DerivedData/' 文件夹中的所有文件。这应该可以解决问题。
    • 我已经安装了“Real Framework”并构建成功,但是当我运行它时说“由于未捕获的异常'NSInternalInconsistencyException'而终止应用程序,原因:'请获取您自己的apiId和apiHash在my.telegam.org",获取 apiId 和 apiHash 以及如何替换它。没找到
    • 您需要在 my.telegram.org 上注册您的应用程序,在那里您可以获得 api_id、api_hash。把它们放在程序起飞的地方。
    猜你喜欢
    • 1970-01-01
    • 2015-09-03
    • 2014-08-07
    • 2015-03-22
    • 2021-03-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-12-14
    相关资源
    最近更新 更多