fix: support Facebook SDK 18 and fix $FacebookSDKVersion override - #57
Merged
vgupta98 merged 3 commits intoJul 6, 2026
Conversation
- widen default FBSDKCoreKit constraint from `~> 17.0.2` to `>= 17.0.2, < 19.0` to allow Facebook SDK 18.x - fix `$FacebookSDKVersion` override crashing pod install (missing `$` referenced undefined constant Pod::FacebookSDKVersion) - splat the version via `*Array(...)` so both string overrides and the default range are passed to s.dependency Scanned-by: gitleaks 8.29.0
There was a problem hiding this comment.
Pull request overview
This PR updates the CocoaPods spec for the Rudder Facebook integration to allow installation alongside newer Facebook SDK releases (18.x) and fixes a pod install crash when users override the Facebook SDK version via $FacebookSDKVersion in their Podfile.
Changes:
- Widened the default
FBSDKCoreKitversion constraints to allow Facebook SDK 17.x and 18.x (>= 17.0.2,< 19.0). - Fixed the
$FacebookSDKVersionoverride log interpolation so it doesn’t reference an undefined constant. - Updated dependency declaration to forward either a string override or an array of requirements correctly (
*Array(facebook_sdk_version)).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Join the version requirement array so the install log prints `>= 17.0.2, < 19.0` instead of the raw Ruby array literal. Scanned-by: gitleaks 8.29.0
dciccale
reviewed
Jul 2, 2026
Guard the override on a non-empty value so a nil/blank $FacebookSDKVersion (e.g. from a missing env var) falls back to the default `>= 17.0.2, < 19.0` range instead of dropping the version cap. Scanned-by: gitleaks 8.29.0
dciccale
approved these changes
Jul 3, 2026
dciccale
left a comment
Contributor
There was a problem hiding this comment.
Re-reviewed the latest changes. The nil/empty $FacebookSDKVersion fallback is addressed, and validation is green.
vgupta98
deleted the
fix/sdk-5068-support-facebook-sdk-18-and-fix-facebooksdkversion-override
branch
July 6, 2026 11:40
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.
Description
Updates the
FBSDKCoreKitdependency handling inRudder-Facebook.podspecto support Facebook SDK 18.x and to fix a crash in the$FacebookSDKVersionoverride path.Previously the pod pinned the Facebook SDK to
~> 17.0.2, which only allows17.0.x. Apps that use Facebook SDK 18.x could not install the pod because of a version conflict. Additionally, setting the$FacebookSDKVersionglobal in aPodfilecrashedpod installdue to a missing$in a log statement.Type of change
Implementation Details
~> 17.0.2to['>= 17.0.2', '< 19.0'], allowing all17.xand18.xreleases.$FacebookSDKVersionoverride log line: it referenced#{FacebookSDKVersion}(missing the$), which Ruby resolved as the undefined constantPod::FacebookSDKVersionand crashedpod installwithuninitialized constant Pod::FacebookSDKVersion. Now uses#{$FacebookSDKVersion}.s.dependencyvia*Array(facebook_sdk_version), so both a user-supplied string override and the default multi-requirement array are forwarded correctly.Checklist
How to test?
Verified locally against the
Exampleapp:pod update FBSDKCoreKitinstallsFBSDKCoreKit 18.1.0with the new range (previously blocked at17.0.x).$FacebookSDKVersion = '~> 17.0'in thePodfileand runpod install; it printsUsing user specified Facebook SDK versionand installs successfully. On the previous podspec the same step crashed withuninitialized constant Pod::FacebookSDKVersion.xcodebuildof theRudder-Facebook-Examplescheme againstFBSDKCoreKit 18.1.0completes withBUILD SUCCEEDED; the integration only uses stable App Events APIs unchanged in 18.Breaking Changes
None. The change only widens the allowed dependency range and fixes the override path; existing installs on
17.xare unaffected.Maintainers Checklist
Screenshots (if applicable)
N/A
Additional Context
Reference implementation: original external contribution in #56. Tracked under Linear SDK-5068.