iosxcode8telegramios-universal-framework

Telegram not supported Xcode 8


I tried to download telegram source code "http://www.telegramdownload.com/download-telegram-source-codes" and run it using my Xcode 8 but I got the following errors

"_BN_rshift1", referenced from:
      _MTCheckIsSafePrime in MtProtoKit iOS(MTEncryption.o)
  "_BIO_new", referenced from:
      _MTRsaEncrypt in MtProtoKit iOS(MTEncryption.o)
  "_BIO_write", referenced from:
      _MTRsaEncrypt in MtProtoKit iOS(MTEncryption.o)
  "_BIO_s_mem", referenced from:
      _MTRsaEncrypt in MtProtoKit iOS(MTEncryption.o)
  "_BN_CTX_new", referenced from:
      _MTRsaEncrypt in MtProtoKit iOS(MTEncryption.o)
      _MTExp in MtProtoKit iOS(MTEncryption.o)
      _MTCheckIsSafePrime in MtProtoKit iOS(MTEncryption.o)
      _MTCheckIsSafeGAOrB in MtProtoKit iOS(MTEncryption.o)
      _MTCheckMod in MtProtoKit iOS(MTEncryption.o)
  "_BN_sub", referenced from:
      _MTCheckIsSafePrime in MtProtoKit iOS(MTEncryption.o)
      _MTCheckIsSafeGAOrB in MtProtoKit iOS(MTEncryption.o)
  "_BN_new", referenced from:
      _MTRsaEncrypt in MtProtoKit iOS(MTEncryption.o)
      _MTExp in MtProtoKit iOS(MTEncryption.o)
      _MTCheckIsSafePrime in MtProtoKit iOS(MTEncryption.o)
      _MTCheckIsSafeGAOrB in MtProtoKit iOS(MTEncryption.o)
  "_BN_value_one", referenced from:
      _MTCheckIsSafePrime in MtProtoKit iOS(MTEncryption.o)
      _MTCheckIsSafeGAOrB in MtProtoKit iOS(MTEncryption.o)
  "_AES_ige_encrypt", referenced from:
      _MTAesEncryptInplace in MtProtoKit iOS(MTEncryption.o)
      _MTAesEncryptInplaceAndModifyIv in MtProtoKit iOS(MTEncryption.o)
      _MTAesDecryptInplace in MtProtoKit iOS(MTEncryption.o)
      _MTAesDecryptInplaceAndModifyIv in MtProtoKit iOS(MTEncryption.o)
      _MTAesEncrypt in MtProtoKit iOS(MTEncryption.o)
      _MTAesDecrypt in MtProtoKit iOS(MTEncryption.o)
  "_BN_num_bits", referenced from:
      _MTRsaEncrypt in MtProtoKit iOS(MTEncryption.o)
      _MTExp in MtProtoKit iOS(MTEncryption.o)
  "_BN_cmp", referenced from:
      _MTCheckIsSafeGAOrB in MtProtoKit iOS(MTEncryption.o)
  "_PEM_read_bio_RSAPublicKey", referenced from:
      _MTRsaEncrypt in MtProtoKit iOS(MTEncryption.o)
  "_BN_CTX_free", referenced from:
      _MTRsaEncrypt in MtProtoKit iOS(MTEncryption.o)
      _MTExp in MtProtoKit iOS(MTEncryption.o)
      _MTCheckIsSafePrime in MtProtoKit iOS(MTEncryption.o)
      _MTCheckIsSafeGAOrB in MtProtoKit iOS(MTEncryption.o)
      _MTCheckMod in MtProtoKit iOS(MTEncryption.o)
  "_BN_free", referenced from:
      _MTRsaEncrypt in MtProtoKit iOS(MTEncryption.o)
      _MTExp in MtProtoKit iOS(MTEncryption.o)
      _MTCheckIsSafePrime in MtProtoKit iOS(MTEncryption.o)
      _MTCheckIsSafeGAOrB in MtProtoKit iOS(MTEncryption.o)
      _MTCheckMod in MtProtoKit iOS(MTEncryption.o)
  "_RSA_free", referenced from:
      _MTRsaEncrypt in MtProtoKit iOS(MTEncryption.o)
  "_BN_mod_word", referenced from:
      _MTCheckMod in MtProtoKit iOS(MTEncryption.o)
  "_BN_bn2bin", referenced from:
      _MTRsaEncrypt in MtProtoKit iOS(MTEncryption.o)
      _MTExp in MtProtoKit iOS(MTEncryption.o)
  "_BN_is_prime_ex", referenced from:
      _MTCheckIsSafePrime in MtProtoKit iOS(MTEncryption.o)
  "_BIO_free", referenced from:
      _MTRsaEncrypt in MtProtoKit iOS(MTEncryption.o)
  "_BN_mod_exp", referenced from:
      _MTRsaEncrypt in MtProtoKit iOS(MTEncryption.o)
      _MTExp in MtProtoKit iOS(MTEncryption.o)
  "_AES_set_decrypt_key", referenced from:
      _MTAesDecryptInplace in MtProtoKit iOS(MTEncryption.o)
      _MTAesDecryptInplaceAndModifyIv in MtProtoKit iOS(MTEncryption.o)
      _MTAesDecrypt in MtProtoKit iOS(MTEncryption.o)
  "_BN_bin2bn", referenced from:
      _MTRsaEncrypt in MtProtoKit iOS(MTEncryption.o)
      _MTExp in MtProtoKit iOS(MTEncryption.o)
      _MTCheckIsSafePrime in MtProtoKit iOS(MTEncryption.o)
      _MTCheckIsSafeGAOrB in MtProtoKit iOS(MTEncryption.o)
      _MTCheckMod in MtProtoKit iOS(MTEncryption.o)
  "_AES_set_encrypt_key", referenced from:
      _MTAesEncryptInplace in MtProtoKit iOS(MTEncryption.o)
      _MTAesEncryptInplaceAndModifyIv in MtProtoKit iOS(MTEncryption.o)
      _MTAesEncrypt in MtProtoKit iOS(MTEncryption.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

and i found that I need to install Universal frameworks but I always get an error


Solution

  • Steps to make it working:

    1. Download an old Xcode , Xcode 7.x or older. this answer will help you and install it side by side with your up to date version.
    2. Download iOS Universal Frameworks and install it using the Old Xcode Path. Use the Real Framework.
    3. Download code from this unofficial but working version.
    4. Open Telegram Xcode Project project file > Telegraph Target > Build Settings > Search For Header search paths > MtProotoKit>> make it recursive.
    5. DO NOT accept the solution popup for POP framework error that will appear for you. Cancel it and run app regardless this error, it will run successfully.
    6. set appID inside TGTelegramNetworking.m and Hash and appId inside TGTelegraph.mm to yours.
    7. Enjoy!

    NOTE: Take snapshots of your work or commit your repository after each update in project to avoid restarting the whole work if you have done something wrong in any step.