You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
⚠️ All the analysis is based on this PR #7598 and not on the code that's currently in main branch.
That was all detected as part of the ongoing initiative to migrate to SPM.
To fully decouple from <Sentry/PrivateSentrySDKOnly.h> and the ${PODS_ROOT}/Sentry/Sources/Sentry/include header search path (both are required to be done to consume sentry-cocoa as an xcframework or via SPM binaryTarget) we need
22 missing APIs to be exposed publicly (see list below) either via PrivateSentrySDKOnly.h or any other way (@philprime had an idea of introducing SentrySDK.internal.<api>)
SentryDefines.h macros (SENTRY_NO_INIT, etc.) are reachable from the new ObjC wrapper headers
Here are the missing APIs:
+[PrivateSentrySDKOnly optionsWithDictionary:didFailWithError:] (used at RNSentrySDK.m:63 and RNSentryStart.m:50 to construct SentryOptions from a JS-side options dictionary)
+[PrivateSentrySDKOnly addSdkPackage:version:] (used at RNSentryStart.m:26)
PrivateSentrySDKOnly.appStartMeasurementHybridSDKMode (used at RNSentryStart.m:217)
PrivateSentrySDKOnly.framesTrackingMeasurementHybridSDKMode (used at RNSentryStart.m:221)
PrivateSentrySDKOnly.isFramesTrackingRunning (used at RNSentry.mm:523)
+[PrivateSentrySDKOnly appStartMeasurementWithSpans] (used at RNSentry.mm:497)
class SentryAppStartMeasurement (used at RNSentry.mm:22 as #import)
+[PrivateSentrySDKOnly startProfilerForTrace:] (used at RNSentry.mm:975)
+[PrivateSentrySDKOnly discardProfilerForTrace:] (used at RNSentry.mm:989, 1001, 1078, 1090)
+[PrivateSentrySDKOnly collectProfileBetween:and:forTrace:] (used at RNSentry.mm:1021)
+[PrivateSentrySDKOnly envelopeWithData:] (used at RNSentry.mm:575)
+[PrivateSentrySDKOnly captureScreenshots] (used at RNSentry.mm:598)
+[PrivateSentrySDKOnly captureViewHierarchy] (used at RNSentry.mm:631)
+[PrivateSentrySDKOnly getExtraContext] (used at RNSentry.mm:407, 459)
+[PrivateSentrySDKOnly setCurrentScreen:] (used at RNSentry.mm:722)
+[PrivateSentrySDKOnly setRedactContainerClass:] (used at RNSentryReplay.mm:72)
+[PrivateSentrySDKOnly setIgnoreContainerClass:] (used at RNSentryReplay.mm:73)
+[PrivateSentrySDKOnly configureSessionReplayWith:screenshotProvider:] (used at RNSentryReplayBreadcrumbConverterHelper.m:12)
+[PrivateSentrySDKOnly getReplayIntegration] (used at RNSentry.mm:819-823)
+[PrivateSentrySDKOnly captureReplay] (used at RNSentry.mm:840)
+[PrivateSentrySDKOnly getReplayId] (used at RNSentry.mm:841, 858, 948)
Extra information:
The new public SentryOptions has no public initializer at all — no +new, no -init…, no dict-based factory. The only construction path is SentryObjCSDK.startWithConfigureOptions:. As a workaround, we can manually iterate our JS dict inside the configure block and set each property individually.
Problem Statement
mainbranch.That was all detected as part of the ongoing initiative to migrate to SPM.
To fully decouple from
<Sentry/PrivateSentrySDKOnly.h>and the${PODS_ROOT}/Sentry/Sources/Sentry/includeheader search path (both are required to be done to consume sentry-cocoa as an xcframework or via SPMbinaryTarget) we needPrivateSentrySDKOnly.hor any other way (@philprime had an idea of introducingSentrySDK.internal.<api>)sentry_formatHexAddress*helpers (done here: Locally vendorsentry_formatHexAddress*helpers sentry-react-native#6112) — simply because those are general 1-2 line functions and it makes no sense to expose them publiclySentryDefines.hmacros (SENTRY_NO_INIT, etc.) are reachable from the new ObjC wrapper headersHere are the missing APIs:
+[PrivateSentrySDKOnly optionsWithDictionary:didFailWithError:](used atRNSentrySDK.m:63andRNSentryStart.m:50to constructSentryOptionsfrom a JS-side options dictionary)+[PrivateSentrySDKOnly addSdkPackage:version:](used atRNSentryStart.m:26)PrivateSentrySDKOnly.appStartMeasurementHybridSDKMode(used atRNSentryStart.m:217)PrivateSentrySDKOnly.framesTrackingMeasurementHybridSDKMode(used atRNSentryStart.m:221)PrivateSentrySDKOnly.currentScreenFrames(+.total,.frozen,.slow) (used atSentryScreenFramesWrapper.m:10, 18, 26, 34)PrivateSentrySDKOnly.isFramesTrackingRunning(used atRNSentry.mm:523)+[PrivateSentrySDKOnly appStartMeasurementWithSpans](used atRNSentry.mm:497)SentryAppStartMeasurement(used atRNSentry.mm:22as #import)+[PrivateSentrySDKOnly startProfilerForTrace:](used atRNSentry.mm:975)+[PrivateSentrySDKOnly discardProfilerForTrace:](used atRNSentry.mm:989, 1001, 1078, 1090)+[PrivateSentrySDKOnly collectProfileBetween:and:forTrace:](used atRNSentry.mm:1021)+[PrivateSentrySDKOnly envelopeWithData:](used atRNSentry.mm:575)+[PrivateSentrySDKOnly captureScreenshots](used atRNSentry.mm:598)+[PrivateSentrySDKOnly captureViewHierarchy](used atRNSentry.mm:631)+[PrivateSentrySDKOnly getExtraContext](used atRNSentry.mm:407, 459)+[PrivateSentrySDKOnly setCurrentScreen:](used atRNSentry.mm:722)+[PrivateSentrySDKOnly setRedactContainerClass:](used atRNSentryReplay.mm:72)+[PrivateSentrySDKOnly setIgnoreContainerClass:](used atRNSentryReplay.mm:73)+[PrivateSentrySDKOnly configureSessionReplayWith:screenshotProvider:](used atRNSentryReplayBreadcrumbConverterHelper.m:12)+[PrivateSentrySDKOnly getReplayIntegration](used atRNSentry.mm:819-823)+[PrivateSentrySDKOnly captureReplay](used atRNSentry.mm:840)+[PrivateSentrySDKOnly getReplayId](used atRNSentry.mm:841, 858, 948)Extra information:
SentryOptionshas no public initializer at all — no+new, no-init…, no dict-based factory. The only construction path isSentryObjCSDK.startWithConfigureOptions:. As a workaround, we can manually iterate our JS dict inside the configure block and set each property individually.Solution Brainstorm
No response
Are you willing to submit a PR?
No response