Skip to content

Commit 9c83007

Browse files
committed
cleanup
1 parent 41d3c2d commit 9c83007

File tree

9 files changed

+229
-218
lines changed

9 files changed

+229
-218
lines changed

Samples/iOS-Swift/iOS-Swift-ActionExtension/Sources/ActionViewController.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ class ActionViewController: UIViewController {
1717
}
1818

1919
private func setupSentry() {
20+
// Prevent double initialization - SentrySDK.start() can be called multiple times
21+
// but we want to avoid unnecessary re-initialization
22+
guard !SentrySDK.isEnabled else {
23+
return
24+
}
25+
2026
// For this extension we need a specific configuration set, therefore we do not use the shared sample initializer
2127
SentrySDK.start { options in
2228
options.dsn = SentrySDKWrapper.defaultDSN

Samples/iOS-Swift/iOS-Swift-IntentExtension/Sources/IntentHandler.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ class IntentHandler: INExtension, INSendMessageIntentHandling {
1616
}
1717

1818
private func setupSentry() {
19+
// Prevent double initialization - SentrySDK.start() can be called multiple times
20+
// but we want to avoid unnecessary re-initialization
21+
guard !SentrySDK.isEnabled else {
22+
return
23+
}
24+
1925
// For this extension we need a specific configuration set, therefore we do not use the shared sample initializer
2026
SentrySDK.start { options in
2127
options.dsn = SentrySDKWrapper.defaultDSN

Samples/iOS-Swift/iOS-Swift-ShareExtension.xcconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,7 @@ CODE_SIGN_STYLE = Manual
1414

1515
SUPPORTED_PLATFORMS = iphoneos iphonesimulator
1616

17+
SWIFT_OBJC_BRIDGING_HEADER = iOS-Swift/Tools/iOS-Swift-Bridging-Header.h
18+
1719
// Runtime search paths for app extensions to find frameworks in parent app
1820
LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/Frameworks @executable_path/../../Frameworks

Samples/iOS-Swift/iOS-Swift-ShareExtension/Sources/ShareViewController.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ class ShareViewController: SLComposeServiceViewController {
1616
}
1717

1818
private func setupSentry() {
19+
// Prevent double initialization - SentrySDK.start() can be called multiple times
20+
// but we want to avoid unnecessary re-initialization
21+
guard !SentrySDK.isEnabled else {
22+
return
23+
}
24+
1925
// For this extension we need a specific configuration set, therefore we do not use the shared sample initializer
2026
SentrySDK.start { options in
2127
options.dsn = SentrySDKWrapper.defaultDSN

Samples/iOS-Swift/iOS-Swift.xcodeproj/project.pbxproj

Lines changed: 116 additions & 132 deletions
Large diffs are not rendered by default.

Samples/iOS-Swift/iOS-Swift.xcodeproj/xcshareddata/xcschemes/iOS-Swift-ActionExtension.xcscheme

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
33
LastUpgradeVersion = "1430"
4-
wasCreatedForAppExtension = "YES"
5-
version = "2.0">
4+
version = "1.7">
65
<BuildAction
76
parallelizeBuildables = "YES"
8-
buildImplicitDependencies = "YES">
7+
buildImplicitDependencies = "YES"
8+
runPostActionsOnFailure = "NO">
99
<BuildActionEntries>
1010
<BuildActionEntry
1111
buildForTesting = "YES"
@@ -15,9 +15,9 @@
1515
buildForAnalyzing = "YES">
1616
<BuildableReference
1717
BuildableIdentifier = "primary"
18-
BlueprintIdentifier = "5B05A31890F168B2E9851B98"
19-
BuildableName = "iOS-Swift-ActionExtension.appex"
20-
BlueprintName = "iOS-Swift-ActionExtension"
18+
BlueprintIdentifier = "6C5B85CBF6AE4AA020E28E5F"
19+
BuildableName = "iOS-Swift.app"
20+
BlueprintName = "iOS-Swift"
2121
ReferencedContainer = "container:iOS-Swift.xcodeproj">
2222
</BuildableReference>
2323
</BuildActionEntry>
@@ -29,9 +29,9 @@
2929
buildForAnalyzing = "YES">
3030
<BuildableReference
3131
BuildableIdentifier = "primary"
32-
BlueprintIdentifier = "6C5B85CBF6AE4AA020E28E5F"
33-
BuildableName = "iOS-Swift.app"
34-
BlueprintName = "iOS-Swift"
32+
BlueprintIdentifier = "5B05A31890F168B2E9851B98"
33+
BuildableName = "iOS-Swift-ActionExtension.appex"
34+
BlueprintName = "iOS-Swift-ActionExtension"
3535
ReferencedContainer = "container:iOS-Swift.xcodeproj">
3636
</BuildableReference>
3737
</BuildActionEntry>
@@ -41,13 +41,14 @@
4141
buildConfiguration = "Debug"
4242
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
4343
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
44-
shouldUseLaunchSchemeArgsEnv = "YES">
44+
shouldUseLaunchSchemeArgsEnv = "YES"
45+
onlyGenerateCoverageForSpecifiedTargets = "NO">
4546
<MacroExpansion>
4647
<BuildableReference
4748
BuildableIdentifier = "primary"
48-
BlueprintIdentifier = "5B05A31890F168B2E9851B98"
49-
BuildableName = "iOS-Swift-ActionExtension.appex"
50-
BlueprintName = "iOS-Swift-ActionExtension"
49+
BlueprintIdentifier = "6C5B85CBF6AE4AA020E28E5F"
50+
BuildableName = "iOS-Swift.app"
51+
BlueprintName = "iOS-Swift"
5152
ReferencedContainer = "container:iOS-Swift.xcodeproj">
5253
</BuildableReference>
5354
</MacroExpansion>
@@ -56,25 +57,26 @@
5657
</TestAction>
5758
<LaunchAction
5859
buildConfiguration = "Debug"
59-
selectedDebuggerIdentifier = ""
60-
selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn"
60+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
61+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
6162
launchStyle = "0"
62-
askForAppToLaunch = "Yes"
6363
useCustomWorkingDirectory = "NO"
6464
ignoresPersistentStateOnLaunch = "NO"
6565
debugDocumentVersioning = "YES"
6666
debugServiceExtension = "internal"
67-
allowLocationSimulation = "YES"
68-
launchAutomaticallySubstyle = "2">
69-
<MacroExpansion>
67+
allowLocationSimulation = "YES">
68+
<BuildableProductRunnable
69+
runnableDebuggingMode = "0">
7070
<BuildableReference
7171
BuildableIdentifier = "primary"
72-
BlueprintIdentifier = "5B05A31890F168B2E9851B98"
73-
BuildableName = "iOS-Swift-ActionExtension.appex"
74-
BlueprintName = "iOS-Swift-ActionExtension"
72+
BlueprintIdentifier = "6C5B85CBF6AE4AA020E28E5F"
73+
BuildableName = "iOS-Swift.app"
74+
BlueprintName = "iOS-Swift"
7575
ReferencedContainer = "container:iOS-Swift.xcodeproj">
7676
</BuildableReference>
77-
</MacroExpansion>
77+
</BuildableProductRunnable>
78+
<CommandLineArguments>
79+
</CommandLineArguments>
7880
</LaunchAction>
7981
<ProfileAction
8082
buildConfiguration = "Release"
@@ -86,9 +88,9 @@
8688
runnableDebuggingMode = "0">
8789
<BuildableReference
8890
BuildableIdentifier = "primary"
89-
BlueprintIdentifier = "5B05A31890F168B2E9851B98"
90-
BuildableName = "iOS-Swift-ActionExtension.appex"
91-
BlueprintName = "iOS-Swift-ActionExtension"
91+
BlueprintIdentifier = "6C5B85CBF6AE4AA020E28E5F"
92+
BuildableName = "iOS-Swift.app"
93+
BlueprintName = "iOS-Swift"
9294
ReferencedContainer = "container:iOS-Swift.xcodeproj">
9395
</BuildableReference>
9496
</BuildableProductRunnable>

Samples/iOS-Swift/iOS-Swift.xcodeproj/xcshareddata/xcschemes/iOS-Swift-IntentExtension.xcscheme

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
33
LastUpgradeVersion = "1430"
4-
wasCreatedForAppExtension = "YES"
5-
version = "2.0">
4+
version = "1.7">
65
<BuildAction
76
parallelizeBuildables = "YES"
8-
buildImplicitDependencies = "YES">
7+
buildImplicitDependencies = "YES"
8+
runPostActionsOnFailure = "NO">
99
<BuildActionEntries>
1010
<BuildActionEntry
1111
buildForTesting = "YES"
@@ -15,9 +15,9 @@
1515
buildForAnalyzing = "YES">
1616
<BuildableReference
1717
BuildableIdentifier = "primary"
18-
BlueprintIdentifier = "5DB3F50F9D50D2F2419F11F3"
19-
BuildableName = "iOS-Swift-IntentExtension.appex"
20-
BlueprintName = "iOS-Swift-IntentExtension"
18+
BlueprintIdentifier = "6C5B85CBF6AE4AA020E28E5F"
19+
BuildableName = "iOS-Swift.app"
20+
BlueprintName = "iOS-Swift"
2121
ReferencedContainer = "container:iOS-Swift.xcodeproj">
2222
</BuildableReference>
2323
</BuildActionEntry>
@@ -29,9 +29,9 @@
2929
buildForAnalyzing = "YES">
3030
<BuildableReference
3131
BuildableIdentifier = "primary"
32-
BlueprintIdentifier = "6C5B85CBF6AE4AA020E28E5F"
33-
BuildableName = "iOS-Swift.app"
34-
BlueprintName = "iOS-Swift"
32+
BlueprintIdentifier = "5DB3F50F9D50D2F2419F11F3"
33+
BuildableName = "iOS-Swift-IntentExtension.appex"
34+
BlueprintName = "iOS-Swift-IntentExtension"
3535
ReferencedContainer = "container:iOS-Swift.xcodeproj">
3636
</BuildableReference>
3737
</BuildActionEntry>
@@ -41,13 +41,14 @@
4141
buildConfiguration = "Debug"
4242
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
4343
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
44-
shouldUseLaunchSchemeArgsEnv = "YES">
44+
shouldUseLaunchSchemeArgsEnv = "YES"
45+
onlyGenerateCoverageForSpecifiedTargets = "NO">
4546
<MacroExpansion>
4647
<BuildableReference
4748
BuildableIdentifier = "primary"
48-
BlueprintIdentifier = "5DB3F50F9D50D2F2419F11F3"
49-
BuildableName = "iOS-Swift-IntentExtension.appex"
50-
BlueprintName = "iOS-Swift-IntentExtension"
49+
BlueprintIdentifier = "6C5B85CBF6AE4AA020E28E5F"
50+
BuildableName = "iOS-Swift.app"
51+
BlueprintName = "iOS-Swift"
5152
ReferencedContainer = "container:iOS-Swift.xcodeproj">
5253
</BuildableReference>
5354
</MacroExpansion>
@@ -56,25 +57,26 @@
5657
</TestAction>
5758
<LaunchAction
5859
buildConfiguration = "Debug"
59-
selectedDebuggerIdentifier = ""
60-
selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn"
60+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
61+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
6162
launchStyle = "0"
62-
askForAppToLaunch = "Yes"
6363
useCustomWorkingDirectory = "NO"
6464
ignoresPersistentStateOnLaunch = "NO"
6565
debugDocumentVersioning = "YES"
6666
debugServiceExtension = "internal"
67-
allowLocationSimulation = "YES"
68-
launchAutomaticallySubstyle = "2">
69-
<MacroExpansion>
67+
allowLocationSimulation = "YES">
68+
<BuildableProductRunnable
69+
runnableDebuggingMode = "0">
7070
<BuildableReference
7171
BuildableIdentifier = "primary"
72-
BlueprintIdentifier = "5DB3F50F9D50D2F2419F11F3"
73-
BuildableName = "iOS-Swift-IntentExtension.appex"
74-
BlueprintName = "iOS-Swift-IntentExtension"
72+
BlueprintIdentifier = "6C5B85CBF6AE4AA020E28E5F"
73+
BuildableName = "iOS-Swift.app"
74+
BlueprintName = "iOS-Swift"
7575
ReferencedContainer = "container:iOS-Swift.xcodeproj">
7676
</BuildableReference>
77-
</MacroExpansion>
77+
</BuildableProductRunnable>
78+
<CommandLineArguments>
79+
</CommandLineArguments>
7880
</LaunchAction>
7981
<ProfileAction
8082
buildConfiguration = "Release"
@@ -86,9 +88,9 @@
8688
runnableDebuggingMode = "0">
8789
<BuildableReference
8890
BuildableIdentifier = "primary"
89-
BlueprintIdentifier = "5DB3F50F9D50D2F2419F11F3"
90-
BuildableName = "iOS-Swift-IntentExtension.appex"
91-
BlueprintName = "iOS-Swift-IntentExtension"
91+
BlueprintIdentifier = "6C5B85CBF6AE4AA020E28E5F"
92+
BuildableName = "iOS-Swift.app"
93+
BlueprintName = "iOS-Swift"
9294
ReferencedContainer = "container:iOS-Swift.xcodeproj">
9395
</BuildableReference>
9496
</BuildableProductRunnable>

Samples/iOS-Swift/iOS-Swift.xcodeproj/xcshareddata/xcschemes/iOS-Swift-ShareExtension.xcscheme

Lines changed: 28 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
33
LastUpgradeVersion = "1430"
4-
wasCreatedForAppExtension = "YES"
5-
version = "2.0">
4+
version = "1.7">
65
<BuildAction
76
parallelizeBuildables = "YES"
8-
buildImplicitDependencies = "YES">
7+
buildImplicitDependencies = "YES"
8+
runPostActionsOnFailure = "NO">
99
<BuildActionEntries>
1010
<BuildActionEntry
1111
buildForTesting = "YES"
@@ -15,9 +15,9 @@
1515
buildForAnalyzing = "YES">
1616
<BuildableReference
1717
BuildableIdentifier = "primary"
18-
BlueprintIdentifier = "C97FF7E8B34B54F1E1DA596E"
19-
BuildableName = "iOS-Swift-ShareExtension.appex"
20-
BlueprintName = "iOS-Swift-ShareExtension"
18+
BlueprintIdentifier = "6C5B85CBF6AE4AA020E28E5F"
19+
BuildableName = "iOS-Swift.app"
20+
BlueprintName = "iOS-Swift"
2121
ReferencedContainer = "container:iOS-Swift.xcodeproj">
2222
</BuildableReference>
2323
</BuildActionEntry>
@@ -29,9 +29,9 @@
2929
buildForAnalyzing = "YES">
3030
<BuildableReference
3131
BuildableIdentifier = "primary"
32-
BlueprintIdentifier = "6C5B85CBF6AE4AA020E28E5F"
33-
BuildableName = "iOS-Swift.app"
34-
BlueprintName = "iOS-Swift"
32+
BlueprintIdentifier = "C97FF7E8B34B54F1E1DA596E"
33+
BuildableName = "iOS-Swift-ShareExtension.appex"
34+
BlueprintName = "iOS-Swift-ShareExtension"
3535
ReferencedContainer = "container:iOS-Swift.xcodeproj">
3636
</BuildableReference>
3737
</BuildActionEntry>
@@ -41,13 +41,14 @@
4141
buildConfiguration = "Debug"
4242
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
4343
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
44-
shouldUseLaunchSchemeArgsEnv = "YES">
44+
shouldUseLaunchSchemeArgsEnv = "YES"
45+
onlyGenerateCoverageForSpecifiedTargets = "NO">
4546
<MacroExpansion>
4647
<BuildableReference
4748
BuildableIdentifier = "primary"
48-
BlueprintIdentifier = "C97FF7E8B34B54F1E1DA596E"
49-
BuildableName = "iOS-Swift-ShareExtension.appex"
50-
BlueprintName = "iOS-Swift-ShareExtension"
49+
BlueprintIdentifier = "6C5B85CBF6AE4AA020E28E5F"
50+
BuildableName = "iOS-Swift.app"
51+
BlueprintName = "iOS-Swift"
5152
ReferencedContainer = "container:iOS-Swift.xcodeproj">
5253
</BuildableReference>
5354
</MacroExpansion>
@@ -56,30 +57,26 @@
5657
</TestAction>
5758
<LaunchAction
5859
buildConfiguration = "Debug"
59-
selectedDebuggerIdentifier = ""
60-
selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn"
60+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
61+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
6162
launchStyle = "0"
62-
askForAppToLaunch = "Yes"
6363
useCustomWorkingDirectory = "NO"
6464
ignoresPersistentStateOnLaunch = "NO"
6565
debugDocumentVersioning = "YES"
6666
debugServiceExtension = "internal"
67-
allowLocationSimulation = "YES"
68-
launchAutomaticallySubstyle = "2">
69-
<RemoteRunnable
70-
runnableDebuggingMode = "0"
71-
BundleIdentifier = "com.apple.mobilesafari"
72-
RemotePath = "/var/containers/Bundle/Application/DDE4BAF9-2C7E-4698-BC7F-621715D2A745/MobileSafari.app">
73-
</RemoteRunnable>
74-
<MacroExpansion>
67+
allowLocationSimulation = "YES">
68+
<BuildableProductRunnable
69+
runnableDebuggingMode = "0">
7570
<BuildableReference
7671
BuildableIdentifier = "primary"
77-
BlueprintIdentifier = "C97FF7E8B34B54F1E1DA596E"
78-
BuildableName = "iOS-Swift-ShareExtension.appex"
79-
BlueprintName = "iOS-Swift-ShareExtension"
72+
BlueprintIdentifier = "6C5B85CBF6AE4AA020E28E5F"
73+
BuildableName = "iOS-Swift.app"
74+
BlueprintName = "iOS-Swift"
8075
ReferencedContainer = "container:iOS-Swift.xcodeproj">
8176
</BuildableReference>
82-
</MacroExpansion>
77+
</BuildableProductRunnable>
78+
<CommandLineArguments>
79+
</CommandLineArguments>
8380
</LaunchAction>
8481
<ProfileAction
8582
buildConfiguration = "Release"
@@ -91,9 +88,9 @@
9188
runnableDebuggingMode = "0">
9289
<BuildableReference
9390
BuildableIdentifier = "primary"
94-
BlueprintIdentifier = "C97FF7E8B34B54F1E1DA596E"
95-
BuildableName = "iOS-Swift-ShareExtension.appex"
96-
BlueprintName = "iOS-Swift-ShareExtension"
91+
BlueprintIdentifier = "6C5B85CBF6AE4AA020E28E5F"
92+
BuildableName = "iOS-Swift.app"
93+
BlueprintName = "iOS-Swift"
9794
ReferencedContainer = "container:iOS-Swift.xcodeproj">
9895
</BuildableReference>
9996
</BuildableProductRunnable>

0 commit comments

Comments
 (0)