Skip to content

Commit

Permalink
chore: Making Hybrid SDK only header private for everybody else (#2458)
Browse files Browse the repository at this point in the history
Exposing some headers to hybridSDK only.
  • Loading branch information
brustolin authored Nov 30, 2022
1 parent 2ac6715 commit 7f1b08e
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 27 deletions.
1 change: 1 addition & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ let package = Package(
cxxSettings: [
.define("GCC_ENABLE_CPP_EXCEPTIONS", to: "YES"),
.headerSearchPath("Sentry/include"),
.headerSearchPath("Sentry/include/HybridPublic"),
.headerSearchPath("Sentry/Public"),
.headerSearchPath("SentryCrash/Installations"),
.headerSearchPath("SentryCrash/Recording"),
Expand Down
2 changes: 1 addition & 1 deletion Sentry.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ Pod::Spec.new do |s|
"Sources/SentryCrash/**/*.{h,hpp,m,mm,c,cpp}", "Sources/Swift/Sentry.swift"

sp.public_header_files =
"Sources/Sentry/Public/*.h", "Sources/Sentry/include/PrivateSentrySDKOnly.h"
"Sources/Sentry/Public/*.h", "Sources/Sentry/include/HybridPublic/*.h"
end
end
22 changes: 13 additions & 9 deletions Sentry.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions Sources/Sentry/Public/Sentry.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ FOUNDATION_EXPORT double SentryVersionNumber;
//! Project version string for Sentry.
FOUNDATION_EXPORT const unsigned char SentryVersionString[];

#import "SentryAppStartMeasurement.h"
#import "SentryAttachment.h"
#import "SentryBreadcrumb.h"
#import "SentryClient.h"
Expand All @@ -15,8 +14,6 @@ FOUNDATION_EXPORT const unsigned char SentryVersionString[];
#import "SentryDebugMeta.h"
#import "SentryDefines.h"
#import "SentryDsn.h"
#import "SentryEnvelope.h"
#import "SentryEnvelopeItemType.h"
#import "SentryError.h"
#import "SentryEvent.h"
#import "SentryException.h"
Expand All @@ -36,7 +33,6 @@ FOUNDATION_EXPORT const unsigned char SentryVersionString[];
#import "SentrySampleDecision.h"
#import "SentrySamplingContext.h"
#import "SentryScope.h"
#import "SentryScreenFrames.h"
#import "SentrySdkInfo.h"
#import "SentrySerializable.h"
#import "SentrySession.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
// We need this because if Sentry library is added as a Framework
// the reference should be in the form of <module/header>.
// Otherwise, the reference is direct.
#if __has_include(<Sentry/SentryDefines.h>)
# import <Sentry/SentryDefines.h>
#else
# import "SentryDefines.h"
#endif
#import "PrivatesHeader.h"
#import "SentryAppStartMeasurement.h"
#import "SentryEnvelope.h"
#import "SentryEnvelopeItemType.h"
#import "SentryScreenFrames.h"

@class SentryEnvelope, SentryDebugMeta, SentryAppStartMeasurement, SentryScreenFrames,
SentryOptions;
Expand Down
14 changes: 14 additions & 0 deletions Sources/Sentry/include/HybridPublic/PrivatesHeader.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// We need this because if Sentry library is added as a Framework
// the reference should be in the form of <module/header>.
// Otherwise, the reference is direct.
#if __has_include(<Sentry/SentryDefines.h>)
# import <Sentry/SentryDefines.h>
#else
# import "SentryDefines.h"
#endif

#if __has_include(<Sentry/SentryProfilingConditionals.h>)
# import <Sentry/SentryProfilingConditionals.h>
#else
# import "SentryProfilingConditionals.h"
#endif
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#import "SentryDefines.h"
#import "PrivatesHeader.h"

NS_ASSUME_NONNULL_BEGIN

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#import "PrivatesHeader.h"
#import <Foundation/Foundation.h>

#import "SentryDefines.h"

@class SentryEvent, SentrySession, SentrySdkInfo, SentryId, SentryUserFeedback, SentryAttachment,
SentryTransaction, SentryTraceContext, SentryClientReport;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#import "SentryDefines.h"
#import "SentryProfilingConditionals.h"
#import "PrivatesHeader.h"

NS_ASSUME_NONNULL_BEGIN

Expand Down

0 comments on commit 7f1b08e

Please sign in to comment.