Skip to content

Switch SwiftPM Superscript dep to superscript-ios-next#469

Merged
ianrumac merged 1 commit intodevelopfrom
switch-to-superscript-ios-next
May 6, 2026
Merged

Switch SwiftPM Superscript dep to superscript-ios-next#469
ianrumac merged 1 commit intodevelopfrom
switch-to-superscript-ios-next

Conversation

@anglinb
Copy link
Copy Markdown
Collaborator

@anglinb anglinb commented May 5, 2026

Summary

Why

Superscript-iOS has been committing the ~250 MB libcel.xcframework into git on every release for over 20 versions. Its .git is ~1.2 GB and SwiftPM cannot do shallow clones, so every fresh swift package resolve of SuperwallKit pays for the full clone — minutes on slow connections, painful on CI.

superscript-ios-next distributes the framework as a GitHub Release asset and uses SwiftPM's binaryTarget(url:checksum:). The repo itself is ~60 KB. I measured a fresh consumer resolve and the git-side work completes in ~2 seconds; the binary download is then cached at ~/Library/Caches/org.swift.swiftpm.

What's NOT in this PR

CocoaPods is intentionally untouched. SuperwallKit.podspec still depends on Superscript 1.0.13 from CocoaPods Trunk. The pod is published by the legacy repo's pipeline, and superscript-ios-next does not yet have its COCOAPODS_TRUNK_TOKEN configured. Once that's set up and a release is published from the new repo, we can bump the podspec dep in a follow-up PR. Pod consumers are unaffected by this change.

Files touched

File Change
Package.swift package(url:) and product(name:package:) updated
Package.resolved regenerated by swift package resolve
project.yml XcodeGen packages.Superscript.url + exactVersion
SuperwallKit.xcodeproj/project.pbxproj XCRemoteSwiftPackageReference URL + version
SuperwallKit.xcodeproj/.../Package.resolved re-pinned
Examples/Basic/.../Package.resolved re-pinned
Examples/Advanced/.../Package.resolved re-pinned
CLAUDE.md dependency note refreshed

Test plan

  • swift package resolve succeeds (verified locally — git ops finish in ~2s vs. minutes against the legacy repo)
  • swift build for SuperwallKit succeeds against the new dep
  • CI passes
  • Open SuperwallKit.xcodeproj in Xcode, confirm package re-resolves cleanly (Xcode will refresh the originHash in the workspace Package.resolved automatically — minor follow-up diff expected)
  • Build & run Examples/Basic and Examples/Advanced end-to-end
  • Smoke-test audience-filter evaluation (the Superscript consumers in CELEvaluator.swift and EvaluationContext.swift) — module API surface is identical, but the underlying xcframework comes via a different transport now

Related

🤖 Generated with Claude Code

Greptile Summary

This PR migrates the SwiftPM Superscript dependency from superwall/Superscript-iOS (1.0.13) to superwall/superscript-ios-next (1.0.14), a slim repo that distributes libcel.xcframework via a GitHub Release binary target instead of committing it to git. All eight affected files (Package.swift, project.yml, project.pbxproj, and five Package.resolved files) are updated consistently to the same URL, version, and revision (abb2c8c9); the public module name Superscript is unchanged so no source edits are needed.

Confidence Score: 5/5

Safe to merge — purely a dependency source/version update with no source code changes and full consistency across all resolved files.

All Package.resolved files agree on the new URL, version 1.0.14, and commit hash abb2c8c9. The public module API is unchanged. CocoaPods is intentionally left at the previous version with a clear follow-up plan. No logic changes, no source edits, no migration risks.

No files require special attention. The originHash in SuperwallKit.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved is expected to regenerate when Xcode next opens the project, as noted in the PR test plan.

Important Files Changed

Filename Overview
Package.swift Dependency URL and package name updated from Superscript-iOS 1.0.13 to superscript-ios-next 1.0.14; module product name Superscript unchanged so no import churn.
Package.resolved Re-pinned to superscript-ios-next 1.0.14 at commit abb2c8c9; consistent with all other resolved files in the PR.
SuperwallKit.xcodeproj/project.pbxproj XCRemoteSwiftPackageReference URL and version updated to superscript-ios-next 1.0.14; PBXPROJ object IDs preserved, product dependency name Superscript unchanged.
SuperwallKit.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved v2-format resolved file re-pinned to superscript-ios-next 1.0.14; originHash may be regenerated by Xcode on next open (noted in PR test plan).
project.yml XcodeGen packages.Superscript URL and exactVersion updated to superscript-ios-next 1.0.14; consistent with Package.swift.
CLAUDE.md Dependency note updated; also incidentally fixes a pre-existing stale version (CLAUDE.md said 1.0.4 but Package.swift had 1.0.13).
Examples/Advanced/Advanced.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved Re-pinned to superscript-ios-next 1.0.14 at the same revision as the root resolved file.
Examples/Basic/Basic.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved Re-pinned to superscript-ios-next 1.0.14 at the same revision as the root resolved file.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[SuperwallKit consumers] --> B[Package.swift / project.yml]
    B -->|SwiftPM resolves| C[superscript-ios-next @ 1.0.14\ngithub.com/superwall/superscript-ios-next]
    C -->|binaryTarget download\ncached in ~/Library/Caches| D[libcel.xcframework]
    D --> E[Superscript module\nused by CELEvaluator.swift\nand EvaluationContext.swift]
    B2[SuperwallKit.podspec] -->|CocoaPods — unchanged| F[Superscript 1.0.13 on CocoaPods Trunk\nlegacy Superscript-iOS repo]
    F --> G[libcel.xcframework\ncommitted to git — follow-up PR planned]
    style C fill:#d4edda,stroke:#28a745
    style F fill:#fff3cd,stroke:#ffc107
Loading

Reviews (1): Last reviewed commit: "Switch SwiftPM Superscript dependency to..." | Re-trigger Greptile

Migrates from `superwall/Superscript-iOS` (which committed the ~250 MB
libcel.xcframework into git, ballooning history past 1.2 GB and making
SPM clones painfully slow) to the new slim repo
`superwall/superscript-ios-next`, which distributes the xcframework as
a GitHub Release asset and uses SPM's binaryTarget(url:checksum:).

The Superscript Swift module name is unchanged, so source files don't
need edits. CocoaPods consumers are intentionally NOT touched in this
PR — the `Superscript` pod on Trunk is still published from the legacy
repo's pipeline. SuperwallKit.podspec keeps depending on
`Superscript`, '1.0.13'. We can flip the pod over later once the new
repo's COCOAPODS_TRUNK_TOKEN is configured and a release is published.
@ianrumac ianrumac merged commit 3b992d5 into develop May 6, 2026
4 checks passed
@ianrumac ianrumac deleted the switch-to-superscript-ios-next branch May 6, 2026 16:17
@ianrumac ianrumac restored the switch-to-superscript-ios-next branch May 6, 2026 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants