简体   繁体   English

如何使用 fastlane 为模拟器构建 iOS 应用程序?

[英]How to build iOS app for simulator using fastlane?

For automation testing purposes I'm trying to build iOS app via jenkins job for simulator using fastlane build_app script .出于自动化测试目的,我正在尝试使用fastlane build_app脚本通过jenkins job模拟器构建 iOS 应用程序。

Two things I'm currently having problems with are:我目前遇到的两件事是:

  1. I don't know how to get .app file straight from build command我不知道如何直接从 build 命令获取.app file
  2. When I create .ipa file I get .app file simply by extracting the .ipa , but somehow that .app won't open on my simulator (simulator is the corresponding one)当我创建.ipa文件时,我只需提取.ipa即可获得.app file ,但不知何故.app不会在我的模拟器上打开(模拟器是对应的)

The lane I'm using looks as following ->我正在使用的车道如下所示->

lane :app_for_simulator do
    match(type: "development")
    build_app(
      scheme: "MyApp",
      export_method: "development",
      configuration: "Debug",
      destination: "platform=iOS Simulator,name=iPhone 11,OS=13.1",
      output_name: "MyApp.ipa"
    )
  end

Has anyone had similar problems and managed to resolve them?有没有人遇到过类似的问题并设法解决了?

Looked across other topics but didn't manage to find the answer.浏览了其他主题,但没有找到答案。 Thanks in advance提前致谢

This is what we use:这就是我们使用的:

xcodebuild(
  {
    clean: true,
    build: true,
    workspace: "./MyApp.xcworkspace",
    output_name: "MyApp.ipa",
    scheme: "MyApp",
    sdk: "iphonesimulator",
    destination: "platform=iOS Simulator,name=iPhone 5s",
    xcargs: "ONLY_ACTIVE_ARCH=NO"
  }
)

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

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