marcoarment / bugshotkit Goto Github PK
View Code? Open in Web Editor NEWiOS in-app bug reporting for developers and testers, with annotated screenshots and the console log.
License: MIT License
iOS in-app bug reporting for developers and testers, with annotated screenshots and the console log.
License: MIT License
Hello
Well i included Bugshot in my delegate and added following line in my didFinishLaunching function
" #if defined(DEBUG) || defined(ADHOC)
[BugshotKit enableWithNumberOfTouches:1 performingGestures:BSKInvocationGestureDoubleTap feedbackEmailAddress:@"[email protected]"];
#endif
"
But when i double tap in map nothing happening there. I added breakpoint right before "#if defined (DEBUG) ..."
and its not coming in "if". Can you help why?
"os_log(3) has replaced asl(3)"
I have a temporary solution:
https://github.com/jsfu/BugshotKit
For some reason only one person on our team is experiencing this (5s, like the rest of us).
When he tries to send the mail, the compose screen pops up and then immediately pops back down.
In the logs I see this:
Feb 13 13:50:15 MailCompositionService[1069] <Error>: *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Illegal property type, {UIOffset=ff}'
then of course an error in the app
Feb 13 13:50:16 Shaun-Parkers-iPhone Three Cents[983] <Warning>: _serviceViewControllerReady:error: Error Domain=NSCocoaErrorDomain Code=4097 "The operation couldn’t be completed. (Cocoa error 4097.)"
Not sure what's going on, but the compose screen works properly in other applications (Safari, etc). Here is a stack trace of the mail composition service:
Incident Identifier: C5CAC359-9D3B-4A1C-8E7A-016C6936DBA5
CrashReporter Key: 42ee9ad36343ecb547f34e79361484f362673af9
Hardware Model: iPhone6,1
Process: MailCompositionService [1073]
Path: /Applications/MailCompositionService.app/MailCompositionService
Identifier: com.apple.MailCompositionService
Version: 1.0 (1.0)
Code Type: ARM-64 (Native)
Parent Process: launchd [1]
Date/Time: 2014-02-13 13:51:38.440 -0700
OS Version: iOS 7.0.4 (11B554a)
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x187f0309c __exceptionPreprocess + 132
1 libobjc.A.dylib 0x193e81d78 objc_exception_throw + 60
2 CoreFoundation 0x187f02f5c +[NSException raise:format:arguments:] + 116
3 Foundation 0x188a33200 -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 88
4 UIKit 0x18b2ed454 -[_UIAppearanceRecorder _applyCustomizations] + 2088
5 UIKit 0x18b3f2cb4 UIViewServiceUpdateAppearanceWithSerializedRepresentations + 404
6 UIKit 0x18b381600 -[_UIViewServiceViewControllerOperator __createViewController:withAppearanceSerializedRepresentations:legacyAppearance:hostAccessibilityServerPort:canShowTextServices:replyHandler:] + 848
7 CoreFoundation 0x187f07810 __invoking___ + 144
8 CoreFoundation 0x187e20dbc -[NSInvocation invoke] + 308
9 CoreFoundation 0x187e25614 -[NSInvocation invokeWithTarget:] + 72
10 UIKit 0x18b3d70ac -[_UIViewServiceImplicitAnimationDecodingProxy forwardInvocation:] + 252
11 CoreFoundation 0x187f0588c ___forwarding___ + 416
12 CoreFoundation 0x187e254ac __forwarding_prep_0___ + 92
13 CoreFoundation 0x187f07810 __invoking___ + 144
14 CoreFoundation 0x187e20dbc -[NSInvocation invoke] + 308
15 CoreFoundation 0x187e25614 -[NSInvocation invokeWithTarget:] + 72
16 UIKit 0x18b39e24c -[_UIQueueingProxy forwardInvocation:] + 344
17 CoreFoundation 0x187f0588c ___forwarding___ + 416
18 CoreFoundation 0x187e254ac __forwarding_prep_0___ + 92
19 CoreFoundation 0x187f07810 __invoking___ + 144
20 CoreFoundation 0x187e20dbc -[NSInvocation invoke] + 308
21 CoreFoundation 0x187e25614 -[NSInvocation invokeWithTarget:] + 72
22 CoreFoundation 0x187f0588c ___forwarding___ + 416
23 CoreFoundation 0x187e254ac __forwarding_prep_0___ + 92
24 CoreFoundation 0x187f07810 __invoking___ + 144
25 CoreFoundation 0x187e20dbc -[NSInvocation invoke] + 308
26 libdispatch.dylib 0x194450420 _dispatch_call_block_and_release + 24
27 libdispatch.dylib 0x1944503e0 _dispatch_client_callout + 16
28 libdispatch.dylib 0x19445356c _dispatch_main_queue_callback_4CF + 344
29 CoreFoundation 0x187ec2d64 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
30 CoreFoundation 0x187ec10a4 __CFRunLoopRun + 1452
31 CoreFoundation 0x187e01b38 CFRunLoopRunSpecific + 452
32 GraphicsServices 0x18d827830 GSEventRunModal + 168
33 UIKit 0x18ae400e8 UIApplicationMain + 1156
34 MailCompositionService 0x1000f0a30 0x1000ec000 + 18992
35 libdyld.dylib 0x19446baa0 start + 4
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x000000019456658c __pthread_kill + 8
1 libsystem_c.dylib 0x00000001944fa848 abort + 108
2 libc++abi.dylib 0x0000000193720990 abort_message + 84
3 libc++abi.dylib 0x000000019373dc28 default_terminate_handler() + 296
4 libobjc.A.dylib 0x0000000193e82024 _objc_terminate() + 124
5 libc++abi.dylib 0x000000019373b164 std::__terminate(void (*)()) + 12
6 libc++abi.dylib 0x000000019373aa7c __cxa_throw + 132
7 libobjc.A.dylib 0x0000000193e81e90 objc_exception_throw + 340
8 CoreFoundation 0x0000000187f02f58 +[NSException raise:format:arguments:] + 112
9 Foundation 0x0000000188a331fc -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 84
10 UIKit 0x000000018b2ed450 -[_UIAppearanceRecorder _applyCustomizations] + 2084
11 UIKit 0x000000018b3f2cb0 UIViewServiceUpdateAppearanceWithSerializedRepresentations + 400
12 UIKit 0x000000018b3815fc -[_UIViewServiceViewControllerOperator __createViewController:withAppearanceSerializedRepresentations:legacyAppearance:hostAccessibilityServerPort:canShowTextServices:replyHandler:] + 844
13 CoreFoundation 0x0000000187f0780c __invoking___ + 140
14 CoreFoundation 0x0000000187e20db8 -[NSInvocation invoke] + 304
15 CoreFoundation 0x0000000187e25610 -[NSInvocation invokeWithTarget:] + 68
16 UIKit 0x000000018b3d70a8 -[_UIViewServiceImplicitAnimationDecodingProxy forwardInvocation:] + 248
17 CoreFoundation 0x0000000187f05888 ___forwarding___ + 412
18 CoreFoundation 0x0000000187e254a8 __forwarding_prep_0___ + 88
19 CoreFoundation 0x0000000187f0780c __invoking___ + 140
20 CoreFoundation 0x0000000187e20db8 -[NSInvocation invoke] + 304
21 CoreFoundation 0x0000000187e25610 -[NSInvocation invokeWithTarget:] + 68
22 UIKit 0x000000018b39e248 -[_UIQueueingProxy forwardInvocation:] + 340
23 CoreFoundation 0x0000000187f05888 ___forwarding___ + 412
24 CoreFoundation 0x0000000187e254a8 __forwarding_prep_0___ + 88
25 CoreFoundation 0x0000000187f0780c __invoking___ + 140
26 CoreFoundation 0x0000000187e20db8 -[NSInvocation invoke] + 304
27 CoreFoundation 0x0000000187e25610 -[NSInvocation invokeWithTarget:] + 68
28 CoreFoundation 0x0000000187f05888 ___forwarding___ + 412
29 CoreFoundation 0x0000000187e254a8 __forwarding_prep_0___ + 88
30 CoreFoundation 0x0000000187f0780c __invoking___ + 140
31 CoreFoundation 0x0000000187e20db8 -[NSInvocation invoke] + 304
32 libdispatch.dylib 0x000000019445041c _dispatch_call_block_and_release + 20
33 libdispatch.dylib 0x00000001944503dc _dispatch_client_callout + 12
34 libdispatch.dylib 0x0000000194453568 _dispatch_main_queue_callback_4CF + 340
35 CoreFoundation 0x0000000187ec2d60 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 8
36 CoreFoundation 0x0000000187ec10a0 __CFRunLoopRun + 1448
37 CoreFoundation 0x0000000187e01b34 CFRunLoopRunSpecific + 448
38 GraphicsServices 0x000000018d82782c GSEventRunModal + 164
39 UIKit 0x000000018ae400e4 UIApplicationMain + 1152
40 MailCompositionService 0x00000001000f0a2c 0x1000ec000 + 18988
41 libdyld.dylib 0x000000019446ba9c start + 0
Although it's a clever way to prevent people from shipping BugshotKit to the AppStore, the "class dump" private API reference creates additional hassle for developers. In order to exclude BugshotKit from App Store build configurations, we have several unappealing choices:
Manually create a static library every time master
is updated, which makes it likely that the Bugshot library will become outdated compared to the current master
branch. (I just discovered mine was 41 commits behind.)
Configure the Xcode project to include a freshly-built static library as a target dependency, which is not as straightforward a process as it should be. I'm not sure it's even possible to do this on a per-build-config basis.
Add a separate target for dev/beta builds.
Manually add/remove the source .h
and .m
files when submitting to the App Store.
It's much simpler and cleaner to include BugshotKit dynamically, leaving it up to the developer to exclude BugshotKit from release
build configurations however she sees fit, perhaps with preprocessor macros. This isn't possible while the "class dump" safety feature is still around.
If you take a screenshot of landscape application (tested on iPad), the application shows it correctly, but when the modal mail composer view appears, the image is attached always in portrait.
Originally posted by @RichardVoyles09 in #49
Sometimes e-mail is not an option and there is a need to send a report to somewhere else.
For example as a developer I could implement a JIRA plugin that sends information to JIRA instead of e-mail.
Hi, I have an AR app that uses video capture with overlays, and I'd like people to be able to send me pictures when the accuracy is off. Unfortunately, the methods used to generate the attached screenshot programmatically cannot render those views, so things just appear as a blank view.
I tinkered a bit to add a -showWithImage:
method to the API, so I can detect a screenshot and pull the last item from a user's photos for the bug report. Interested in having a look?
Hi!
I recently fund that when I'm developing in the iOS Simulator my mac use one core at 100% and, consequently, the fans work and full speed and the temperature rises a lot.
At first I was thinking that maybe is some bug with a new version of the simulator. But I tried to use instruments to search for some bug in my code and I found that BugshotKit is causing this. Specifically -[BugshotKit updateFromASL] method.
I suppose that this method is the one that checks for logs. This happen every time I output a log in my code. But the main problem is that a single line of Log makes this method consume 100% of cpu time for 5 seconds or more.
Is this a normal behavior (because we are trying to read the logs) or is this a real issue?
Thanks! ;)
As mentioned in the title, this leads to a rejection by Apple when I tried to submit a TestFlight Build.
I saw this in the section For development and beta tests only. I have turned to the TestFlight from Ad-hoc for long ago. What a pity if this lib could not be used with TestFlight.
Is there any alternative way to workaround this private API? Could you have a look at it, please?
Thanks very much.
Here is a party of the E-mail from Apple:
To process your delivery, the following issues must be corrected:
Non-public API usage:
The app references non-public selectors in kpb: _gsEvent, attentionClassDumpUser:yesItsUsAgain:althoughSwizzlingAndOverridingPrivateMethodsIsFun:itWasntMuchFunWhenYourAppStoppedWorking:pleaseRefrainFromDoingSoInTheFutureOkayThanksBye:
If method names in your source code match the private Apple APIs listed above, altering your method names will help prevent this app from being flagged in future submissions. In addition, note that one or more of the above APIs may be located in a static library that was included with your app. If so, they must be removed.If you think this message was sent in error and that you have only used Apple-published APIs in accordance with the guidelines, send the app's nine-digit Apple ID, along with detailed information about why you believe the above APIs were incorrectly flagged, to [email protected]. For further information, visit the Technical Support Information page.
Thanks for the code!
-currentConsoleLogWithDateStamps:
accesses self.consoleMessages
from the wrong queue. Because of this, while enumerating the collection here:
for (BSKLogMessage *msg in self.consoleMessages) {
concurrent calls to +addLogMessage:
mutate the collection causing an exception.
This could mostly be fixed with [self.consoleMessages copy]
. Technically, though, since it's never good to access an NS collection from multiple threads a better fix probably requires a dispatch_sync(self.logQueue, ^{
. If it's cool to be on that queue for a while, just execute the whole loop on the queue.
- (NSString *)currentConsoleLogWithDateStamps:(BOOL)dateStamps
{
NSMutableString *string = [NSMutableString string];
dispatch_sync(self.logQueue, ^{
char fdate[24];
for (BSKLogMessage *msg in self.consoleMessages) {
if (dateStamps) {
time_t timestamp = (time_t) msg.timestamp;
struct tm *lt = localtime(×tamp);
strftime(fdate, 24, "%Y-%m-%d %T", lt);
[string appendFormat:@"%s.%03d %@\n", fdate, (int) (1000.0 * (msg.timestamp - floor(msg.timestamp))), msg.message];
} else {
[string appendFormat:@"%@\n", msg.message];
}
}
});
return string;
}
Alternatively, you could just copy the collection while dispatched to the proper queue:
- (NSString *)currentConsoleLogWithDateStamps:(BOOL)dateStamps
{
NSMutableString *string = [NSMutableString string];
__block NSArray *arrayToEnumerate;
dispatch_sync(self.logQueue, ^{
arrayToEnumerate = [self.consoleMessages copy];
});
char fdate[24];
for (BSKLogMessage *msg in arrayToEnumerate) {
if (dateStamps) {
time_t timestamp = (time_t) msg.timestamp;
struct tm *lt = localtime(×tamp);
strftime(fdate, 24, "%Y-%m-%d %T", lt);
[string appendFormat:@"%s.%03d %@\n", fdate, (int) (1000.0 * (msg.timestamp - floor(msg.timestamp))), msg.message];
} else {
[string appendFormat:@"%@\n", msg.message];
}
}
return string;
}
I'll happily do a pull request with either approach based on feedback.
Very slow input when the triple tap gesture is enabled. Special character suggestions come up. Device - iPhone 5s
While an AlertView or ActionSheet is present on the screen, BugshotKit will not invoke, and I expected as much.
So, a nice feature would be:
While AlertView or ActionSheet is present, user takes a screen capture (home & power button technique). User dismisses the modal dialog, invoke BugShotKit's BSKMainViewController via the gesture. On that main VC, have a "Choose From Camera Roll" option which would slide up a picker (similar to the actual iOS BugShot app), let the user pick the screenshot they want, and when picked, it replaces the screenshot that BSK took. Continue on as normal.
Sorry someone else
It would beneficial to be able to use BSKWindow
without having to use [BugshotKit enableWithNumberOfTouches...];
. My app revolves around MKMapView
and tapping or swiping is vital. Having a way to only displayBugshot
when the user shakes their device would be nice.
2014-02-14 14:27:11.487 Sideline[8664:60b] [BugshotKit] Console font not found. Please add Inconsolata.otf to your Resources.
2014-02-14 14:27:19.582 Sideline[8664:60b] [BugshotKit] Enabled for 2-finger swipe down.
2014-02-14 14:27:23.400 Sideline[8664:60b] [BugshotKit] Enabled for 2-finger swipe down.
2014-02-14 14:27:38.554 Sideline[8664:60b] -[UIImage applyBlurWithRadius:tintColor:saturationDeltaFactor:maskImage:]: unrecognized selector sent to instance 0x1712a390
2014-02-14 14:27:38.557 Sideline[8664:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIImage applyBlurWithRadius:tintColor:saturationDeltaFactor:maskImage:]: unrecognized selector sent to instance 0x1712a390'
*** First throw call stack:
(0x2fe02e83 0x3a1636c7 0x2fe067b7 0x2fe050af 0x2fd53dc8 0x872a9 0x32606dd9 0x3223ca79 0x32226243 0x323002ed 0x32225af3 0x322257a7 0x32209369 0x32209001 0x32208a0d 0x3220881f 0x3220254d 0x2fdcdf69 0x2fdcb8f7 0x2fdcbc43 0x2fd36471 0x2fd36253 0x34a6a2eb 0x325eb845 0x80539 0x3a65cab7)
libc++abi.dylib: terminating with uncaught exception of type NSException
I got this soon after launching the app, just trying out all three tools. If it's at all interesting, my app was in the middle of pushing a new view controller when I managed to trigger Bugshot.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.