Skip to content

Commit

Permalink
Merge branch 'main' into fix/sr-filter-navigation-breadcrunb
Browse files Browse the repository at this point in the history
  • Loading branch information
brustolin authored Oct 31, 2024
2 parents 5ad67aa + a90f228 commit 6427720
Show file tree
Hide file tree
Showing 26 changed files with 727 additions and 157 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/ui-tests-critical.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ jobs:
xcode: "14.3.1"
device: "iPhone 14"
os-version: "16.4"
create-simulator: true
force-sim-runtime: true

# macos-14 iOS 17 not included due to the XCUIServerNotFound errors causing flaky tests
# macos-14 iOS 17 not included due to the XCUIServerNotFound errors causing flaky tests

- runs-on: macos-15
xcode: "16"
Expand All @@ -65,8 +65,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Create ${{matrix.device}} (${{matrix.os-version}}) Simulator using Xcode ${{matrix.xcode}}
if: ${{matrix.create-simulator}}
run: ./scripts/create-simulator.sh "${{matrix.xcode}}" "${{matrix.os-version}}" "${{matrix.device}}"
run: ./scripts/create-simulator.sh "${{matrix.xcode}}" "${{matrix.os-version}}" "${{matrix.device}}" "${{matrix.force-sim-runtime}}"
- name: Install Maestro
run: brew tap mobile-dev-inc/tap && brew install mobile-dev-inc/tap/[email protected]
- name: Install iDB Companion
Expand All @@ -76,16 +75,17 @@ jobs:
with:
name: ${{env.APP_ARTIFACT_NAME}}
path: ${{env.APP_PATH}}
- uses: futureware-tech/simulator-action@bfa03d93ec9de6dacb0c5553bbf8da8afc6c2ee9 # pin@v3
with:
model: ${{matrix.device}}
os_version: ${{matrix.os-version}}

- name: Run Maestro Flows
run: |
xcrun simctl install booted ${{env.APP_PATH}}
maestro test ${{env.MAESTRO_FLOWS_PATH}} --format junit --debug-output ${{env.MAESTRO_LOGS_PATH}}
- name: Delete Simulator
if: always()
run: ./scripts/delete-simulator.sh

- name: Store Maestro Logs
uses: actions/upload-artifact@v4
if: failure()
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ui-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:

- name: Create iOS 16.4 simulator
if: ${{ matrix.device == 'iPhone 14 (16.4)' }}
run: ./scripts/create-simulator.sh 14.3.1 16.4 "iPhone 14"
run: ./scripts/create-simulator.sh 14.3.1 16.4 "iPhone 14" true

