Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## Unreleased

### Fixes

- Add additional path to check for iOS debug symbols ([#342](https://github.com/getsentry/sentry-dart-plugin/pull/342))

## 3.1.0

### Features
Expand Down
4 changes: 4 additions & 0 deletions lib/sentry_dart_plugin.dart
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ class SentryDartPlugin {

Stream<String> _enumerateDebugSymbolPaths(FileSystem fs) async* {
final buildDir = _configuration.buildFilesFolder;
final String projectRoot = fs.currentDirectory.path;

// Android (apk, appbundle)
yield '$buildDir/app/outputs';
Expand Down Expand Up @@ -142,6 +143,9 @@ class SentryDartPlugin {

// iOS (ios-framework)
yield '$buildDir/ios/framework/Release';

// iOS in Fastlane
yield '$projectRoot/ios/build';
}

Future<Set<String>> _enumerateSymbolFiles() async {
Expand Down
17 changes: 14 additions & 3 deletions test/plugin_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,7 @@ void main() {
const version = '1.0.0';
final config = 'upload_debug_symbols: true';

// Default output directories in build/
final outputDirectories = [
'app/outputs',
'app/intermediates',
Expand All @@ -420,22 +421,32 @@ void main() {
'ios/Release-iphoneos',
'ios/Release-anyrandomflavor-iphoneos',
'ios/archive',
'ios/framework/Release'
'ios/framework/Release',
];
// Alternative output directories from 'root'
final alternativeOutputDirectories = ['ios/build'];
for (final dir in outputDirectories) {
fs
.directory(buildDir)
.childDirectory(dir)
.createSync(recursive: true);
}
for (final dir in alternativeOutputDirectories) {
fs
.directory(buildDir)
.childDirectory(dir)
.createSync(recursive: true);
}

final commandLog = await runWith(version, config);

for (final dir in outputDirectories) {
expect(
commandLog,
contains(
'$cli $commonArgs debug-files upload $orgAndProject $buildDir/$dir'));
contains(anyOf([
'$cli $commonArgs debug-files upload $orgAndProject $buildDir/$dir',
'$cli $commonArgs debug-files upload $orgAndProject $dir'
])));
}
});
});
Expand Down
Loading