Skip to content

How do I generate a corresponding mobileprovision file for Telegram? #866

Closed
@Rockly97

Description

@Rockly97

Description

I tried to generate the same mobileprovision file in the fake-codesigning sample folder, but I'm using Make. Py was not built successfully.

Expected Behavior

I try to build with this command

python3 build-system/Make/Make.py \
--cacheDir="$HOME/telegram-bazel-cache"
build
--configurationPath="$HOME/telegram-configuration/development-configuration.json"
--buildNumber=100001
--configuration=release_universal
--codesigningInformationPath "$HOME/telegram-configuration/fake-codesigning"

Actual Behavior

The error message returned is as follows:

onfiguration-repository --announce_rc --features=swift.use_global_module_cache --verbose_failures --experimental_remote_cache_async --features=swift.skip_function_bodies_for_derived_files --jobs=8 --define=buildNumber=100001 --define=telegramVersion=9.0.1 --features=swift.split_derived_files_generation --disk_cache=/Users/lindajizhi/telegram-bazel-cache -c opt --ios_multi_cpus=armv7,arm64 --watchos_cpus=arm64_32 --apple_generate_dsym --output_groups=+dsyms --features=swift.opt_uses_wmo --features=swift.opt_uses_osize --swiftcopt=-num-threads --swiftcopt=0 --features=dead_strip --objc_enable_binary_stripping --apple_bitcode=watchos=embedded
INFO: Invocation ID: fca56664-b265-4741-bb5b-3bf3b54765be
INFO: Options provided by the client:
Inherited 'common' options: --isatty=1 --terminal_columns=200
INFO: Reading rc options for 'build' from /Users/lindajizhi/study/code/Telegram-iOS/.bazelrc:
'build' options: --action_env=ZERO_AR_DATE=1 --apple_platform_type=ios --cxxopt=-std=c++17 --per_file_copt=third-party/webrtc/..cpp$,@-std=c++17 --per_file_copt=third-party/webrtc/..cc$,@-std=c++17 --per_file_copt=third-party/webrtc/..mm$,@-std=c++17 --per_file_copt=submodules/LottieMeshSwift/LottieMeshBinding/Sources/..mm$,@-std=c++17 --swiftcopt=-whole-module-optimization --features=debug_prefix_map_pwd_is_dot --features=swift.cacheable_swiftmodules --features=swift.debug_prefix_map --features=swift.enable_vfsoverlays --strategy=Genrule=standalone --spawn_strategy=standalone --strategy=SwiftCompile=standalone --define RULES_SWIFT_BUILD_DUMMY_WORKER=1
INFO: Build options --//Telegram:disableExtensions, --//Telegram:disableStripping, --apple_bitcode, and 8 more have changed, discarding analysis cache.
ERROR: /Users/lindajizhi/study/code/Telegram-iOS/Telegram/BUILD:1747:14: no such target '@build_configuration//provisioning:NotificationService.mobileprovision': target 'NotificationService.mobileprovision' not declared in package 'provisioning' defined by /private/var/tmp/_bazel_lindajizhi/cdb0dafa71bd522dc88e85e1cfc5ee25/external/build_configuration/provisioning/BUILD and referenced by '//Telegram:NotificationServiceExtension'
ERROR: Analysis of target '//Telegram:Telegram' failed; build aborted:
INFO: Elapsed time: 6.130s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (43 packages loaded, 300 targets configured)
Traceback (most recent call last):
File "/Users/lindajizhi/study/code/Telegram-iOS/build-system/Make/Make.py", line 959, in
build(bazel=bazel_path, arguments=args)
File "/Users/lindajizhi/study/code/Telegram-iOS/build-system/Make/Make.py", line 567, in build
bazel_command_line.invoke_build()
File "/Users/lindajizhi/study/code/Telegram-iOS/build-system/Make/Make.py", line 341, in invoke_build
call_executable(combined_arguments)
File "/Users/lindajizhi/study/code/Telegram-iOS/build-system/Make/BuildEnvironment.py", line 81, in call_executable
subprocess.check_call(resolved_arguments, env=resolved_env)
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/Users/lindajizhi/study/code/Telegram-iOS/build-input/bazel-5.3.0-darwin-arm64', 'build', 'Telegram/Telegram', '--override_repository=build_configuration=/Users/lindajizhi/study/code/Telegram-iOS/build-input/configuration-repository', '--announce_rc', '--features=swift.use_global_module_cache', '--verbose_failures', '--experimental_remote_cache_async', '--features=swift.skip_function_bodies_for_derived_files', '--jobs=8', '--define=buildNumber=100001', '--define=telegramVersion=9.0.1', '--features=swift.split_derived_files_generation', '--disk_cache=/Users/lindajizhi/telegram-bazel-cache', '-c', 'opt', '--ios_multi_cpus=armv7,arm64', '--watchos_cpus=arm64_32', '--apple_generate_dsym', '--output_groups=+dsyms', '--features=swift.opt_uses_wmo', '--features=swift.opt_uses_osize', '--swiftcopt=-num-threads', '--swiftcopt=0', '--features=dead_strip', '--objc_enable_binary_stripping', '--apple_bitcode=watchos=embedded']' returned non-zero exit status 1.

