bitrise-steplib / steps-xcode-archive

Xcode Archive for iOS step
MIT License
68 stars 56 forks source link

xcode-archive not working for framework target #353

Open jimdowning-cyclops opened 3 months ago

jimdowning-cyclops commented 3 months ago

Troubleshooting

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

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
  2. 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
bitrise-coresteps-bot commented 2 weeks ago

Hello there, I'm a bot. On behalf of the community I thank you for opening this issue.

To help our human contributors focus on the most relevant reports, I check up on old issues to see if they're still relevant. This issue has had no activity for 90 days, so I marked it as stale.

The community would appreciate if you could check if the issue still persists. If it isn't, please close it. If the issue persists, and you'd like to remove the stale label, you simply need to leave a comment. Your comment can be as simple as "still important to me".

If no comment left within 21 days, this issue will be closed.

jimdowning-cyclops commented 2 weeks ago

Still important to me.