yonaskolb / yonaskolb/XcodeGen

Independent Watch App - Invalid Archive - TestFlight Rejection

Open
#845 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Swift
Stars
8.8k
Forks
908
Avg merge
17d 14h
Merged PRs (30d)
2

Description

As a followup to issue #595 ...

With an archive built from an XcodeGen Xcode project, I ran into an issue with deploying the Watch app to TestFlight:
Screen Shot 2020-04-23 at 8 04 09 AM

Using an Xcode project created via Xcode, deployment to TestFlight worked fine.

Here's the differences between the two archives' .app file:
Screen Shot 2020-04-24 at 9 38 34 AM

The big differences I notice are:

  • Notice the compiled Launchscreen.storyboardc under Base.lproj which Xcode adds automatically.
  • As well the Assets.car file containing the app icons.

Both of these contain no source, so Xcode appears to be adding these automatically during archiving.

Here's what my project.yml looks like:

name: Heartwitch
options:
  bundleIdPrefix: com.brightdigit
settings:
  DEVELOPMENT_TEAM: MLT7M394S7
  CODE_SIGN_IDENTITY: "Apple Development"
  CODE_SIGN_STYLE: Automatic
  MARKETING_VERSION: "1.1"
  CURRENT_PROJECT_VERSION: "28"
  SDKROOT: iphoneos
packages:
  HeartwitchKit:
    path: ./Packages/HeartwitchKit
fileGroups:
  - "Assets"
targets:
  Heartwitch-watchOS-app.watchkitapp.watchkitextension:
    type: watchkit2-extension
    platform: watchOS
    dependencies:
      - package: HeartwitchKit
      - sdk: HealthKit.framework
    sources: 
      - path: "Sources/Extension"
        name: Sources
        group: Extension
      - path: "PLists/Extension"
        name: Support
        group: Extension
    entitlements:
      path: PLists/Extension/Extension.entitlements
      properties:
        com.apple.developer.healthkit: true
        com.apple.developer.healthkit.access: []
    info: 
      path: PLists/Extension/Info.plist
      properties:
        WKWatchOnly: true
        CFBundleShortVersionString: $(MARKETING_VERSION)
        CFBundleVersion: $(CURRENT_PROJECT_VERSION)
        CFBundleDisplayName: Heartwitch
        NSExtension:
            NSExtensionAttributes:
              WKAppBundleIdentifier : com.brightdigit.Heartwitch-watchOS-app.watchkitapp
            NSExtensionPointIdentifier: com.apple.watchkit
        WKBackgroundModes: ["workout-processing"]
        NSHealthShareUsageDescription: "Heartwitch would like to have permission to read these samples for broadcast."
        NSHealthUpdateUsageDescription: "Heartwitch would like to have permission to update workouts and health samples."
  Heartwitch-watchOS-app.watchkitapp:
    type: application.watchapp2
    platform: watchOS
    dependencies:
      - target: "Heartwitch-watchOS-app.watchkitapp.watchkitextension"
    sources: 
      - path: "Sources/Application"
        name: Sources
        group: Application
      - path: "PLists/Application"
        name: Support
        group: Application
    info:
      path: PLists/Application/Info.plist
      properties:
        WKWatchKitApp: true
        CFBundleShortVersionString: $(MARKETING_VERSION)
        CFBundleVersion: $(CURRENT_PROJECT_VERSION)
        CFBundleDisplayName: Heartwitch
    settings:
      ASSETCATALOG_COMPILER_APPICON_NAME: AppIcon
      PRODUCT_NAME: Heartwitch
      PRODUCT_MODULE_NAME: Heartwitch_watchOS_app_watchkitapp_watchkitextension
      IBSC_MODULE: Heartwitch_watchOS_app_watchkitapp_watchkitextension
  Heartwitch-watchOS-app:
    type: application.watchapp2-container
    platform: iOS
    dependencies:
      - target: "Heartwitch-watchOS-app.watchkitapp"
    sources: 
      - path: "PLists/Container"
        name: Support
        group: Container
    info:
      path: plists/Container/Info.plist
      properties:
        ITSAppUsesNonExemptEncryption: false
        NSHealthShareUsageDescription: "Heartwitch would like to have permission to read these samples for broadcast."
        NSHealthUpdateUsageDescription: "Heartwitch would like to have permission to update workouts and health samples."
        CFBundleShortVersionString: $(MARKETING_VERSION)
        CFBundleVersion: $(CURRENT_PROJECT_VERSION)
        CFBundleDisplayName: Heartwitch
    settings:
      PRODUCT_NAME: Heartwitch
      TARGETED_DEVICE_FAMILY: 1

Let me know if you have any thoughts on this or how I might need to correct my project.yml file.

Thanks,
Leo

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the project.yml configuration and compare the XcodeGen archive with the working Xcode-created archive, focusing on Launchscreen.storyboardc and Assets.car in the .app bundle. Reproduce the watchOS archive and TestFlight deployment, then verify that the generated archive contains the required files and is accepted by TestFlight.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
build-system, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.