Activity

mailes

mailes commented on Oct 22, 2022

@mailes

same error.

please help.

Rockly97

Rockly97 commented on Oct 24, 2022

@Rockly97
Author

@ali-fareed can you help me

ali-fareed

ali-fareed commented on Oct 24, 2022

@ali-fareed

Which commit are you on?

Rockly97

Rockly97 commented on Oct 24, 2022

@Rockly97
Author

你在哪个提交上?

master

mailes

mailes commented on Oct 25, 2022

@mailes

你在哪个提交上?

master

别用build的,没用的,得要证书,直接生成iOS 工程文件,用模拟器上跑起来就行了,然后在模拟器上进行修改签名 证书 那一套.

shivanraptor

shivanraptor commented on Oct 26, 2022

@shivanraptor

你在哪个提交上?

master

别用build的,没用的,得要证书,直接生成iOS 工程文件,用模拟器上跑起来就行了,然后在模拟器上进行修改签名 证书 那一套.

English please

mailes

mailes commented on Oct 26, 2022

@mailes

你在哪个提交上?

master

别用build的,没用的,得要证书,直接生成iOS 工程文件,用模拟器上跑起来就行了,然后在模拟器上进行修改签名 证书 那一套.

English please

Generate the iOS project file directly, and then sign in Xcode according to your developer account. Then you can configure the certificate, and then you can generate the IPA file.

build-system/Make/Make.py \

--overrideXcodeVersion
--bazel="$HOME/bazel-dist/bazel"
--cacheDir="$HOME/telegram-bazel-cache"
generateProject
--configurationPath="$HOME/telegram-configuration"
--disableExtensions
--disableProvisioningProfiles
--codesigningInformationPath="$HOME/telegram-configuration/fake-codesigning"

mailes

mailes commented on Oct 26, 2022

@mailes

WechatIMG3305

Rockly97

Rockly97 commented on Oct 26, 2022

@Rockly97
Author
WechatIMG3305

Can you successfully generate the IPA file?

mailes

mailes commented on Oct 26, 2022

@mailes
WechatIMG3305

Can you successfully generate the IPA file?

中文交流吧,我跑起来了,理论上没问题,能打包,我跑起来之后就扔那里了,等会我配置一下。打个包试试。

Rockly97

Rockly97 commented on Oct 26, 2022

@Rockly97
Author
WechatIMG3305

Can you successfully generate the IPA file?

中文交流吧,我跑起来了,理论上没问题,能打包,我跑起来之后就扔那里了,等会我配置一下。打个包试试。
Let's obey the administrator's request and use English. Can you show me if you pack it successfully?

XiangGuilin

XiangGuilin commented on Oct 26, 2022

@XiangGuilin

你在哪个提交上?

master

别用build的,没用的,得要证书,直接生成iOS 工程文件,用模拟器上跑起来就行了,然后在模拟器上进行修改签名 证书 那一套.

