TelegramMessenger / Telegram-iOS

Telegram-iOS
6.31k stars 1.66k forks source link

How to generate provisioning files? #668

Closed reitowo closed 1 year ago

reitowo commented 2 years ago

There're

exports_files([
    "Intents.mobileprovision",
    "NotificationContent.mobileprovision",
    "NotificationService.mobileprovision",
    "Share.mobileprovision",
    "Telegram.mobileprovision",
    "WatchApp.mobileprovision",
    "WatchExtension.mobileprovision",
    "Widget.mobileprovision",
    "BroadcastUpload.mobileprovision",
])

I only know how to generate one manually in developer.apple.com, and I tried copy and rename them, and then failed with

ERROR: /Users/k1ee/Desktop/Telegram-iOS/Telegram/BUILD:1143:14: ProcessEntitlementsFiles Telegram/ShareExtension_entitlements.entitlements failed: (Exit 1): plisttool failed: error executing command 
  (cd /private/var/tmp/_bazel_k1ee/0dd3bac95114331d5ab2753d129b5287/execroot/__main__ && \
  exec env - \
    APPLE_SDK_PLATFORM=iPhoneOS \
    APPLE_SDK_VERSION_OVERRIDE=15.0 \
    XCODE_VERSION_OVERRIDE=13.1.0.13A1030d \
  bazel-out/host/bin/external/build_bazel_rules_apple/tools/plisttool/plisttool bazel-out/applebin_ios-ios_armv7-opt-ST-36ad1e8d6baf/bin/Telegram/entitlements/ShareExtension_entitlementsplisttool-control)
Execution platform: @local_config_platform//:host
ERROR: In target "//Telegram:ShareExtension_entitlements"; the bundle_id ("kanxue.secgram.ios.Share") did not match the id in the entitlements ("kanxue.secgram.ios").
Target //Telegram:Telegram failed to build

Can you provide step-by-step on how to generate all of them?

shivanraptor commented 2 years ago

The error is quite obvious:

ERROR: In target "//Telegram:ShareExtension_entitlements"; the bundle_id ("kanxue.secgram.ios.Share") did not match the id in the entitlements ("kanxue.secgram.ios").

The Bundle ID in your provisioning profile does not match. Double-check. You need to create these provisioning profiles one-by-one.

reitowo commented 2 years ago

The error is quite obvious:

ERROR: In target "//Telegram:ShareExtension_entitlements"; the bundle_id ("kanxue.secgram.ios.Share") did not match the id in the entitlements ("kanxue.secgram.ios").

The Bundle ID in your provisioning profile does not match. Double-check. You need to create these provisioning profiles one-by-one.

Is there some list that list out all identifiers that I need to generate? Do I need to add all of them in Certificates, Identifiers & Profiles -> Identifiers ?

shivanraptor commented 2 years ago

Yes, add them all. You can refer to the fake-codesigning folder's contents to generate the identifiers and provisioning profiles.

reitowo commented 2 years ago

Yes, add them all. You can refer to the fake-codesigning folder's contents to generate the identifiers and provisioning profiles.

Thank you very much. Does that mean I need to add all of *.mobileprovision filename as my.bundle.id.<FileName>? (Except Telegram.mobileprovision)

reitowo commented 2 years ago

Yes, add them all. You can refer to the fake-codesigning folder's contents to generate the identifiers and provisioning profiles.

It seems an wildcard identifier will do

big-javascript-fan commented 2 years ago

@cnSchwarzer @shivanraptor I tried to build telegram and I success on emulator, I have my developer account so created profiles and download all 9 mobileprovision files to my end, but when I tried to install on my device, it's showing cannot verify integrity error. I matched all bundle_id and what is not same is related to entitlements. but problem is I cannot make unrestricted_voip and carplay support in mobile provision of profiles.

How did you solve this issue from your side? any success on building app and install on real phones? I am very curious about this one because I already spent 10 days to try to solve this build on real device. Really hope to get quick help if possible.

reitowo commented 2 years ago

It seems the only solution is to jailbreak your device and install AppSync Unified in Cydia to bypass integrity check.

