Skip to content

feat(ios): declare FronteggSwift via spm_dependency (multi-target) — rebased, pinned 1.3.12 - #103

Closed
dianaKhortiuk-frontegg wants to merge 2 commits into
masterfrom
feat/podspec-spm-dependency
Closed

feat(ios): declare FronteggSwift via spm_dependency (multi-target) — rebased, pinned 1.3.12#103
dianaKhortiuk-frontegg wants to merge 2 commits into
masterfrom
feat/podspec-spm-dependency

Conversation

@dianaKhortiuk-frontegg

Copy link
Copy Markdown
Collaborator

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_dependency helper (RN ≥ 0.75) so react_native_post_install injects the package into every app target — unblocking multi-target / white-label workspaces that the hardcoded-target ios/frontegg_spm.rb script can't handle. On older RN the defined?(spm_dependency) guard makes this a no-op and frontegg_spm.rb stays the documented fallback.

Version alignment (resolves the #92#99 conflict)

Original #99 pinned 1.3.11. This bumps both the spm_dependency pin and ios/Package.swift (the reference manifest, whose comment says to keep them in sync) to 1.3.12, matching #92's native bump. #92 still owns ios/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

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

airowe and others added 2 commits July 24, 2026 14:23
…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>
@dianaKhortiuk-frontegg

Copy link
Copy Markdown
Collaborator Author

Consolidated into #104 — combined with the other two RN release-prep PRs (cherry-picked onto current master, no conflicts, authorship preserved). Review and merge there. Closing this one.

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