Skip to content

Commit

Permalink
fix(apple): Don't remove other swift packages (#396)
Browse files Browse the repository at this point in the history
  • Loading branch information
brustolin authored Aug 4, 2023
1 parent 6a307fd commit 86e8bdf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 26 deletions.
24 changes: 0 additions & 24 deletions .vscode/launch.json

This file was deleted.

1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- ref(sourcemaps): Handle no vite config found case (#391)
- ref(sourcemaps): Improve handling of vite config already having Sentry code (#392)
- fix(apple): Don't remove other swift packages (#396)

## 3.9.0

Expand Down
9 changes: 7 additions & 2 deletions src/apple/xcode-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ function addSentrySPM(proj: any): void {
comment: 'XCRemoteSwiftPackageReference "sentry-cocoa"',
});

xcObjects.XCRemoteSwiftPackageReference = {};
if (!xcObjects.XCRemoteSwiftPackageReference) {
xcObjects.XCRemoteSwiftPackageReference = {};
}

xcObjects.XCRemoteSwiftPackageReference[sentrySwiftPackageUUID] = {
isa: 'XCRemoteSwiftPackageReference',
repositoryURL: '"https://github.com/getsentry/sentry-cocoa/"',
Expand All @@ -92,7 +95,9 @@ function addSentrySPM(proj: any): void {
xcObjects.XCRemoteSwiftPackageReference[sentrySwiftPackageUUID + '_comment'] =
'XCRemoteSwiftPackageReference "sentry-cocoa"';

xcObjects.XCSwiftPackageProductDependency = {};
if (!xcObjects.XCSwiftPackageProductDependency) {
xcObjects.XCSwiftPackageProductDependency = {};
}
xcObjects.XCSwiftPackageProductDependency[sentrySPMUUID] = {
isa: 'XCSwiftPackageProductDependency',
package: sentrySwiftPackageUUID,
Expand Down

0 comments on commit 86e8bdf

Please sign in to comment.