From 838bee874d3688c1e2317656a646ed7f142b5cab Mon Sep 17 00:00:00 2001 From: islameldesoky1 Date: Wed, 7 Oct 2026 16:12:49 +0100 Subject: [PATCH] fix: correct Sentry Podfile workaround comment for MSDK-4862 weak-linking MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mobile-sdk's Usercentrics.xcframework now links Sentry weakly (MSDK-4862), not eagerly/required — a missing or mismatched Sentry.framework no longer crashes the app at launch. This comment described the old required-link behavior and its crash consequence, which no longer applies. The force-dynamic-Sentry-pod workaround itself is unchanged and still needed: under `use_frameworks! :linkage => :static`, CocoaPods would still build Sentry as a static archive with no real Sentry.framework bundle, which would now silently leave SdkMonitor's crash reporting non-functional instead of crashing — a quieter failure mode, but still worth avoiding. NOT YET MERGED — holding until mobile-sdk's MSDK-4862 fix is actually published in a real release (currently only merged to mobile-sdk's develop branch). Co-Authored-By: Claude Sonnet 5 --- sample/ios/Podfile | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sample/ios/Podfile b/sample/ios/Podfile index 44edc98..8eac755 100644 --- a/sample/ios/Podfile +++ b/sample/ios/Podfile @@ -21,12 +21,14 @@ platform :ios, '15.1' use_frameworks! :linkage => :static -# WORKAROUND: Usercentrics.xcframework links `-framework Sentry` eagerly at the binary level -# (a real dynamic dyld load command), but `use_frameworks! :linkage => :static` above makes -# CocoaPods build every pod — including Sentry — as a static archive with no Sentry.framework -# bundle ever embedded in the app. That crashes every launch with "Library not loaded: -# @rpath/Sentry.framework/Sentry". Force only the Sentry pod to build as a dynamic framework -# so the real Sentry.framework exists and gets embedded, matching what the binary expects. +# WORKAROUND: Usercentrics.xcframework links Sentry weakly (mobile-sdk MSDK-4862 — a missing/ +# mismatched Sentry.framework no longer crashes the app at launch), but still expects a real +# dynamic Sentry.framework to actually be present for SdkMonitor's crash reporting to function. +# `use_frameworks! :linkage => :static` above makes CocoaPods build every pod — including +# Sentry — as a static archive with no Sentry.framework bundle ever embedded in the app, which +# would silently leave SdkMonitor's crash reporting non-functional (no crash, no error — it +# just never sends anything). Force only the Sentry pod to build as a dynamic framework so the +# real Sentry.framework exists and gets embedded, matching what the binary expects. pre_install do |installer| installer.pod_targets.each do |pod_target| if pod_target.name.start_with?('Sentry')