GIT中的Fastlane Appfile?如何检索当前的apple_id?

Fah*_*him 3 git xcode ios crashlytics fastlane

我为我的XCode项目设置了Fastlane以实现构建自动化.至少Fastfile(包含构建选项)应该在GIT中,但我也很高兴在GIT中也有Appfile(团队标识符).主要问题:Appfile应该包含我的苹果ID.样品:

apple_id "myid@gmail.com" # Your Apple email address

# Default team ID
team_id "AUE7D4LRRX"

for_platform :ios do
 for_lane :production do
    team_id '-' #reset team id
  end
end
Run Code Online (Sandbox Code Playgroud)

是否有可能从apple/xcode首选项动态检索apple id?在当前的解决方案中,我无法将此Appfile添加到GIT,因为每个开发人员都拥有该文件的自己版本...当然,使用不同的苹果ID!

谢谢和最好的问候!

Kra*_*eFx 6

您可以使用环境变量轻松设置apple id

Appfile

apple_id ENV["APPLE_ID"]

...
Run Code Online (Sandbox Code Playgroud)

然后运行fastlane

APPLE_ID="email@email.com" fastlane beta
Run Code Online (Sandbox Code Playgroud)

或类似的