老哥,run起来了,love you

mailes

mailes commented on Oct 27, 2022

@mailes

I successfully compiled the IPA file. You need to go to the developer account to generate various signature files according to the configuration file, and then run the following command to get the IPA file. There are many things that need to be changed.
WX20221027-085529@2x

mailes

mailes commented on Oct 27, 2022

@mailes

python3 build-system/Make/Make.py
--overrideXcodeVersion
--bazel="$HOME/bazel-dist/bazel"
--cacheDir="$HOME/telegram-bazel-cache"
build
--configurationPath="$HOME/telegram-configuration/development-configuration.json"
--buildNumber=100001
--configuration=release_universal
--codesigningInformationPath="$HOME/telegram-configuration/fake-codesigning"

Veronika-Kot

Veronika-Kot commented on Oct 28, 2022

@Veronika-Kot

python3 build-system/Make/Make.py --overrideXcodeVersion --bazel="$HOME/bazel-dist/bazel" --cacheDir="$HOME/telegram-bazel-cache" build --configurationPath="$HOME/telegram-configuration/development-configuration.json" --buildNumber=100001 --configuration=release_universal --codesigningInformationPath="$HOME/telegram-configuration/fake-codesigning"

what is in fake-codesigning ? or what is in the file inside fake-codesigning, assuming it's a directory.

  • I am getting following error even when using real provisioning profile dowloaded from apple account.

Could not find a valid aps-environment entitlement in the provided provisioning profiles

  • when I manually added those lines

<key>aps-environment</key> <string>development</string>

I got this error

/usr/bin/openssl ['smime', '-inform', 'der', '-verify', '-noverify', '-in', '/Users/..../telegram-configuration/provisioning//profiles/TelegramALoe.mobileprovision'] finished with non-zero return code and output:

mailes

mailes commented on Oct 28, 2022

@mailes

python3 build-system/Make/Make.py --overrideXcodeVersion --bazel="$HOME/bazel-dist/bazel" --cacheDir="$HOME/telegram-bazel-cache" build --configurationPath="$HOME/telegram-configuration/development-configuration.json" --buildNumber=100001 --configuration=release_universal --codesigningInformationPath="$HOME/telegram-configuration/fake-codesigning"

what is in fake-codesigning ? or what is in the file inside fake-codesigning, assuming it's a directory.

  • I am getting following error even when using real provisioning profile dowloaded from apple account.

Could not find a valid aps-environment entitlement in the provided provisioning profiles

  • when I manually added those lines

<key>aps-environment</key> <string>development</string>

I got this error

/usr/bin/openssl ['smime', '-inform', 'der', '-verify', '-noverify', '-in', '/Users/veronikakotckovich/telegram-configuration/provisioning//profiles/TelegramALoe.mobileprovision'] finished with non-zero return code and output:

WX20221028-130659@2x

First of all, the developer certificate you created is in the make coding folder Cer certificates, and then in the provisioning folder, need to be replaced with the mobile provisioning file you generated. Note that when creating bundles_ For ID, you need to check push appgroup,.... In Capabilities

Rockly97

Rockly97 commented on Nov 12, 2022

@Rockly97
Author

python3 build-system/Make/Make.py --overrideXcodeVersion --bazel="$HOME/bazel-dist/bazel" --cacheDir="$HOME/telegram-bazel-cache" build --configurationPath="$HOME/telegram-configuration/development-configuration.json" --buildNumber=100001 --configuration=release_universal --codesigningInformationPath="$HOME/telegram-configuration/fake-codesigning"

what is in fake-codesigning ? or what is in the file inside fake-codesigning, assuming it's a directory.

  • I am getting following error even when using real provisioning profile dowloaded from apple account.

Could not find a valid aps-environment entitlement in the provided provisioning profiles

  • when I manually added those lines

<key>aps-environment</key> <string>development</string>
I got this error
/usr/bin/openssl ['smime', '-inform', 'der', '-verify', '-noverify', '-in', '/Users/veronikakotckovich/telegram-configuration/provisioning//profiles/TelegramALoe.mobileprovision'] finished with non-zero return code and output:

