From 45051d237f3586fa45d42b5e1d627bb565725e0a Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Fri, 29 Nov 2024 13:55:09 +0100 Subject: [PATCH 01/13] fix: Exposing Swift to Objc --- Sentry.xcodeproj/project.pbxproj | 4 ++-- Sources/Sentry/Public/Sentry.h | 2 ++ Sources/Sentry/{include => Public}/SentrySwift.h | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) rename Sources/Sentry/{include => Public}/SentrySwift.h (90%) diff --git a/Sentry.xcodeproj/project.pbxproj b/Sentry.xcodeproj/project.pbxproj index a0441c02971..7917fa943a8 100644 --- a/Sentry.xcodeproj/project.pbxproj +++ b/Sentry.xcodeproj/project.pbxproj @@ -898,7 +898,7 @@ D8B665BC2B95F73200BD0E7B /* SentryPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = D8B665BA2B95F54200BD0E7B /* SentryPrivate.h */; }; D8B76B062808066D000A58C4 /* SentryScreenshotIntegrationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8B76B042808060E000A58C4 /* SentryScreenshotIntegrationTests.swift */; }; D8B76B0828081461000A58C4 /* TestSentryScreenShot.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8B76B0728081461000A58C4 /* TestSentryScreenShot.swift */; }; - D8BBD32728FD9FC00011F850 /* SentrySwift.h in Headers */ = {isa = PBXBuildFile; fileRef = D8BBD32628FD9FBF0011F850 /* SentrySwift.h */; settings = {ATTRIBUTES = (Private, ); }; }; + D8BBD32728FD9FC00011F850 /* SentrySwift.h in Headers */ = {isa = PBXBuildFile; fileRef = D8BBD32628FD9FBF0011F850 /* SentrySwift.h */; settings = {ATTRIBUTES = (Public, ); }; }; D8BC28C82BFF5EBB0054DA4D /* SentryTouchTracker.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8BC28C72BFF5EBB0054DA4D /* SentryTouchTracker.swift */; }; D8BC28CA2BFF68CA0054DA4D /* NumberExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8BC28C92BFF68CA0054DA4D /* NumberExtensions.swift */; }; D8BC28CC2BFF78220054DA4D /* SentryRRWebTouchEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8BC28CB2BFF78220054DA4D /* SentryRRWebTouchEvent.swift */; }; @@ -1983,7 +1983,7 @@ D8B665BB2B95F5A100BD0E7B /* module.modulemap */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.module-map"; name = module.modulemap; path = Sources/Sentry/include/module.modulemap; sourceTree = SOURCE_ROOT; }; D8B76B042808060E000A58C4 /* SentryScreenshotIntegrationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryScreenshotIntegrationTests.swift; sourceTree = ""; }; D8B76B0728081461000A58C4 /* TestSentryScreenShot.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestSentryScreenShot.swift; sourceTree = ""; }; - D8BBD32628FD9FBF0011F850 /* SentrySwift.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SentrySwift.h; path = include/SentrySwift.h; sourceTree = ""; }; + D8BBD32628FD9FBF0011F850 /* SentrySwift.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SentrySwift.h; path = Public/SentrySwift.h; sourceTree = ""; }; D8BC28C72BFF5EBB0054DA4D /* SentryTouchTracker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryTouchTracker.swift; sourceTree = ""; }; D8BC28C92BFF68CA0054DA4D /* NumberExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NumberExtensions.swift; sourceTree = ""; }; D8BC28CB2BFF78220054DA4D /* SentryRRWebTouchEvent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryRRWebTouchEvent.swift; sourceTree = ""; }; diff --git a/Sources/Sentry/Public/Sentry.h b/Sources/Sentry/Public/Sentry.h index 52e725b022f..6ec4d1ed1f8 100644 --- a/Sources/Sentry/Public/Sentry.h +++ b/Sources/Sentry/Public/Sentry.h @@ -49,4 +49,6 @@ FOUNDATION_EXPORT const unsigned char SentryVersionString[]; # import # import # import +# import + #endif // __has_include() diff --git a/Sources/Sentry/include/SentrySwift.h b/Sources/Sentry/Public/SentrySwift.h similarity index 90% rename from Sources/Sentry/include/SentrySwift.h rename to Sources/Sentry/Public/SentrySwift.h index db405b418b0..8af2ecdb0fc 100644 --- a/Sources/Sentry/include/SentrySwift.h +++ b/Sources/Sentry/Public/SentrySwift.h @@ -10,7 +10,7 @@ #if __has_include() # if __has_include("SentryWithoutUIKit-Swift.h") # import "SentryWithoutUIKit-Swift.h" -# else +# elif __has_include() # import # endif #else // !__has_include() @@ -31,7 +31,7 @@ # if __has_include("Sentry-Swift.h") # import "Sentry-Swift.h" -# else +# elif __has_include() # import # endif #endif // __has_include() From d49a897d307c5840de394a72ddb695cd7f191b35 Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Fri, 29 Nov 2024 13:56:07 +0100 Subject: [PATCH 02/13] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ff253e3b527..2aabbb12294 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,7 +13,7 @@ - Use `options.reportAccessibilityIdentifier` for Breadcrumbs and UIEvents (#4569) - Session replay transformed view masking (#4529) - Load integration from same binary (#4541) - +- Easy use of Swift classes in Objective-C projects () ### Improvements From 9b1110bd859fdda141f5544efc3effc6b0abe847 Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Fri, 29 Nov 2024 14:00:19 +0100 Subject: [PATCH 03/13] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2aabbb12294..c5739838211 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,7 +13,7 @@ - Use `options.reportAccessibilityIdentifier` for Breadcrumbs and UIEvents (#4569) - Session replay transformed view masking (#4529) - Load integration from same binary (#4541) -- Easy use of Swift classes in Objective-C projects () +- Easy use of Swift classes in Objective-C projects (#4585) ### Improvements From 92e54063f4f587bd859616a7fcb11574d3bd1948 Mon Sep 17 00:00:00 2001 From: Sentry Github Bot Date: Fri, 29 Nov 2024 13:03:32 +0000 Subject: [PATCH 04/13] Format code --- Sources/Sentry/Public/Sentry.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Sentry/Public/Sentry.h b/Sources/Sentry/Public/Sentry.h index 6ec4d1ed1f8..8f77df8944e 100644 --- a/Sources/Sentry/Public/Sentry.h +++ b/Sources/Sentry/Public/Sentry.h @@ -42,6 +42,7 @@ FOUNDATION_EXPORT const unsigned char SentryVersionString[]; # import # import # import +# import # import # import # import @@ -49,6 +50,5 @@ FOUNDATION_EXPORT const unsigned char SentryVersionString[]; # import # import # import -# import #endif // __has_include() From 3d1eefae8301aac76f1cb834034ab434ff4b934c Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Fri, 29 Nov 2024 14:09:28 +0100 Subject: [PATCH 05/13] Update CHANGELOG.md --- CHANGELOG.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb415cb2f40..0f1f9b92bff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## Unreleased + +### Fixed + +- Easy use of Swift classes in Objective-C projects (#4585) + ## 8.42.0-beta.1 ### Features @@ -14,7 +20,6 @@ - Use `options.reportAccessibilityIdentifier` for Breadcrumbs and UIEvents (#4569) - Session replay transformed view masking (#4529) - Load integration from same binary (#4541) -- Easy use of Swift classes in Objective-C projects (#4585) - Masking for fast animations #4574 ### Improvements From 4beb23dfb2eff66a3887c8d5b42f2f0f24b3928a Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Fri, 29 Nov 2024 14:14:49 +0100 Subject: [PATCH 06/13] Update AppDelegate.m --- Samples/iOS-ObjectiveC/iOS-ObjectiveC/AppDelegate.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Samples/iOS-ObjectiveC/iOS-ObjectiveC/AppDelegate.m b/Samples/iOS-ObjectiveC/iOS-ObjectiveC/AppDelegate.m index f02b19b7d2e..968d1371438 100644 --- a/Samples/iOS-ObjectiveC/iOS-ObjectiveC/AppDelegate.m +++ b/Samples/iOS-ObjectiveC/iOS-ObjectiveC/AppDelegate.m @@ -1,6 +1,6 @@ #import "AppDelegate.h" @import CoreData; -@import Sentry; +#import #import #import "iOS_ObjectiveC-Swift.h" From 8d4eeeba6425d8ec10c0d7cdaf561c5383a9153c Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Fri, 29 Nov 2024 14:52:48 +0100 Subject: [PATCH 07/13] Update SentryWithoutUIKit.h --- Sources/Sentry/Public/SentryWithoutUIKit.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Sources/Sentry/Public/SentryWithoutUIKit.h b/Sources/Sentry/Public/SentryWithoutUIKit.h index a3eba11f48e..f2851d51a78 100644 --- a/Sources/Sentry/Public/SentryWithoutUIKit.h +++ b/Sources/Sentry/Public/SentryWithoutUIKit.h @@ -43,6 +43,7 @@ FOUNDATION_EXPORT const unsigned char SentryVersionString[]; # import # import # import +# import # import # import # import From e505cad3819c3326d55e55809629c6ce6f174336 Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Fri, 29 Nov 2024 15:07:19 +0100 Subject: [PATCH 08/13] Update build.yml --- .github/workflows/build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4f78794e7ba..dfdaf966a29 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -62,6 +62,9 @@ jobs: - scheme: iOS13-Swift xcode: 15.4 runs-on: macos-14 + - scheme: iOS-ObjectiveC + xcode: 15.4 + runs-on: macos-14 - scheme: watchOS-Swift WatchKit App xcode: 15.4 runs-on: macos-14 From 1de1e306fb3ec55503ed68276aa14f196934db0c Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Tue, 3 Dec 2024 09:01:20 +0100 Subject: [PATCH 09/13] wip --- Samples/iOS-ObjectiveC/iOS-ObjectiveC/AppDelegate.m | 3 ++- Samples/iOS-ObjectiveC/iOS-ObjectiveC/ViewController.m | 2 +- Sentry.xcodeproj/project.pbxproj | 6 +++++- Sources/Sentry/Public/Sentry.h | 1 - Sources/Sentry/Public/SentryWithoutUIKit.h | 1 - Sources/Sentry/SentryObjc.h | 10 ++++++++++ 6 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 Sources/Sentry/SentryObjc.h diff --git a/Samples/iOS-ObjectiveC/iOS-ObjectiveC/AppDelegate.m b/Samples/iOS-ObjectiveC/iOS-ObjectiveC/AppDelegate.m index 968d1371438..3ecee8d2f55 100644 --- a/Samples/iOS-ObjectiveC/iOS-ObjectiveC/AppDelegate.m +++ b/Samples/iOS-ObjectiveC/iOS-ObjectiveC/AppDelegate.m @@ -14,7 +14,8 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { NSArray *args = NSProcessInfo.processInfo.arguments; - + SentryExperimentalOptions * d; + [SentrySDK startWithConfigureOptions:^(SentryOptions *options) { options.dsn = @"https://6cc9bae94def43cab8444a99e0031c28@o447951.ingest.sentry.io/5428557"; options.debug = YES; diff --git a/Samples/iOS-ObjectiveC/iOS-ObjectiveC/ViewController.m b/Samples/iOS-ObjectiveC/iOS-ObjectiveC/ViewController.m index c048ac9b91b..d1d5f88ba61 100644 --- a/Samples/iOS-ObjectiveC/iOS-ObjectiveC/ViewController.m +++ b/Samples/iOS-ObjectiveC/iOS-ObjectiveC/ViewController.m @@ -1,7 +1,7 @@ #import "ViewController.h" #import "NoARCCrash.h" -@import Sentry; +#import @interface ViewController () diff --git a/Sentry.xcodeproj/project.pbxproj b/Sentry.xcodeproj/project.pbxproj index 7917fa943a8..8a6e93e1443 100644 --- a/Sentry.xcodeproj/project.pbxproj +++ b/Sentry.xcodeproj/project.pbxproj @@ -898,7 +898,7 @@ D8B665BC2B95F73200BD0E7B /* SentryPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = D8B665BA2B95F54200BD0E7B /* SentryPrivate.h */; }; D8B76B062808066D000A58C4 /* SentryScreenshotIntegrationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8B76B042808060E000A58C4 /* SentryScreenshotIntegrationTests.swift */; }; D8B76B0828081461000A58C4 /* TestSentryScreenShot.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8B76B0728081461000A58C4 /* TestSentryScreenShot.swift */; }; - D8BBD32728FD9FC00011F850 /* SentrySwift.h in Headers */ = {isa = PBXBuildFile; fileRef = D8BBD32628FD9FBF0011F850 /* SentrySwift.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D8BBD32728FD9FC00011F850 /* SentrySwift.h in Headers */ = {isa = PBXBuildFile; fileRef = D8BBD32628FD9FBF0011F850 /* SentrySwift.h */; settings = {ATTRIBUTES = (Private, ); }; }; D8BC28C82BFF5EBB0054DA4D /* SentryTouchTracker.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8BC28C72BFF5EBB0054DA4D /* SentryTouchTracker.swift */; }; D8BC28CA2BFF68CA0054DA4D /* NumberExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8BC28C92BFF68CA0054DA4D /* NumberExtensions.swift */; }; D8BC28CC2BFF78220054DA4D /* SentryRRWebTouchEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8BC28CB2BFF78220054DA4D /* SentryRRWebTouchEvent.swift */; }; @@ -928,6 +928,7 @@ D8DBE0D22C0EFFC300FAB1FD /* SentryReplayOptionsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8DBE0D12C0EFFC300FAB1FD /* SentryReplayOptionsTests.swift */; }; D8F016B32B9622D6007B9AFB /* SentryId.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F016B22B9622D6007B9AFB /* SentryId.swift */; }; D8F016B62B962548007B9AFB /* StringExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F016B52B962548007B9AFB /* StringExtensions.swift */; }; + D8F0F24F2CFEEC0400826CE3 /* SentryObjc.h in Headers */ = {isa = PBXBuildFile; fileRef = D8F0F24E2CFEEBFF00826CE3 /* SentryObjc.h */; settings = {ATTRIBUTES = (Private, ); }; }; D8F67AEE2BE0D19200C9197B /* UIImageHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F67AED2BE0D19200C9197B /* UIImageHelper.swift */; }; D8F67AF12BE0D33F00C9197B /* UIImageHelperTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F67AEF2BE0D31A00C9197B /* UIImageHelperTests.swift */; }; D8F67AF42BE10F9600C9197B /* UIRedactBuilderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F67AF22BE10F7600C9197B /* UIRedactBuilderTests.swift */; }; @@ -2018,6 +2019,7 @@ D8F016B52B962548007B9AFB /* StringExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringExtensions.swift; sourceTree = ""; }; D8F01DE42A126B62008F4996 /* HybridPod.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; path = HybridPod.podspec; sourceTree = ""; }; D8F01DE52A126BF5008F4996 /* HybridTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HybridTest.swift; sourceTree = ""; }; + D8F0F24E2CFEEBFF00826CE3 /* SentryObjc.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SentryObjc.h; sourceTree = ""; }; D8F67AED2BE0D19200C9197B /* UIImageHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIImageHelper.swift; sourceTree = ""; }; D8F67AEF2BE0D31A00C9197B /* UIImageHelperTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIImageHelperTests.swift; sourceTree = ""; }; D8F67AF22BE10F7600C9197B /* UIRedactBuilderTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIRedactBuilderTests.swift; sourceTree = ""; }; @@ -2576,6 +2578,7 @@ 8ECC673625C23936000E2BF6 /* Transaction */, 8E25C94F25F836AB00DC215B /* Tools */, 63AA76931EB9C1C200D153DE /* Sentry.h */, + D8F0F24E2CFEEBFF00826CE3 /* SentryObjc.h */, 33EB2A8F2C3411AE004FED3D /* SentryWithoutUIKit.h */, D8B665BA2B95F54200BD0E7B /* SentryPrivate.h */, D8BBD32628FD9FBF0011F850 /* SentrySwift.h */, @@ -4037,6 +4040,7 @@ 63FE716320DA4C1100CDBAE8 /* SentryCrashDynamicLinker.h in Headers */, 639FCF981EBC7B9700778193 /* SentryEvent.h in Headers */, 03F84D2527DD414C008FE43F /* SentryThreadState.hpp in Headers */, + D8F0F24F2CFEEC0400826CE3 /* SentryObjc.h in Headers */, 8E4E7C6D25DAAAFE006AB9E2 /* SentryTransaction.h in Headers */, 63FE715D20DA4C1100CDBAE8 /* SentryCrashSymbolicator.h in Headers */, D8ACE3CF2762187D00F5A213 /* SentryFileIOTrackingIntegration.h in Headers */, diff --git a/Sources/Sentry/Public/Sentry.h b/Sources/Sentry/Public/Sentry.h index 8f77df8944e..665dd408c23 100644 --- a/Sources/Sentry/Public/Sentry.h +++ b/Sources/Sentry/Public/Sentry.h @@ -42,7 +42,6 @@ FOUNDATION_EXPORT const unsigned char SentryVersionString[]; # import # import # import -# import # import # import # import diff --git a/Sources/Sentry/Public/SentryWithoutUIKit.h b/Sources/Sentry/Public/SentryWithoutUIKit.h index f2851d51a78..a3eba11f48e 100644 --- a/Sources/Sentry/Public/SentryWithoutUIKit.h +++ b/Sources/Sentry/Public/SentryWithoutUIKit.h @@ -43,7 +43,6 @@ FOUNDATION_EXPORT const unsigned char SentryVersionString[]; # import # import # import -# import # import # import # import diff --git a/Sources/Sentry/SentryObjc.h b/Sources/Sentry/SentryObjc.h new file mode 100644 index 00000000000..b69312aadae --- /dev/null +++ b/Sources/Sentry/SentryObjc.h @@ -0,0 +1,10 @@ +#if __has_include() +#import +#elif __has_include() +#import +#endif + + + + + From d9640b5e13d1c36a492a4f0e87c1812307143e30 Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Tue, 3 Dec 2024 09:40:43 +0100 Subject: [PATCH 10/13] Update AppDelegate.m --- Samples/iOS-ObjectiveC/iOS-ObjectiveC/AppDelegate.m | 1 - 1 file changed, 1 deletion(-) diff --git a/Samples/iOS-ObjectiveC/iOS-ObjectiveC/AppDelegate.m b/Samples/iOS-ObjectiveC/iOS-ObjectiveC/AppDelegate.m index 3ecee8d2f55..78214f6110a 100644 --- a/Samples/iOS-ObjectiveC/iOS-ObjectiveC/AppDelegate.m +++ b/Samples/iOS-ObjectiveC/iOS-ObjectiveC/AppDelegate.m @@ -14,7 +14,6 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { NSArray *args = NSProcessInfo.processInfo.arguments; - SentryExperimentalOptions * d; [SentrySDK startWithConfigureOptions:^(SentryOptions *options) { options.dsn = @"https://6cc9bae94def43cab8444a99e0031c28@o447951.ingest.sentry.io/5428557"; From 27cb6ebc88774c52b7b22a344f1cb408439deead Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Tue, 3 Dec 2024 09:41:53 +0100 Subject: [PATCH 11/13] wip --- Sentry.xcodeproj/project.pbxproj | 2 +- Sources/Sentry/{ => include/HybridPublic}/SentryObjc.h | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename Sources/Sentry/{ => include/HybridPublic}/SentryObjc.h (100%) diff --git a/Sentry.xcodeproj/project.pbxproj b/Sentry.xcodeproj/project.pbxproj index 8a6e93e1443..d4482314559 100644 --- a/Sentry.xcodeproj/project.pbxproj +++ b/Sentry.xcodeproj/project.pbxproj @@ -2019,7 +2019,7 @@ D8F016B52B962548007B9AFB /* StringExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringExtensions.swift; sourceTree = ""; }; D8F01DE42A126B62008F4996 /* HybridPod.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; path = HybridPod.podspec; sourceTree = ""; }; D8F01DE52A126BF5008F4996 /* HybridTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HybridTest.swift; sourceTree = ""; }; - D8F0F24E2CFEEBFF00826CE3 /* SentryObjc.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SentryObjc.h; sourceTree = ""; }; + D8F0F24E2CFEEBFF00826CE3 /* SentryObjc.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryObjc.h; path = include/HybridPublic/SentryObjc.h; sourceTree = ""; }; D8F67AED2BE0D19200C9197B /* UIImageHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIImageHelper.swift; sourceTree = ""; }; D8F67AEF2BE0D31A00C9197B /* UIImageHelperTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIImageHelperTests.swift; sourceTree = ""; }; D8F67AF22BE10F7600C9197B /* UIRedactBuilderTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIRedactBuilderTests.swift; sourceTree = ""; }; diff --git a/Sources/Sentry/SentryObjc.h b/Sources/Sentry/include/HybridPublic/SentryObjc.h similarity index 100% rename from Sources/Sentry/SentryObjc.h rename to Sources/Sentry/include/HybridPublic/SentryObjc.h From 921f562643b9404f608a83439b1097905ceaf50a Mon Sep 17 00:00:00 2001 From: Sentry Github Bot Date: Tue, 3 Dec 2024 08:44:55 +0000 Subject: [PATCH 12/13] Format code --- Samples/iOS-ObjectiveC/iOS-ObjectiveC/AppDelegate.m | 2 +- Sources/Sentry/include/HybridPublic/SentryObjc.h | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/Samples/iOS-ObjectiveC/iOS-ObjectiveC/AppDelegate.m b/Samples/iOS-ObjectiveC/iOS-ObjectiveC/AppDelegate.m index 78214f6110a..968d1371438 100644 --- a/Samples/iOS-ObjectiveC/iOS-ObjectiveC/AppDelegate.m +++ b/Samples/iOS-ObjectiveC/iOS-ObjectiveC/AppDelegate.m @@ -14,7 +14,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { NSArray *args = NSProcessInfo.processInfo.arguments; - + [SentrySDK startWithConfigureOptions:^(SentryOptions *options) { options.dsn = @"https://6cc9bae94def43cab8444a99e0031c28@o447951.ingest.sentry.io/5428557"; options.debug = YES; diff --git a/Sources/Sentry/include/HybridPublic/SentryObjc.h b/Sources/Sentry/include/HybridPublic/SentryObjc.h index b69312aadae..fd8eb6c5ad8 100644 --- a/Sources/Sentry/include/HybridPublic/SentryObjc.h +++ b/Sources/Sentry/include/HybridPublic/SentryObjc.h @@ -1,10 +1,5 @@ #if __has_include() -#import +# import #elif __has_include() -#import +# import #endif - - - - - From c7624bcf48bbba30dd479e3354045e8e3179478a Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Tue, 3 Dec 2024 09:45:36 +0100 Subject: [PATCH 13/13] revert --- Sentry.xcodeproj/project.pbxproj | 4 ---- Sources/Sentry/include/HybridPublic/SentryObjc.h | 10 ---------- 2 files changed, 14 deletions(-) delete mode 100644 Sources/Sentry/include/HybridPublic/SentryObjc.h diff --git a/Sentry.xcodeproj/project.pbxproj b/Sentry.xcodeproj/project.pbxproj index d4482314559..baef95afa6f 100644 --- a/Sentry.xcodeproj/project.pbxproj +++ b/Sentry.xcodeproj/project.pbxproj @@ -928,7 +928,6 @@ D8DBE0D22C0EFFC300FAB1FD /* SentryReplayOptionsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8DBE0D12C0EFFC300FAB1FD /* SentryReplayOptionsTests.swift */; }; D8F016B32B9622D6007B9AFB /* SentryId.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F016B22B9622D6007B9AFB /* SentryId.swift */; }; D8F016B62B962548007B9AFB /* StringExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F016B52B962548007B9AFB /* StringExtensions.swift */; }; - D8F0F24F2CFEEC0400826CE3 /* SentryObjc.h in Headers */ = {isa = PBXBuildFile; fileRef = D8F0F24E2CFEEBFF00826CE3 /* SentryObjc.h */; settings = {ATTRIBUTES = (Private, ); }; }; D8F67AEE2BE0D19200C9197B /* UIImageHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F67AED2BE0D19200C9197B /* UIImageHelper.swift */; }; D8F67AF12BE0D33F00C9197B /* UIImageHelperTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F67AEF2BE0D31A00C9197B /* UIImageHelperTests.swift */; }; D8F67AF42BE10F9600C9197B /* UIRedactBuilderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F67AF22BE10F7600C9197B /* UIRedactBuilderTests.swift */; }; @@ -2019,7 +2018,6 @@ D8F016B52B962548007B9AFB /* StringExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringExtensions.swift; sourceTree = ""; }; D8F01DE42A126B62008F4996 /* HybridPod.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; path = HybridPod.podspec; sourceTree = ""; }; D8F01DE52A126BF5008F4996 /* HybridTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HybridTest.swift; sourceTree = ""; }; - D8F0F24E2CFEEBFF00826CE3 /* SentryObjc.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryObjc.h; path = include/HybridPublic/SentryObjc.h; sourceTree = ""; }; D8F67AED2BE0D19200C9197B /* UIImageHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIImageHelper.swift; sourceTree = ""; }; D8F67AEF2BE0D31A00C9197B /* UIImageHelperTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIImageHelperTests.swift; sourceTree = ""; }; D8F67AF22BE10F7600C9197B /* UIRedactBuilderTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIRedactBuilderTests.swift; sourceTree = ""; }; @@ -2578,7 +2576,6 @@ 8ECC673625C23936000E2BF6 /* Transaction */, 8E25C94F25F836AB00DC215B /* Tools */, 63AA76931EB9C1C200D153DE /* Sentry.h */, - D8F0F24E2CFEEBFF00826CE3 /* SentryObjc.h */, 33EB2A8F2C3411AE004FED3D /* SentryWithoutUIKit.h */, D8B665BA2B95F54200BD0E7B /* SentryPrivate.h */, D8BBD32628FD9FBF0011F850 /* SentrySwift.h */, @@ -4040,7 +4037,6 @@ 63FE716320DA4C1100CDBAE8 /* SentryCrashDynamicLinker.h in Headers */, 639FCF981EBC7B9700778193 /* SentryEvent.h in Headers */, 03F84D2527DD414C008FE43F /* SentryThreadState.hpp in Headers */, - D8F0F24F2CFEEC0400826CE3 /* SentryObjc.h in Headers */, 8E4E7C6D25DAAAFE006AB9E2 /* SentryTransaction.h in Headers */, 63FE715D20DA4C1100CDBAE8 /* SentryCrashSymbolicator.h in Headers */, D8ACE3CF2762187D00F5A213 /* SentryFileIOTrackingIntegration.h in Headers */, diff --git a/Sources/Sentry/include/HybridPublic/SentryObjc.h b/Sources/Sentry/include/HybridPublic/SentryObjc.h deleted file mode 100644 index b69312aadae..00000000000 --- a/Sources/Sentry/include/HybridPublic/SentryObjc.h +++ /dev/null @@ -1,10 +0,0 @@ -#if __has_include() -#import -#elif __has_include() -#import -#endif - - - - -