-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
docs: Add Objective C examples to cocoa onboarding + non UI verification options #92506
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: Add Objective C examples to cocoa onboarding + non UI verification options #92506
Conversation
❌ 3 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on my reply here, I think the best non-UI (and indeed, probably the best overall) method to verify an install should be to simply capture a message.
If anyone leaves a delayed crash in by accident, it creeps back in due to weird merge situations, etc, that's much higher risk for customers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also think that crashing as pointed out by @armcknight isn't a great idea, but instead of capturing a message I think we should stick to capturing errors. We already do that for most other onboarding docs, and errors are what users use Sentry mostly for.
UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect]; | ||
button.frame = CGRectMake(20, 50, 100, 30); | ||
[button setTitle:@"Break the world" forState:UIControlStateNormal]; | ||
[button addTarget:self action:@selector(breakTheWorld:) forControlEvents:UIControlEventTouchUpInside]; | ||
[view addSubview:button]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
m
: IMO, we can ditch this part. It's noisy and I doubt many people are going to use it exactly like this.
UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect]; | |
button.frame = CGRectMake(20, 50, 100, 30); | |
[button setTitle:@"Break the world" forState:UIControlStateNormal]; | |
[button addTarget:self action:@selector(breakTheWorld:) forControlEvents:UIControlEventTouchUpInside]; | |
[view addSubview:button]; |
Instead, I think we should only show how to capture an error like we do in the docs, which you updated here: getsentry/sentry-docs#13878
I think we should do the same for Swift.
DispatchQueue.global().asyncAfter(deadline: .now() + 10) { | ||
SentrySDK.crash() | ||
}` | ||
: ` | ||
@import Sentry; | ||
|
||
[SentrySDK performSelector:@selector(crash) withObject:nil afterDelay:10];`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
h
: Why the delay of 10 seconds? I'm pretty sure that could confuse users. Let's simply add a sample how to capture an error and let the user decide if they want to do that async or nor.
…-for-apple-platforms-sdk-setup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…ion options (#92506) Apple onboarding only had Swift + UIKit verification steps. Added: - Objective C code - Non UI options to verify the setup Fixes [getsentry/sentry-cocoa#4991](getsentry/sentry-cocoa#4991) ### Legal Boilerplate Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.
Apple onboarding only had Swift + UIKit verification steps.
Added:
Fixes getsentry/sentry-cocoa#4991
Legal Boilerplate
Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.