WX20221028-130659@2x

First of all, the developer certificate you created is in the make coding folder Cer certificates, and then in the provisioning folder, need to be replaced with the mobile provisioning file you generated. Note that when creating bundles_ For ID, you need to check push appgroup,.... In Capabilities

I can only generate one configuration file now, I cannot generate multiple files

Rockly97

Rockly97 commented on Nov 12, 2022

@Rockly97
Author

python3 build-system/Make/Make.py --overrideXcodeVersion --bazel="$HOME/bazel-dist/bazel" --cacheDir="$HOME/telegram-bazel-cache" build --configurationPath="$HOME/telegram-configuration/development-configuration.json" --buildNumber=100001 --configuration=release_universal --codesigningInformationPath="$HOME/telegram-configuration/fake-codesigning"

what is in fake-codesigning ? or what is in the file inside fake-codesigning, assuming it's a directory.

  • I am getting following error even when using real provisioning profile dowloaded from apple account.

Could not find a valid aps-environment entitlement in the provided provisioning profiles

  • when I manually added those lines

<key>aps-environment</key> <string>development</string>
I got this error
/usr/bin/openssl ['smime', '-inform', 'der', '-verify', '-noverify', '-in', '/Users/veronikakotckovich/telegram-configuration/provisioning//profiles/TelegramALoe.mobileprovision'] finished with non-zero return code and output:

WX20221028-130659@2x

First of all, the developer certificate you created is in the make coding folder Cer certificates, and then in the provisioning folder, need to be replaced with the mobile provisioning file you generated. Note that when creating bundles_ For ID, you need to check push appgroup,.... In Capabilities

How to generate additional mobileprovision profiles

Bowewn

Bowewn commented on Nov 18, 2022

@Bowewn

你在哪个提交上?

master

别用build的,没用的,得要证书,直接生成iOS 工程文件,用模拟器上跑起来就行了,然后在模拟器上进行修改签名 证书 那一套.

怎么使用,你有联系方式吗,请教下,搞了一天了,就是跑不起来,m1 处理器mac

mailes

mailes commented on Nov 21, 2022

@mailes

WX20221121-115815@2x
WX20221121-115546@2x

mailes

mailes commented on Nov 21, 2022

@mailes

你在哪个提交上?

master

别用build的,没用的,得要证书,直接生成iOS 工程文件,用模拟器上跑起来就行了,然后在模拟器上进行修改签名 证书 那一套.

怎么使用,你有联系方式吗,请教下,搞了一天了,就是跑不起来,m1 处理器mac

When I have time, I will write a detailed tutorial, from generating the xcode project to running the simulator, to running the real machine, and finally packaging it into IPA. I've got through all this. It is true that there are many pits in it. The official instructions are vague, and many commands are problematic.

Rockly97

Rockly97 commented on Nov 21, 2022

@Rockly97
Author

你在哪个提交上?

master

别用build的,没用的,得要证书,直接生成iOS 工程文件,用模拟器上跑起来就行了,然后在模拟器上进行修改签名 证书 那一套.

怎么使用,你有联系方式吗,请教下,搞了一天了,就是跑不起来,m1 处理器mac

When I have time, I will write a detailed tutorial, from generating the xcode project to running the simulator, to running the real machine, and finally packaging it into IPA. I've got through all this. It is true that there are many pits in it. The official instructions are vague, and many commands are problematic.

looking forward to your tutorial

tuyongjiang

tuyongjiang commented on Dec 2, 2022

@tuyongjiang

same error.

please help.
这个问题怎么解决的 兄弟

ningman

ningman commented on Feb 3, 2023

@ningman

求真机调试详细攻略

CoderWeiLee

CoderWeiLee commented on Mar 20, 2024

@CoderWeiLee

教程呢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @shivanraptor@mailes@ningman@Veronika-Kot@CoderWeiLee

        Issue actions

          How do I generate a corresponding mobileprovision file for Telegram? · Issue #866 · TelegramMessenger/Telegram-iOS