feat(ios): declare FronteggSwift via spm_dependency (multi-target) — rebased, pinned 1.3.12 - #103
Closed
dianaKhortiuk-frontegg wants to merge 2 commits into
Closed
feat(ios): declare FronteggSwift via spm_dependency (multi-target) — rebased, pinned 1.3.12#103dianaKhortiuk-frontegg wants to merge 2 commits into
dianaKhortiuk-frontegg wants to merge 2 commits into
Conversation
…lper (multi-target workspaces)
ios/frontegg_spm.rb text-patches the host's Pods.xcodeproj with object
IDs sized for a single app target. Workspaces with many app targets
(white-label products build dozens from one workspace) can't use it —
the script writes references for a target layout that doesn't match.
React Native >= 0.75 ships an official mechanism for exactly this:
spm_dependency() in a library podspec, applied by
react_native_post_install to every target that consumes the pod, with
no pbxproj text manipulation. Declare FronteggSwift there, guarded by
defined?() so autolinking's out-of-process [!] A specification path is required.
Usage:
$ pod ipc spec PATH
Converts a podspec to JSON and prints it to STDOUT.
Options:
--allow-root Allows CocoaPods to run as root
--silent Show nothing
--verbose Show more debugging information
--no-ansi Show output without ANSI codes
--help Show help banner of specified command evaluation
(which doesn't load react_native_pods.rb) still parses the spec;
frontegg_spm.rb remains the documented fallback for older RN.
Validated on a 50-target workspace (RN 0.81.5, static linkage):
pod install injects one XCRemoteSwiftPackageReference; Debug and
Release builds of two app targets with different team/bundle IDs
succeed with no per-target configuration.
Align the spm_dependency pin and the Package.swift reference manifest to 1.3.12, matching the native-SDK bump in #92 (which covers frontegg_spm.rb and android/build.gradle). Keeps all iOS SPM integration paths on one version. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Collaborator
Author
|
Consolidated into #104 — combined with the other two RN release-prep PRs (cherry-picked onto current |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Recreates #99 as a Frontegg-owned branch, rebased on current
master(post-#100), with the FronteggSwift SPM pin aligned to 1.3.12.Declares FronteggSwift via React Native's official
spm_dependencyhelper (RN ≥ 0.75) soreact_native_post_installinjects the package into every app target — unblocking multi-target / white-label workspaces that the hardcoded-targetios/frontegg_spm.rbscript can't handle. On older RN thedefined?(spm_dependency)guard makes this a no-op andfrontegg_spm.rbstays the documented fallback.Version alignment (resolves the #92 ↔ #99 conflict)
Original #99 pinned
1.3.11. This bumps both thespm_dependencypin andios/Package.swift(the reference manifest, whose comment says to keep them in sync) to 1.3.12, matching #92's native bump. #92 still ownsios/frontegg_spm.rb+android/build.gradle, so there's no file overlap — and once both land, every iOS SPM path is on one version.Provenance
c0b078c— thespm_dependencymechanism, authored by @airowe (cherry-picked from feat(ios): declare FronteggSwift via React Native's spm_dependency helper — unblocks multi-target (white-label) workspaces #99, which this closes).0459d98— version alignment to 1.3.12.Validation
Full CI runs here (the original #99 predated the Build / Lint | Typecheck / Unit-Test checks — it had only run E2E). Multi-target build behavior was validated on airowe's original PR (~50 white-label targets, RN 0.81.5, static CocoaPods linkage); please let CI confirm on this branch.
Supersedes #99.
🤖 Generated with Claude Code