简体   繁体   English

Fastlane:使用在xconfig文件中设置了配置文件配置文件的GYM

[英]Fastlane: using GYM having provisionning profile set in xconfig files

I have read https://codesigning.guide/ but decided to not use this solution to store my provisionning profiles, but rather store them in the git of each project. 我已阅读https://codesigning.guide/,但决定不使用此解决方案来存储我的配置文件,而是将它们存储在每个项目的git中。

For my project, I have specified my provisionning profiles in my xconfig files (using PROVISIONING_PROFILE = ). 对于我的项目,我已经在我的xconfig文件中指定了配置文件(使用PROVISIONING_PROFILE =)。 I have these schemes perfectly working in Xcode - staging-dev - staging-adhoc 我在Xcode中完美地使用了这些方案-staging-dev-staging-adhoc

When Using gym() in my Fastfile I set my workspace and scheme like so: 在Fastfile中使用Gym()时,我将工作区和方案设置如下:

gym(
    workspace: xcworkspace_file,
    scheme: scheme_adhoc_name,
    clean: true
)

Note: xcworkspace_file and scheme_adhoc_name are variable set before. 注意:xcworkspace_file和scheme_adhoc_name是之前设置的变量。

It should be enough specifying my workspace and scheme, but when using fastlane, console says the following: 指定我的工作空间和方案就足够了,但是使用fastlane时,控制台会显示以下内容:

[17:14:09]: -----------------
[17:14:09]: --- Step: gym ---
[17:14:09]: -----------------
[17:14:09]: Found more than one provisioning profile in the project directory:
1. AdHoc_com.xxx.ddd.mobileprovision
2. Development_com.xxx.ddd.mobileprovision

If I select 1 or 2, it works but this shouldn't be asked because provisionning profile is already in xconfig used by my scheme. 如果我选择1或2,它可以工作,但是不应该问这个问题,因为我的方案使用的xconfig中已经有预配置文件。

Plus, I don't want to set ENV["PROVISIONING_PROFILE_TARGET1"] nor gym(provisioning_profile_path: ) (which is deprecated). 另外,我既不想设置ENV [“ PROVISIONING_PROFILE_TARGET1”]也不要设置Gym(provisioning_profile_path:)(已弃用)。

Why couldn't I simply use my values set in xconfig files? 为什么我不能简单地使用在xconfig文件中设置的值?

The question you get is because of the auto-detection of the provisioning profile in the current directory. 您遇到的问题是由于自动检测到当前目录中的配置文件。

You can either not have any provisioning profiles in the current directory, or just specify one using in your Fastfile , so that you don't get asked. 您或者在当前目录中没有任何配置文件,或者仅在Fastfile指定一个using,这样就不会出现询问。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM