steps-xcode-archive icon indicating copy to clipboard operation
steps-xcode-archive copied to clipboard

xcode-archive not working for framework target

Open jimdowning-cyclops opened this issue 1 year ago • 2 comments

Troubleshooting

  • [Yes ] I've searched discuss.bitrise.io for possible solutions.
  • Which version of the step is effected? 5.1.2
  • Is the issue reproducible with the latest version? YES
  • Does the issue happen sporadically, or every time? EVERY TIME
  • Is the issue reproducible locally by following our local debug guide? YES

Useful information

Issue description

I'm trying to use the Xcode Archive & export for iOS step to build my framework targets as xcarchive, so that I can then package them in an xcframework and distribute them. I have another build which is successfully doing this using a script like

xcodebuild archive \
    -scheme "${SCHEME_NAME}_iOS" \
    -destination "generic/platform=iOS" \
    -archivePath ".build/ios.xcarchive" \
    -derivedDataPath ".build/iosdd" \
    BUILD_LIBRARY_FOR_DISTRIBUTION=YES \
    SKIP_INSTALL=NO \
    ENABLE_BITCODE=NO \
    SWIFT_VERSION=5.8

but I want to use the step to take advantage of the built in code signing features of this step.

Bitrise info

  • Build URL: https://app.bitrise.io/build/9bf87f77-565d-420e-99a1-99b72fc43ae8
  • Bitrise Support enabled: YES
  • Log:
resolved source packages: swift-log, CyclopsSensorPackage, CoreBluetoothMock
[14:05:03] Resolved package dependencies.
Looking for artifact name as field is empty
[14:05:03] Reading build settings...
[14:05:03] $ xcodebuild "-project" "/Users/jimdowning/Code/cyclopssensorpackage/CyclopsSensorPackage.xcodeproj" "-scheme" "CyclopsSensorPackage_iOS" "-showBuildSettings"
[14:05:04] Read target settings.
Automatic code signing is disabled, skipped downloading code sign assets

[14:05:04] Opening xcode project at path: /Users/jimdowning/Code/cyclopssensorpackage/CyclopsSensorPackage.xcodeproj for scheme: CyclopsSensorPackage_iOS Failed to execute Step main logic: failed to open project: /Users/jimdowning/Code/cyclopssensorpackage/CyclopsSensorPackage.xcodeproj: archivable entry not found

Exporting outputs... Failed to execute Step main logic: failed to open project: /Users/jimdowning/Code/cyclopssensorpackage/CyclopsSensorPackage.xcodeproj: archivable entry not found | | +---+---------------------------------------------------------------+----------+ | x | Xcode Archive & Export for iOS (Failed) | 4.10 sec | +---+---------------------------------------------------------------+----------+ | Issue tracker: https://github.com/bitrise-steplib/steps-xcode-archive/issues | | Source: https://github.com/bitrise-steplib/steps-xcode-archive | +---+---------------------------------------------------------------+----------+

Steps to reproduce

  1. Create an xcode project e.g. by using an xcodegen step in the workflow with a project manifest like
name: CyclopsSensorPackage
options:
  bundleIdPrefix: myBundlePrefix
  deploymentTarget:
    iOS: 14.0
targets:
  CyclopsSensorPackage:
    type: framework
    platform: [iOS]
    sources:
      - Sources
    dependencies:
      - package: Logging
packages:
  SwiftPackageManager:
    path: ./
  Logging:
    url: https://github.com/apple/swift-log.git
    version: 1.5.4
  1. Add the xcodebuild step e.g.
    - xcode-archive@5:
        inputs:
        - project_path: ./CyclopsSensorPackage.xcodeproj
        - xcodebuild_options: |-
            BUILD_LIBRARY_FOR_DISTRIBUTION=YES
            SKIP_INSTALL=NO
            SWIFT_VERSION=5.8
            ENABLE_BITCODE=NO

jimdowning-cyclops avatar Jul 18 '24 15:07 jimdowning-cyclops