Telegram iOS app won't build with Xcode 6.1.1 - ios

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

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

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

Related

xcode13 nativescript deployment_target error while building the IOS app

While I'm building my Nativescript app using Xcode, I'm getting the below error. May I know what is the reason? I'm able to build the app successfully in Xcode 11 but not in 13. Thanks in advance
Traceback (most recent call last):
File "./build-step-metadata-generator.py", line 42, in <module>
deployment_target = env(env("DEPLOYMENT_TARGET_CLANG_ENV_NAME"))
File "./build-step-metadata-generator.py", line 14, in env
return os.environ[env_name]
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/UserDict.py", line 40, in __getitem__
raise KeyError(key)
KeyError: 'DEPLOYMENT_TARGET_CLANG_ENV_NAME'
Command Ld failed with a nonzero exit code

Build framework IOS OpenCV 3.1.0.2 failed on MAC (OS X El Capitan)

I would like to use OpenCV 3.1.0.2 (the latest one) with Xcode 7.2.1.
I downloaded the OpenCv then as I did with OpenCV 2.4.11 before, I used the following command to generate the opencv2.framework:
python opencv-3.1.0\ 2/platforms/ios/build_framework.py ios
But after a while, my build failed. Here the error:
** BUILD FAILED **
The following build commands failed:
CompileC /Users/nameUser/openCV/ios/build/arm64-iPhoneOS/3rdparty/zlib/OpenCV.build/Release-iphoneos/zlib.build/Objects-normal/arm64/gzlib.o 3rdparty/zlib/gzlib.c normal arm64 c com.apple.compilers.llvm.clang.1_0.compiler
CompileC /Users/nameUser/openCV/ios/build/arm64-iPhoneOS/3rdparty/zlib/OpenCV.build/Release-iphoneos/zlib.build/Objects-normal/arm64/gzread.o 3rdparty/zlib/gzread.c normal arm64 c com.apple.compilers.llvm.clang.1_0.compiler
(2 failures)
============================================================
ERROR: Command '['xcodebuild', 'IPHONEOS_DEPLOYMENT_TARGET=6.0', 'ARCHS=arm64', '-sdk', 'iphoneos', '-configuration', 'Release', '-parallelizeTargets', '-jobs', '4', '-target', 'ALL_BUILD', 'build']' returned non-zero exit status 65
============================================================
Traceback (most recent call last):
File "build_framework.py", line 87, in build
self._build(outdir)
File "build_framework.py", line 81, in _build
self.buildOne(t[0], t[1], mainBD, cmake_flags)
File "build_framework.py", line 139, in buildOne
execute(buildcmd + ["-target", "ALL_BUILD", "build"], cwd = builddir)
File "build_framework.py", line 34, in execute
retcode = check_call(cmd, cwd = cwd)
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 540, in check_call
raise CalledProcessError(retcode, cmd)
CalledProcessError: Command '['xcodebuild', 'IPHONEOS_DEPLOYMENT_TARGET=6.0', 'ARCHS=arm64', '-sdk', 'iphoneos', '-configuration', 'Release', '-parallelizeTargets', '-jobs', '4', '-target', 'ALL_BUILD', 'build']' returned non-zero exit status 65
Before posting here, I searched on the internet but I couldn't find any solution for this problem. I don't even know what does this error means.
Can anyone help me please ?
Thank
It's not exactly same with my case but you can try two ways:
Did you install cmake?
If not, install that.
Did you check your python version?
Because Python 3 and 2 are much
different, you should check that.
In my case, 2.x is working. If you installed 2.x and 3.x both, the command "python" means 3. so you should use "python2.x" command.
I'm not sure you can understand what I'm writing(bc my english skill is not good..) but I hope It helps you to solve the problem!

Telegram iOS app could't not run on Xcode

