Skip to content

Commit 65ebbdb

Browse files
authored
feat(SPM): Build full SDK with SPM (#5666)
1 parent 0e45d25 commit 65ebbdb

File tree

5 files changed

+28
-3
lines changed

5 files changed

+28
-3
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,10 @@ jobs:
112112
if: startsWith(github.ref, 'refs/heads/release/') == false
113113
steps:
114114
- uses: actions/checkout@v4
115-
# Only watchOS is compiling with SPM so far, the rest of the targets need profiling support which is still a work in progress due to the ObjC++ usage
116115
- run: rm -r Sentry.xcodeproj && rm -r Sentry.xcworkspace && EXPERIMENTAL_SPM_BUILDS=1 xcodebuild build -scheme SentrySPM -sdk watchos -destination 'generic/platform=watchOS'
117116
shell: sh
117+
- run: EXPERIMENTAL_SPM_BUILDS=1 xcodebuild build -scheme SentrySPM -sdk iphoneos -destination 'generic/platform=iphoneos'
118+
shell: sh
118119

119120
build-v9:
120121
name: Build SDK v9

Sources/Sentry/SentryOptions.m

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -815,6 +815,20 @@ - (void)setAttachViewHierarchy:(BOOL)attachViewHierarchy
815815
# endif // SENTRY_HAS_UIKIT
816816
}
817817

818+
# if SENTRY_TARGET_REPLAY_SUPPORTED
819+
820+
- (BOOL)enableViewRendererV2
821+
{
822+
return self.sessionReplay.enableViewRendererV2;
823+
}
824+
825+
- (BOOL)enableFastViewRendering
826+
{
827+
return self.sessionReplay.enableFastViewRendering;
828+
}
829+
830+
# endif // SENTRY_TARGET_REPLAY_SUPPORTED
831+
818832
- (void)setEnableUserInteractionTracing:(BOOL)enableUserInteractionTracing
819833
{
820834
# if SENTRY_HAS_UIKIT

Sources/Sentry/include/SentryOptions+Private.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,14 @@ FOUNDATION_EXPORT NSString *const kSentryDefaultEnvironment;
4040
@property (nonatomic, nullable, strong) SentryProfileOptions *profiling;
4141
#endif // SENTRY_TARGET_PROFILING_SUPPORTED
4242

43+
#if SENTRY_TARGET_REPLAY_SUPPORTED
44+
45+
- (BOOL)enableViewRendererV2;
46+
47+
- (BOOL)enableFastViewRendering;
48+
49+
#endif // # SENTRY_TARGET_REPLAY_SUPPORTED
50+
4351
@property (nonatomic, readonly, class) NSArray<Class> *defaultIntegrationClasses;
4452

4553
@property (nonatomic, strong, nullable)

Sources/Sentry/include/SentryPrivate.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#import "SentryLevelHelper.h"
2323
#import "SentryMeta.h"
2424
#import "SentryNSDictionarySanitize.h"
25+
#import "SentryOptions+Private.h"
2526
#import "SentryProfiler+Private.h"
2627
#import "SentryRandom.h"
2728
#import "SentryScope+PrivateSwift.h"

Sources/Swift/Helper/SentryEnabledFeaturesBuilder.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
@_implementationOnly import _SentryPrivate
12
import Foundation
23

34
@objcMembers @_spi(Private) public class SentryEnabledFeaturesBuilder: NSObject {
@@ -55,11 +56,11 @@ import Foundation
5556
}
5657

5758
#if (os(iOS) || os(tvOS)) && !SENTRY_NO_UIKIT
58-
if options.sessionReplay.enableViewRendererV2 {
59+
if options.enableViewRendererV2() {
5960
// We keep the old name for backwards compatibility of the telemetry data.
6061
features.append("experimentalViewRenderer")
6162
}
62-
if options.sessionReplay.enableFastViewRendering {
63+
if options.enableFastViewRendering() {
6364
features.append("fastViewRendering")
6465
}
6566
#endif // (os(iOS) || os(tvOS)) && !SENTRY_NO_UIKIT

0 commit comments

Comments
 (0)