---- 回复的原邮件 ---- | 发件人 | @.> | | 日期 | 2021年12月12日 06:01 | | 收件人 | @.> | | 抄送至 | @.**@.> | | 主题 | Re: [TelegramMessenger/Telegram-iOS] How to generate provisioning files? (Issue #668) |

@@.*** I tried to build telegram and I success on emulator, I have my developer account so created profiles and download all 9 mobileprovision files to my end, but when I tried to install on my device, it's showing cannot verify integrity error. I matched all bundle_id and what is not same is related to entitlements. but problem is I cannot make unrestricted_voip and carplay support in mobile provision of profiles.

How did you solve this issue from your side? any success on building app and install on real phones? I am very curious about this one because I already spent 10 days to try to solve this build on real device. Really hope to get quick help if possible.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

shivanraptor commented 2 years ago

@cnSchwarzer @shivanraptor I tried to build telegram and I success on emulator, I have my developer account so created profiles and download all 9 mobileprovision files to my end, but when I tried to install on my device, it's showing cannot verify integrity error. I matched all bundle_id and what is not same is related to entitlements. but problem is I cannot make unrestricted_voip and carplay support in mobile provision of profiles.

How did you solve this issue from your side? any success on building app and install on real phones? I am very curious about this one because I already spent 10 days to try to solve this build on real device. Really hope to get quick help if possible.

I have no problem generating the provisioning profiles. You should double-check the settings of your Identifiers.

shivanraptor commented 2 years ago

It seems the only solution is to jailbreak your device and install AppSync Unified in Cydia to bypass integrity check. ---- 回复的原邮件 ---- | 发件人 | @.> | | 日期 | 2021年12月12日 06:01 | | 收件人 | @.> | | 抄送至 | @.**@.> | | 主题 | Re: [TelegramMessenger/Telegram-iOS] How to generate provisioning files? (Issue #668) | @@.*** I tried to build telegram and I success on emulator, I have my developer account so created profiles and download all 9 mobileprovision files to my end, but when I tried to install on my device, it's showing cannot verify integrity error. I matched all bundle_id and what is not same is related to entitlements. but problem is I cannot make unrestricted_voip and carplay support in mobile provision of profiles. How did you solve this issue from your side? any success on building app and install on real phones? I am very curious about this one because I already spent 10 days to try to solve this build on real device. Really hope to get quick help if possible. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

There is a thing called TestFlight. Do NOT jailbreak and test the app. It does not make sense at all.

protosse commented 2 years ago

@big-javascript-fan hi, do you solve your problem of install on device, i have the same problem.

Songyn1030 commented 2 years ago

@cnSchwarzer @big-javascript-fan Dear,I tried to build a telegram, which is currently running successfully on the simulator. I try to configure through my own developer account and want to run on my device. I downloaded all 9 configured mobileprovision files to my terminal, and then modified variables The values of "telegraph_bundle_id" and "telegraph_team_id" in the bzl file, but the compilation result indicates that I have not set provisioning profiles. What should I do to run telegram on my real device.

/Users/ciii/Desktop/Telegram-iOS/Telegram/BUILD:1866:16: ProcessEntitlementsFiles Telegram/Telegram_entitlements.entitlements failed: (Exit 1): plisttool failed: error executing command (cd /private/var/tmp/_bazel_ciii/d17bc3b40bac26104609a814ad84b0c4/execroot/main && \ exec env - \ APPLE_SDK_PLATFORM=iPhoneOS \ APPLE_SDK_VERSION_OVERRIDE=15.0 \ XCODE_VERSION_OVERRIDE=13.1.0.13A1030d \ bazel-out/host/bin/external/build_bazel_rules_apple/tools/plisttool/plisttool bazel-out/applebin_ios-ios_arm64-dbg-ST-d5d58cdb0648/bin/Telegram/entitlements/Telegram_entitlementsplisttool-control) Execution platform: @local_config_platform//:host Target "//Telegram:Telegram_entitlements" uses entitlements with the "aps-environment" key, but the profile does not have this key Aspect @tulsi//:tulsi/tulsi_aspects.bzl%tulsi_outputs_aspect of //Telegram:Telegram up-to-date: bazel-out/applebin_ios-ios_arm64-dbg-ST-d5d58cdb0648/bin/Telegram/Telegram.tulsiouts Elapsed time: 30.873s, Critical Path: 11.34s 4175 processes: 3462 remote cache hit, 713 internal. Build did NOT complete successfully <*> Running Bazel completed in 31387.012 ms

/Users/ciii/Desktop/Telegram-iOS/build-input/gen/project/Telegram.xcodeproj/.tulsi/Scripts/bazel_build.py:586: Bazel build failed with exit code 1. Please check the build log in Report Navigator (⌘9) for more information.

reitowo commented 2 years ago

@Songyn1030 You need to add push notification capabilities either in developer.apple.com or use XCode auto management.

big-javascript-fan commented 2 years ago

@shivanraptor can we connect over discord or telegram? because I need to build this on real device really urgently. I hope to get jump on quick chat to get help over this. telegram: @certainxp discord: certainxp#7634 or skpe: live:c7d56a099374a938

thanks

Songyn1030 commented 2 years ago

@Songyn1030您需要在 developer.apple.com 或使用 XCode 自动管理添加推送通知功能。

Thank you for your reply. I have made it run successfully on the device. I closed the configuration code related to "APS", "Siri" and "groups" in the build file. But now, the startup interface is black. I don't know why or what I should do

objc[529]: Class RTCCVPixelBuffer is implemented in both /System/Library/PrivateFrameworks/WebCore.framework/Frameworks/libwebrtc.dylib (0x1dcaa47c0) and /private/var/containers/Bundle/Application/676F3493-04A8-41AC-8D92-70BFFAEDE726/Telegram.app/Frameworks/TelegramUIFramework.framework/TelegramUIFramework (0x110b96480). One of the two will be used. Which one is undefined. 2021-12-21 11:14:04.473612+0800 Telegram[529:227006] [Warning] Trying to set delaysTouchesBegan to NO on a system gate gesture recognizer - this is unsupported and will have undesired side effects Architecture: arm64 Embedded signature, length: 4866 2021-12-21 11:14:04.499075+0800 Telegram[529:227006] Warning: Attempt to present <UIAlertController: 0x11d813400> on <_TtC7DisplayP33_83BFFE1175986BF91B85BE8424379B0424WindowRootViewController: 0x11d006e00> whose view is not in the window hierarchy!

big-javascript-fan commented 2 years ago

@Songyn1030 I also tried to do like that and already faced black interface (nothing happen after that). I think that's not solution and i think we still have something wrong on build. @shivanraptor @cnSchwarzer can you help over this problem?

reitowo commented 2 years ago

@Songyn1030 I also tried to do like that and already faced black interface (nothing happen after that). I think that's not solution and i think we still have something wrong on build. @shivanraptor @cnSchwarzer can you help over this problem?

Check the log output, there'll be clues. It might be the entitlement problem

big-javascript-fan commented 2 years ago

@cnSchwarzer so did you success on the building of real device? If so, can we have a quick contact over telegram if you are available? I am in very urgent situation with that one. telegram: @certainxp discord: certainxp#7634

Songyn1030 commented 2 years ago

@Songyn1030 我也尝试过这样做并且已经面临黑色界面(之后没有任何反应)。我认为这不是解决方案,我认为我们在构建方面仍然存在一些问题。 @shivanraptor @cnSchwarzer你能帮忙解决这个问题吗?

My black interface problem has been solved and can now be run on the device. During this period, we also encountered the problem of flash back.

For the black interface problem, I changed 'telegramui / appdelegate The maybeappgroupurl value in the swift 'file.

In the subsequent startup process, due to the icloud flash back problem, I solved it by modifying func makeclouddatacontext... In the "telegraph core / network. Swift" file.

You can try it. I hope it will help you. @big-javascript-fan

shivanraptor commented 2 years ago

@Songyn1030 I also tried to do like that and already faced black interface (nothing happen after that). I think that's not solution and i think we still have something wrong on build. @shivanraptor @cnSchwarzer can you help over this problem?

The console log should tell you it’s either app group or App ID / Hash issue. Fix that.

luoganzhi commented 2 years ago

add app group .

ghost commented 1 year ago

@Songyn1030 I also tried to do like that and already faced black interface (nothing happen after that). I think that's not solution and i think we still have something wrong on build. @shivanraptor @cnSchwarzer can you help over this problem?

The console log should tell you it’s either app group or App ID / Hash issue. Fix that.

How did you make the changes? Could you tell me?

ali-fareed commented 1 year ago

Check out https://github.com/TelegramMessenger/Telegram-iOS#quick-compilation-guide

Zhuzhune commented 1 year ago

Vào Th 6, 21 thg 4, 2023 lúc 22:58 ali-fareed @.***> đã viết:

Check out https://github.com/TelegramMessenger/Telegram-iOS#quick-compilation-guide

— Reply to this email directly, view it on GitHub https://github.com/TelegramMessenger/Telegram-iOS/issues/668#issuecomment-1518034453, or unsubscribe https://github.com/notifications/unsubscribe-auth/A6FMFH74VGSGXIJJ3N6KXC3XCKVCTANCNFSM5JECJAAQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Please teach me how can take out?😭😭😭