I have download the source code of Telegram app on their website:https://telegram.org/source.
When I try to run the project, there show an error like below:
UFW (M iphonesimulator): ERROR: Build failed
Traceback (most recent call last):
File "/Users/macbookpro/Library/Developer/Xcode/DerivedData/MtProtoKit-afodmttritvhhdfajtdrsgmygsll/Build/Intermediates/MtProtoKit.build/Debug-iphonesimulator/MtProtoKit iOS.build/Script-D05A831218AFB3F9007F1076.sh", line 812, in <module>
run_build()
File "/Users/macbookpro/Library/Developer/Xcode/DerivedData/MtProtoKit-afodmttritvhhdfajtdrsgmygsll/Build/Intermediates/MtProtoKit.build/Debug-iphonesimulator/MtProtoKit iOS.build/Script-D05A831218AFB3F9007F1076.sh", line 787, in run_build
add_symlinks_to_framework(project)
File "/Users/macbookpro/Library/Developer/Xcode/DerivedData/MtProtoKit-afodmttritvhhdfajtdrsgmygsll/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/macbookpro/Library/Developer/Xcode/DerivedData/MtProtoKit-afodmttritvhhdfajtdrsgmygsll/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/macbookpro/Library/Developer/Xcode/DerivedData/MtProtoKit-afodmttritvhhdfajtdrsgmygsll/Build/Products/Debug-iphonesimulator/MtProtoKit iOS.framework/Versions/A'
Showing first 200 notices only
Command /bin/sh failed with exit code 1
I didn't change anything before I try to run the project.
Telegram uses currently retired project https://github.com/kstenerud/iOS-Universal-Framework
Install 'iOS-Universal-Framework' and with couple of additional fixes you will be able to build it.
OSError: [Errno 2] No such file or directory: '/Users/macbookpro/Library/Developer/Xcode/DerivedData/MtProtoKit-afodmttritvhhdfajtdrsgmygsll/Build/Products/Debug-iphonesimulator/MtProtoKit iOS.framework/Versions/A'
You are referencing to a third party library that isn't there.

Trigger.io error "/usr/bin/codesign no identity found" can't create package or run the app on the device

I have a problem when trying to run my application on the device or create IPA file.
I followed the steps here and I have this error when trying to run on iOS option:
[ERROR] Failed when running /usr/bin/codesign: FdawaDev: no identity found
I tried to make it throw terminal with this command
forge package ios --ios.profile.provisioning_profile Development.mobileprovision
and I'm getting this error
/Applications/TriggerToolkit.app/Contents/MacOS/forge -v package ios --ios.profile.provisioning_profile Development.mobileprovision
[ INFO] Forge tools running at version 3.3.43
[ DEBUG] Checking for update zip...
[ ERROR] Couldn't import generation code: No module named generate_dynamic
[ DEBUG] Traceback (most recent call last):
File "/Applications/TriggerToolkit.app/Contents/MacOS/build-tools/forge/async.py", line 98, in run
result = self._target(*self._args, **self._kwargs)
File "/Applications/TriggerToolkit.app/Contents/MacOS/build-tools/forge/main.py", line 443, in package
generate_dynamic = forge_build.import_generate_dynamic()
File "/Applications/TriggerToolkit.app/Contents/MacOS/build-tools/forge/build.py", line 67, in import_generate_dynamic
raise ForgeError("Couldn't import generation code: {0}".format(e))
ForgeError: Couldn't import generation code: No module named generate_dynamic
I removed TriggerToolkit and download the latest one, installed it again and I'm still getting the same error.
What am I missing?
The first error is a configuration problem: you're pointing at an iOS developer identity called "FdawaDev" when one doesn't exist in your Keychain.
Unless you have several identities, you can safely leave the "Certificate" Local Config setting empty in the Toolkit.
If you have several identities, you should specify one with something like iPhone Developer: James Brady.
For the second problem, when using the command line tools, you have to manually run a build before doing a run or package action, e.g.:
% forge build ios && forge package ios

Failure to run application on the device IOS with Tibar module

I have a problem with the tibar (barcode scanner http://code.google.com/p/tibar/), when run on my iphone, xcode returns an error exit 65, I've outlined below:
** BUILD FAILED **
The following build commands failed:
Ld build/Scannn.build/Debug-iphoneos/Scannn.build/Objects-normal/armv6/Scannn normal armv6
(1 failure)
EXIT CODE WAS: 65
Exception detected in script:
Traceback (most recent call last):
File "/Users/xxxxx/Library/Application Support/Titanium/mobilesdk/osx/2.0.1.GA2/iphone/builder.py", line 1465, in main
execute_xcode("iphoneos%s" % iphone_version,args,False)
File "/Users/xxxxxx/Library/Application Support/Titanium/mobilesdk/osx/2.0.1.GA2/iphone/builder.py", line 1224, in execute_xcode
output = run.run(args,False,False,o)
File "/Users/xxxxxx/Library/Application Support/Titanium/mobilesdk/osx/2.0.1.GA2/iphone/run.py", line 41, in run
sys.exit(rc)
SystemExit: 65
if I run the application directly in xcode, it works correctly.
My configuration:
Titanium SDK: 2.0.1.GA2
XCode: 4.3.2
iOS: 5.1.1 (iphone 4s)
Tibar: 0.4.2
Thanks!!!

Resources