-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compile issues of release-5.13 #219
Comments
It seems like they just open source the code, but don't want anyone else to build, strange. |
Yes, after many days of trying to build project, I realized what it is fake open source project |
no. Telegram is actually an open source project. The Workspace file is included in previous releases. Let's not lose faith. |
Ok last release 5.11, it starts but it has a lot of errors in new versions ios its crashed for example - |
It seems telegram change to use buck to build and it's able to create a project file via |
I have generated the Generate
export BUCK=buck
export TELEGRAM_ENV_SET=1
export DEVELOPMENT_CODE_SIGN_IDENTITY=iPhone Distribution: Digital Fortress LLC (C67CF9S4VU)
export DISTRIBUTION_CODE_SIGN_IDENTITY=iPhone Distribution: Digital Fortress LLC (C67CF9S4VU)
export DEVELOPMENT_TEAM=C67CF9S4VU
export API_ID=8
export API_HASH=7245de8e747a0d6fbe11f7cc14fcc0bb
export BUNDLE_ID=ph.telegra.Telegraph
export IS_INTERNAL_BUILD=false
export IS_APPSTORE_BUILD=true
export APPSTORE_ID=686449807
export APP_SPECIFIC_URL_SCHEME=tgapp
export BUILD_NUMBER=199
export ENTITLEMENTS_APP=Telegram-iOS/Telegram-iOS-AppStoreLLC.entitlements
export DEVELOPMENT_PROVISIONING_PROFILE_APP=match Development ph.telegra.Telegraph
export DISTRIBUTION_PROVISIONING_PROFILE_APP=match AppStore ph.telegra.Telegraph
export ENTITLEMENTS_EXTENSION_SHARE=Share/Share-AppStoreLLC.entitlements
export DEVELOPMENT_PROVISIONING_PROFILE_EXTENSION_SHARE=match Development ph.telegra.Telegraph.Share
export DISTRIBUTION_PROVISIONING_PROFILE_EXTENSION_SHARE=match AppStore ph.telegra.Telegraph.Share
export ENTITLEMENTS_EXTENSION_WIDGET=Widget/Widget-AppStoreLLC.entitlements
export DEVELOPMENT_PROVISIONING_PROFILE_EXTENSION_WIDGET=match Development ph.telegra.Telegraph.Widget
export DISTRIBUTION_PROVISIONING_PROFILE_EXTENSION_WIDGET=match AppStore ph.telegra.Telegraph.Widget
export ENTITLEMENTS_EXTENSION_NOTIFICATIONSERVICE=NotificationService/NotificationService-AppStoreLLC.entitlements
export DEVELOPMENT_PROVISIONING_PROFILE_EXTENSION_NOTIFICATIONSERVICE=match Development ph.telegra.Telegraph.NotificationService
export DISTRIBUTION_PROVISIONING_PROFILE_EXTENSION_NOTIFICATIONSERVICE=match AppStore ph.telegra.Telegraph.NotificationService
export ENTITLEMENTS_EXTENSION_NOTIFICATIONCONTENT=NotificationContent/NotificationContent-AppStoreLLC.entitlements
export DEVELOPMENT_PROVISIONING_PROFILE_EXTENSION_NOTIFICATIONCONTENT=match Development ph.telegra.Telegraph.NotificationContent
export DISTRIBUTION_PROVISIONING_PROFILE_EXTENSION_NOTIFICATIONCONTENT=match AppStore ph.telegra.Telegraph.NotificationContent
export ENTITLEMENTS_EXTENSION_INTENTS=SiriIntents/SiriIntents-AppStoreLLC.entitlements
export DEVELOPMENT_PROVISIONING_PROFILE_EXTENSION_INTENTS=match Development ph.telegra.Telegraph.SiriIntents
export DISTRIBUTION_PROVISIONING_PROFILE_EXTENSION_INTENTS=match AppStore ph.telegra.Telegraph.SiriIntents
export DEVELOPMENT_PROVISIONING_PROFILE_WATCH_APP=match Development ph.telegra.Telegraph.watchkitapp
export DISTRIBUTION_PROVISIONING_PROFILE_WATCH_APP=match AppStore ph.telegra.Telegraph.watchkitapp
export DEVELOPMENT_PROVISIONING_PROFILE_WATCH_EXTENSION=match Development ph.telegra.Telegraph.watchkitapp.watchkitextension
export DISTRIBUTION_PROVISIONING_PROFILE_WATCH_EXTENSION=match AppStore ph.telegra.Telegraph.watchkitapp.watchkitextension
export BUILDBOX_DIR=buildbox
export CODESIGNING_PROFILES_VARIANT=appstore
export PACKAGE_METHOD=appstore
"DEAD_CODE_STRIPPING": "YES",
|
https://core.telegram.org/reproducible-builds#reproducible-builds-for-ios. Docs how to build telegram using buck. |
I was able to build with buck following those instructions.. but I end up with an "Error 2" Alert on a black screen.. not sure If i'm missing anything obvious. I did enter my own API key (if in the right place..?) and I changed to my own code sign certificate + profiles. Both when i build with buck or the buck generated xcode project. either in Simulator or on a real iPhone. EDIT: My bad, had groups set up incorrectly. build is working now. |
I encountered couple errors after successfully generated the project workspace via Error 1 - Undefined symbols: _swift_getFunctionReplacement
Error 2 - Missing com.apple.developer.pushkit.unrestricted-voip in provisioning profile I can only clear this error by removing the key in the entitlements file, which I think I shouldn't. How can I resolve this? |
enable dead-code-stripping |
Insert in
|
It works. Any idea about Error 2 ? |
No. As long as I can debug and work on the simulator, I don't pay attention to Error 2. |
I can compile the source code for simulator, but for real device, the code verification via VM is way too complicated, especially Step 8 and obtaining a decrypted Telegram IPA. Anyone can suggest a simpler way to do so? |
Why do you want the decrypted telegram IPA. I’m not sure what your intentions are. But as i read it you only need that if you want tot verify that the code hosted on GitHub is exactly the same as the one code they used on their AppStore build. Creating your own certificates and profiles equal to the ‘fake’ ones provided in this repository, and editing the configuration a bit should make it possible to run it on your device. I got that working by trail and error. |
Please ignore my previous comment regarding obtaining a decrypted Telegram IPA. I finished setting up the Parallels VM and now trying to run The following error occurred after the
What did I miss this time? Also on the other hand, I noticed that it feeds the BUCK config into the command, which includes the setup of provisioning profiles and code sign identity. It's currently set to I have set the code signing settings to my Developer ID and use Automatic Signing in my host Xcode project. How do I config the BUCK config to adapt my settings? |
In the (Make sure that the app group is set up the same way as they have it, if you used Regarding the error, keep the VM as clean as possible, i see that you have a buck daemon running. I don’t have that. Don’t run build command directly on your VM it’s not needed. (and stick with the exact xcode version they list, and checkout a release like I removed the line that uploads the source every time and the one that packs and unpacks it. So you can rebuild with buck in “just a few” minutes when you only change a few swift files and upload them separately. On your host you can comment out the creation of source tar in In guest-build-telegram.sh you can change I think that is about all I changed, good luck |
a bit complicated |
Nobody said it was going to be easy, but it is possible.. maybe my way is way to complicated because i'm missing something.. but it's not all that well documented :) |
I will try all these. Any example of modifying the config? e.g. change the code signing to Automatic, and generate code signing identity and mobile provision file? Currently Xcode manages these for me. My VM is freshly built as instructed, I just added I also modified the Also, as my VM is located at USB hard drive, I have to change the My last problem is, every time there is an error, a new linked VM will be cloned and started. I have to manually stop and delete it. Anyway it can be removed automatically after an error occurred? p.s. I only have chance to test build again few days later. |
You can remove those VM cloning commands and even put static IP of your VM, it is only needed if you want to be 100% sure there is no leftovers from another build. but that is only important if you try to make an executable for AppStore or if you want to be 100% sure your build is clean. else, rebuilding is fairly quick (4min or so) if it makes sense.. (also remove the check that checks if there is the directory called telegram-ios) Also, USB might be slowing you down even more.. |
I encountered this error:
The build process failed immediately after building What did I miss this time? Also, is there any way to retry that problematic command quickly? Restarting the whole process took a lot of time. |
In addition, when I run the App in Simulator, it shows the following message in Xcode console:
Should I change the iCloud container to mine? Or should I keep the default value? I changed this value to the above settings in previous version, but this error first shown up in this version 5.13... |
The previous issues I encountered haven't been solved yet. I tried to skip VM's part, and use TestFlight to test my app in device. Thus I need to upload the App to App Store for TestFlight build. When I upload the App to App Store via Xcode / Transporter, the following errors occurred:
In the How can I resolve this? |
Why not just install using xcode? For TestFlight they need to review the application.. I’m not sure what you’re changing, but is that worth all the effort? |
It is because I cannot fix the issues during the VM build, thus I cannot directly install and debug the app directly via Xcode. Can you please help me with the issues above? Thanks! (I tried |
Now I encounter the following errors:
|
You should confirm that the path of your Command Line Tool is correct. |
@TimorYang |
@Gargo |
@TimorYang |
@Gargo |
Please see the updated build instructions in README.md. |
It gets stuck in |
Do you have a little more information? is there no error message anywhere else in the terminal? |
Absolutely nothing. Just no progress. |
Could you please provide the terminal output? |
|
Have you tried restarting the Mac? |
I don't see what is wrong.. it says "Build completed successfully, 81 total actions" |
The result is the same. I have tried
|
It looks like in your previous comment the Bazel process was stuck (happens sometimes, it is listed as "java" in Activity Monitor). You can use the example provisioning profiles to build the app, but you would have to install the corresponding certificate found at |
I did everything described in the updated Readme but for me it fails after some time with this:
tried to clean and run again, did not help :( |
The relevant line is:
You need to install the certificates that match the provisioning profiles you have in |
OK, I did not manage to use the fake signing stuff that is delivered, so I created all the identifiers and profiles error by error in my developer account, downloaded them and added them to Now, finally it built 🎉 However, I cannot use the other command to generate the project. There is some "tulsi" error:
|
It looks like you have python2 installed via Homebrew. Here is the answer I found that may be relevant: https://stackoverflow.com/a/59816812 Both project generation and building were tested on a clean, unmodified Big Sur system installed in a VM. |
Thank you! I found this SO thread yesterday as well but could not make it work. Today I got a little bit closer (I think), the problem seemed to be some broken python/openssl linkings on my machine, so your link to the SO thread brought me on the right path :) I reinstalled openssl (via brew) and ran Now it runs longer but I have some other error regarding the build configuration: I dont't understand what is missing there :( The build command relies on the same file and it runs fine for me now (after fixing all the provisioning issues), however
|
@misteu it is now possible to skip generating and downloading provisioning profiles if you are not planning to deploy the app to a real device, see #453 (comment) Try restarting your computer. A hack is currently required to pass the build_configuration folder to Tulsi. It involves generating a Bazel wrapper script that passes additional arguments to the real Bazel. The line after |
Thank you so much! Now the project was generated successfully, restarting did the trick -.- Please include something like "try restarting before generating the project" in the Readme as well. This would have helped me a lot if I knew earlier yesterday. Currently I try to run the app from XCode, I am estimating to have to wait for another 30 minutes or so :/ |
I think the better way would be to patch Tulsi. |
Ok, it runs now sucessfully in the simulator! Thank you for your help. |
Please open a new issue in case of problems with compilation. |
But many people can't run it |
I just cloned / downloaded the
release-5.13
source, and cannot find the Workspace fileTelegram-iOS.xcworkspace
to start with. Help!The text was updated successfully, but these errors were encountered: