简体   繁体   中英

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 .

Two things I'm currently having problems with are:

  1. I don't know how to get .app file straight from build command
  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)

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"
  }
)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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