- name: Run Fastlane
run: fastlane ui_tests_ios_swift device:"${{matrix.device}}"
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
- Add option to report uncaught NSExceptions on macOS (#4471)
- Build visionOS project with static Sentry SDK (#4462)
- Too many navigation breadcrumbs for Session Replay (#4480)
- Time-of-check time-of-use filesystem race condition (#4473)
- Capture all touches with session replay (#4477)

### Improvements

- Improve frames tracker performance (#4469)
- Log a warning when dropping envelopes due to rate-limiting (#4463)
- Expose `SentrySessionReplayIntegration-Hybrid.h` as `private` (#4486)

## 8.39.0

Expand Down
21 changes: 18 additions & 3 deletions Samples/iOS-ObjectiveC/iOS-ObjectiveC/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -41,26 +41,41 @@ - (BOOL)application:(UIApplication *)application
};

options.configureUserFeedback = ^(SentryUserFeedbackConfiguration *_Nonnull config) {
UIOffset layoutOffset = UIOffsetMake(25, 75);
if ([args containsObject:@"--io.sentry.iOS-Swift.user-feedback.all-defaults"]) {
config.configureWidget = ^(SentryUserFeedbackWidgetConfiguration *widget) {
widget.layoutUIOffset = layoutOffset;
};
return;
}
config.useShakeGesture = YES;
config.showFormForScreenshots = YES;
config.configureWidget = ^(SentryUserFeedbackWidgetConfiguration *_Nonnull widget) {
if ([args
containsObject:@"--io.sentry.iOS-Swift.auto-inject-user-feedback-widget"]) {
widget.labelText = @"Report Jank";
widget.widgetAccessibilityLabel = @"io.sentry.iOS-Swift.button.report-jank";
widget.layoutUIOffset = layoutOffset;
} else {
widget.autoInject = NO;
}

if ([args containsObject:@"--io.sentry.iOS-Swift.user-feedback.no-widget-text"]) {
widget.labelText = nil;
}
if ([args containsObject:@"--io.sentry.iOS-Swift.user-feedback.no-widget-icon"]) {
widget.showIcon = NO;
}
};
config.configureForm = ^(SentryUserFeedbackFormConfiguration *_Nonnull uiForm) {
uiForm.formTitle = @"Jank Report";
uiForm.submitButtonLabel = @"Report that jank";
uiForm.addScreenshotButtonLabel = @"Show us the jank";
uiForm.messagePlaceholder
= @"Describe the nature of the jank. Its essence, if you will.";
uiForm.themeOverrides = ^(SentryUserFeedbackThemeConfiguration *_Nonnull theme) {
theme.font = [UIFont fontWithName:@"Comic Sans" size:25];
};
};
config.configureTheme = ^(SentryUserFeedbackThemeConfiguration *_Nonnull theme) {
theme.font = [UIFont fontWithName:@"ChalkboardSE-Regular" size:25];
};
config.onSubmitSuccess = ^(NSDictionary<NSString *, id> *_Nonnull info) {
NSString *name = info[@"name"] ?: @"$shakespearean_insult_name";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,18 @@
argument = "--disable-file-io-tracing"
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "--io.sentry.iOS-Swift.user-feedback.no-widget-icon"
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "--io.sentry.iOS-Swift.user-feedback.no-widget-text"
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "--io.sentry.iOS-Swift.user-feedback.all-defaults"
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "--skip-sentry-init"
isEnabled = "NO">
Expand Down Expand Up @@ -163,7 +175,7 @@
</CommandLineArgument>
<CommandLineArgument
argument = "--io.sentry.iOS-Swift.auto-inject-user-feedback-widget"
isEnabled = "NO">
isEnabled = "YES">
</CommandLineArgument>
</CommandLineArguments>
<EnvironmentVariables>
Expand Down
47 changes: 44 additions & 3 deletions Samples/iOS-Swift/iOS-Swift/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -163,24 +163,65 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
}

options.configureUserFeedback = { config in
let layoutOffset = UIOffset(horizontal: 25, vertical: 75)
guard !args.contains("--io.sentry.iOS-Swift.user-feedback.all-defaults") else {
config.configureWidget = { widget in
widget.layoutUIOffset = layoutOffset
}
return
}
config.useShakeGesture = true
config.showFormForScreenshots = true
config.configureWidget = { widget in
if args.contains("--io.sentry.iOS-Swift.auto-inject-user-feedback-widget") {
widget.labelText = "Report Jank"
if Locale.current.languageCode == "ar" { // arabic
widget.labelText = ""
} else if Locale.current.languageCode == "ur" { // urdu
widget.labelText = "نستعلیق"
} else if Locale.current.languageCode == "he" { // hebrew
widget.labelText = "עִבְרִית‎"
} else if Locale.current.languageCode == "hi" { // Hindi
widget.labelText = "नागरि"
} else {
widget.labelText = "Report Jank"
}
widget.widgetAccessibilityLabel = "io.sentry.iOS-Swift.button.report-jank"
widget.layoutUIOffset = layoutOffset
} else {
widget.autoInject = false
}
if args.contains("--io.sentry.iOS-Swift.user-feedback.no-widget-text") {
widget.labelText = nil
}
if args.contains("--io.sentry.iOS-Swift.user-feedback.no-widget-icon") {
widget.showIcon = false
}
}
config.configureForm = { uiForm in
uiForm.formTitle = "Jank Report"
uiForm.submitButtonLabel = "Report that jank"
uiForm.addScreenshotButtonLabel = "Show us the jank"
uiForm.messagePlaceholder = "Describe the nature of the jank. Its essence, if you will."
uiForm.themeOverrides = { theme in
theme.font = UIFont(name: "Comic Sans", size: 25)
}
config.configureTheme = { theme in
let fontSize: CGFloat = 25

let fontFamily: String
if Locale.current.languageCode == "ar" { // arabic; ar_EG
fontFamily = "Damascus"
} else if Locale.current.languageCode == "ur" { // urdu; ur_PK
fontFamily = "NotoNastaliq"
} else if Locale.current.languageCode == "he" { // hebrew; he_IL
fontFamily = "Arial Hebrew"
} else if Locale.current.languageCode == "hi" { // Hindi; hi_IN
fontFamily = "DevanagariSangamMN"
} else {
fontFamily = "ChalkboardSE-Regular"
}
theme.font = UIFont(name: fontFamily, size: fontSize) ?? UIFont.systemFont(ofSize: fontSize)
theme.outlineColor = .purple
theme.foreground = .purple
theme.background = .purple.withAlphaComponent(0.1)
}
config.onSubmitSuccess = { info in
let name = info["name"] ?? "$shakespearean_insult_name"
Expand Down
Loading

0 comments on commit 6427720

Please sign in to comment.