Git Product home page Git Product logo

airbrake-ios's Introduction

Airbrake iOS

Introduction

The Airbrake iOS/Mac OS Notifier is designed to give developers instant notification of problems that occur in their apps. With just a few lines of code and a few extra files in your project, your app will automatically phone home whenever a crash or exception is encountered. These reports go straight to Airbrake where you can see information like backtrace, device type, app version, and more.

Signals

The notifier handles all unhandled exceptions, and a select list of Unix signals:

  • SIGABRT
  • SIGBUS
  • SIGFPE
  • SIGILL
  • SIGSEGV
  • SIGTRAP

Symbolication

In order for the call stack to be properly symbolicated at the time of a crash, applications built with the notifier should not be stripped of their symbol information at compile time. If these settings are not set as recommended, frames from your binary will be displayed as hex return addresses instead of readable strings. These hex return addresses can be symbolicated using atos. More information about symbolication and these build settings can be found in Apple's developer documentation. Here are the settings that control code stripping:

  • Deployment Postprocessing: Off
  • Strip Debug Symbols During Copy: Off
  • Strip Linked Product: Off

Versioning

Airbrake supports a version floor for reported notices. A setting called "Latest app version" is available in your project settings that lets you specify the lowest app version for which crashes will be saved. This version is compared using semantic versioning. The notifier uses your CFBundleVersion to make this comparison. If you have apps in the wild that are using an older notifier version and don't report this bundle version, the notices will dropped by Airbrake. For more information on how this is implemented, read documentation article.

Installation

Directly from source code

  1. Drag the Airbrake folder to your project and make sure "Copy Items" and "Create Groups" are selected
  2. Add SystemConfiguration.framework to your project
  3. Add 'CrashReporter.framework' from Airbrake folder to your project

From cocoapods

Add this line:

pod 'Airbrake-iOS'

Upgrading

Please remove all of the resources used by the notifier from your project before upgrading. This is the best way to make sure all of the appropriate files are present and no extra files exist.

Find your project ID and project key

With version 4.*, Airbrake iOS also requires your Airbrake project ID. To find your project_id and project_key navigate to your project's General Settings and copy the values from the right sidebar.

Running the notifier in Swift as framework

  1. Add Airbrake-iOS to the podfile:

    use_frameworks!
    pod 'Airbrake-iOS'
    
  2. import Airbrake_iOS in app delegate. (if you run into issue with build, please refer to issue #58)

  3. set up the ABNotifer in your app delegate at the beginning of your 'func application(application: UIApplication!, didFinishLaunchingWithOptions launchOptions: NSDictionary!) -> Bool {'

    ABNotifier.start(
      withAPIKey: YOUR_API_KEY,
      projectID: Your_Product_ID,
      environmentName: ABNotifierAutomaticEnvironment,
      useSSL: true
    )

And you're good to go.

Running the notifier in Swift as static library

When you add Airbrake iOS to your Swift project, Xcode will automatically add the bridging header for 'ABNotifier' class.

When Xcode didn't generate the bridging header for your project, for example, you installed Airbrake iOS from cocoapods, you can create a bridge file manually.

  1. Add a new file to the project and choose Header File as template

  2. Next, Save as [ProjectName]_Bridging_Header.h and make sure it's at the root of the project.

  3. Open [ProjectName]-Bridging-Header.h and add ABNotifier, for example

    #ifndef [ProjectName]_Bridging_Header
    #define [ProjectName]_Bridging_Header
    #import "ABNotifier.h"
    #endif
  4. Add [ProjectName]_Bridging_Header.h to your project build settings. In your project build settings, find Swift Compiler – Code Generation, and next to Objective-C Bridging Header add your bridging header file. Now you should be able to access ABNotifier class in your swift project.

First, set up the ABNotifer in your app delegate at the beginning of your 'func application(application: UIApplication!, didFinishLaunchingWithOptions launchOptions: NSDictionary!) -> Bool {'

     ABNotifier.start(
       withAPIKey: YOUR_API_KEY,
       projectID: Your_Product_ID,
       environmentName: ABNotifierAutomaticEnvironment,
       useSSL: true
     )

Running the notifier in Objective-C

The ABNotifier class is the primary class you will interact with while using the notifier. All of its methods and properties, along with the ABNotifierDelegate protocol are documented in their headers. Please read through the header files for a complete reference of the library.

To run the notifier you only need to complete two steps. First, import the ABNotifier header file in your app delegate.

#import "ABNotifier.h"

Next, call the start notifier method at the very beginning of your application:didFinishLaunchingWithOptions:

[ABNotifier startNotifierWithAPIKey:@"YOUR_API_KEY"
                          projectID:@"Your_Product_ID"
                    environmentName:ABNotifierAutomaticEnvironment
                           delegate:self];

The API key argument expects your Airbrake project API key. The environment name you provide will be used to categorize received crash reports in the Airbrake web interface. The notifier provides several factory environment names that you are free to use.

  • ABNotifierAutomaticEnvironment
  • ABNotifierDevelopmentEnvironment
  • ABNotifierAdHocEnvironment
  • ABNotifierAppStoreEnvironment
  • ABNotifierReleaseEnvironment

The ABNotifierAutomaticEnvironment environment will set the environment to release or development depending on the presence of the DEBUG macro.

Environment Variables

Airbrake notices support custom environment variables. To add your own values to this part of the notice, use the "environmentValue" family of methods found in ABNotifier.h.

Custom Exception Logging

You can log your own exceptions at any time.

@try {
    // something dangerous
}
@catch (NSException *e) {
    [ABNotifier logException:e];
}

When custom exception is used, the notifier will mirror the existing uncaught exception handler, and allow the application to catch and record exceptions without actually crashing.

Debugging

To test that the notifier is working inside your application, a simple test method is provided. This method raises an exception, catches it, and reports it as if a real crash happened. Add this code to your application:didFinishLaunchingWithOptions: to test the notifier:

[ABNotifier writeTestNotice];

Similarly you can call the test method in Swift.

ABNotifier.writeTestNotice()

If you use the DEBUG macro to signify development builds the notifier will log notices and errors to the console as they are reported to help see more details.

Implementing the Delegate Protocol

The ABNotifierDelegate protocol allows you to respond to actions going on inside the notifier as well as provide runtime customizations. As of version 3.0 of the notifier, a matching set of notifications are posted to NSNotificationCenter. All of the delegate methods in the ABNotifierDelegate protocol are documented in ABNotifierDelegate.h. Here are just a few of those methods:

MyAppDelegate.h

#import ABNotifier.h

@interface MyAppDelegate : NSObject <UIApplicationDelegate, ABNotifierDelegate>

// your properties and methods

@end

MyAppDelegate.m

@implementation MyAppDelegate

// your other methods

#pragma mark - notifier delegate
/*
  These are only a few of the delegate methods you can implement.
  The rest are documented in ABNotifierDelegate.h. All of the
  delegate methods are optional.
*/
- (void)notifierWillDisplayAlert {
  [gameController pause];
}
- (void)notifierDidDismissAlert {
  [gameController resume];
}
- (NSString *)titleForNoticeAlert {
  return @"Oh Noes!";
}
- (NSString *)bodyForNoticeAlert {
  return @"MyApp has detected unreported crashes, would you like to send a report to the developer?";
}

@end

Supported versions

The notifier requires iOS 6.0 or higher for iOS projects and Mac OS 10.7 or higher for Mac OS projects. It's also compitable with Swift. Current iOS Notifier version is 4.2.8.

Contact

In case you have a problem, question or a bug report, feel free to:

License

The project uses the MIT License. See LICENSE.md for details.

airbrake-ios's People

Contributors

a-zak avatar adamvduke avatar alif avatar aramark-pivotal avatar benarent avatar calebd avatar dlackty avatar endoze avatar ettore avatar itolmach avatar jocelynlih avatar klodr avatar kpbode avatar kyrylo avatar mac-cain13 avatar marshalgeazipp avatar mwhuss avatar pefavre avatar phumpal avatar rpassis avatar soffes avatar thompiler avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

airbrake-ios's Issues

Bitcode support

Airbrake is missing bitcode support. When can i expect this to be ready?

ABNotifierReachabilityDidChange always getting FALSE!

hello :)
we love your service and we really love to use it but looks like we're unable to get to the crash reporting dialog for some reason :(

We did a little bit of digging and using a the test call from out appdelegate and we found out that log files are written correctly but the ABlib is unable to display the allert dialog and send the notice since it thinks there's no connection :(

PLacing a log here:

void ABNotifierReachabilityDidChange(SCNetworkReachabilityRef target, SCNetworkReachabilityFlags flags, void *info) {
    ABLog(@"ABNotifierReachabilityDidChange! flags: %u", flags);
[...]

the result is:

2013-01-09 16:53:29.942 Save The Mom[3705:707] [Airbrake] ABNotifierReachabilityDidChange! flags: 0

and

    if ([ABNotifier isReachable:flags]) 

is always false, causing the whole thing to not to work :(
Commenting the if, makes things works but, well, "might" not be the best idea ;)

Any idea on how this may happen?

tested on: iphone 4 (5.1.1), iphone 5 (6.0.1) and simulators

Freezing on [ABNotice getNoticeDictionary]

I have a user who's device is freezing. From TestFlight I'm able to see that their is an error happening in -[ABNotice getNoticeDictionary] in ABNotice.m on Line 237.

*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[1]
OrangeQC-[ABNotice getNoticeDictionary] 
in ABNotice.m on Line 237

Part of the backtrace:

4   MyApp   0x002d7f79  -[ABNotice getNoticeDictionary] in ABNotice.m on Line 237
5   MyApp   0x002d7bdb  -[ABNotice JSONString] in ABNotice.m on Line 211
6   MyApp   0x002da741  +[ABNotifier postNoticeWithContentsOfFile:] in ABNotifier.m on Line 494

I changed the way I initialize AB to use:

    [ABNotifier startNotifierWithAPIKey:@"... my api key ..."
                        environmentName:envName
                               userName:@"n/a"
                                 useSSL:YES
                               delegate:self];

But that didn't help. I'm not sure which key going into that dictionary is nil. I think there should be some checks in place to make sure that nil isn't being put into the dictionary.

Error posting from dev environment

I don't seem to get crash logs from my dev builds anymore. When I try to test & run "[ABNotifier writeTestNotice]", I get the following…

2013-04-03 10:48:56.070 Digg[43594:660f] [Airbrake] The posted notice payload is invalid.
2013-04-03 10:48:56.071 Digg[43594:660f] [Airbrake] <notice version="2.1"><api-key>1cd7be8ca5fd297158aa27c4d5ff1020</api-key><notifier><name>Hoptoad iOS Notifier</name><url>http://github.com/guicocoa/hoptoad-ios</url><version>3.1</version></notifier><error><class>NSRangeException</class><message>NSRangeException: *** -[__NSArrayI objectAtIndex:]: index 4294967295 beyond bounds for empty array</message><backtrace><line number="0" file="CoreFoundation" method="0x0397202e __exceptionPreprocess + 206"></line><line number="1" file="libobjc.A.dylib" method="0x03452e7e objc_exception_throw + 44"></line><line number="2" file="CoreFoundation" method="0x03927b44 -[__NSArrayI objectAtIndex:] + 196"></line><line number="3" file="Digg" method="0x000e94df +[ABNotifier writeTestNotice] + 95"></line><line number="4" file="Digg" method="0x00004e01 -[NMAppDelegate postLaunchActions] + 417"></line><line number="5" file="Digg" method="0x000049c9 __59-[NMAppDelegate application:didFinishLaunchingWithOptions:]_block_invoke + 41"></line><line number="6" file="libdispatch.dylib" method="0x035c553f _dispatch_call_block_and_release + 15"></line><line number="7" file="libdispatch.dylib" method="0x035d7014 _dispatch_client_callout + 14"></line><line number="8" file="libdispatch.dylib" method="0x035c77d5 _dispatch_main_queue_callback_4CF + 296"></line><line number="9" file="CoreFoundation" method="0x03918af5 __CFRunLoopRun + 1925"></line><line number="10" file="CoreFoundation" method="0x03917f44 CFRunLoopRunSpecific + 276"></line><line number="11" file="CoreFoundation" method="0x03917e1b CFRunLoopRunInMode + 123"></line><line number="12" file="GraphicsServices" method="0x03d2f7e3 GSEventRunModal + 88"></line><line number="13" file="GraphicsServices" method="0x03d2f668 GSEventRun + 104"></line><line number="14" file="UIKit" method="0x02086ffc UIApplicationMain + 1211"></line><line number="15" file="Digg" method="0x00002fd4 main + 228"></line><line number="16" file="Digg" method="0x00002ea5 start + 53"></line></backtrace></error><request><url></url><component>NMNewsStreamViewController_iPhone</component><action>0x000e94df +[ABNotifier writeTestNotice] + 95</action><cgi-data><var key="Operating System">6.1</var><var key="Virtual Memory Size">910.87 MB</var><var key="Resident Memory Size">39.83 MB</var><var key="Application Version">3.4 (rc2)</var><var key="Platform">iPhone Simulator</var></cgi-data></request><server-environment><environment-name>Development</environment-name><app-version>rc2</app-version></server-environment></notice>

Passing up parameters does not work

Overview

I am trying to log custom exceptions using Airbrake to pair with our existing web client integration.

Usage

I am performing custom logging like so:

let exception = NSException(name: .init(rawValue: title), reason: subtitle, userInfo: nil)
ABNotifier.logException(exception, parameters: ["userId":"anthony"]

It looks like Airbrake is logging the error itself just fine, but not attaching any of the parameters to the environment section on the website.

After doing some further research, it looks like in ABNotifier.m under logException:withParameters we do not add the exceptionParameters to the final dictionary we pass to Airbrake. The dictionary only contains the exception name, reason, and call stack. It is missing the exception parameters and current view controller.

Specifically,

NSDictionary *dictionary = [NSDictionary dictionaryWithObjectsAndKeys:
                                        [exception name], ABNotifierExceptionNameKey,
                                        [exception reason], ABNotifierExceptionReasonKey,
                                        [exception callStackSymbols], ABNotifierCallStackKey,
                                        exceptionParameters, ABNotifierExceptionParametersKey,
#if TARGET_OS_IPHONE
                                        ABNotifierCurrentViewController(), ABNotifierControllerKey,
#endif
                                        nil];

screen shot 2018-05-21 at 3 30 41 pm

Expected Behavior

I would expect that the parameters properly get passed up and then I can view them in Environment unless I am not looking in the right place.

Ios Airbrake not sending crash to server

I can't get ios airbrake to work, i have integrated as per the docs:

  • (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    [ABNotifier startNotifierWithAPIKey:@"xxxxxxx"
    projectID:@"xxxxx"
    environmentName:ABNotifierAutomaticEnvironment
    useSSL:YES
    delegate:self];
    [ABNotifier writeTestNotice];
    return YES;
    }

i see airbrake starting up in the logs

2017-08-04 20:44:34.867 SimpleBills[1271:12867] [Airbrake] Notifier 4.2.6 ready to catch errors
2017-08-04 20:44:35.054 SimpleBills[1271:12867] [Airbrake] Environment "Development"

stepping through the writeTestNotice i see airbrake create a dump to a file.

However nothing is sent to server.

ARC Version?

ARC is already a couple of years old (over 3 years i think), I'm not sure why this SDK still doesn't use it ...?

Out of date README

Description by @sgubler from https://github.com/airbrake/airbrake-docs/issues/59

The README.md is out of date for installing/using Airbrake on iOS 10/Xcode 8 and Cocoapods 1.1.1

Firstly ABCrashReporter.h need the second import statement changed to #import "CrashReporter.h"

Secondly the AppDelegate.swift syntax is:

ABNotifier.start(withAPIKey: "API Key", projectID: "Project ID", environmentName: > ABNotifierAutomaticEnvironment, useSSL: true)

Add OSX support to Podspec

This library supports OS X 10.7 upwards, but that's not mentioned in the Podspec. Can you add OSX support to the platforms declaration in the Podspec? Thanks!

Undefined symbols for architecture armv7

I've installed the airbrake-io version 4.1.3 and when I try to use it I can't even call any airbrake method because of this architecture issue.
I've tried to change the architecture but the issue remains.

screen shot 2017-06-30 at 12 35 07

Outdated Airbrake Notifier warnings

I'm using the latest version of airbrake-ios, but my Airbrake emails have the following header:

This project is using an outdated version of the Airbrake Notifier (). You can upgrade to the latest version (1.3.1) from GitHub or RubyGems.

Is this expected?

Not receiving crash report after server gives 201

Hi,
We are getting crashed in our app. I have sent an email support ticket with some extra specifics to the app, id's etc.

  • the crash is being logged to plcrashreporter
  • I open the app and debug as far as it sends the report to to your system
  • I see a 201 back in the api response with an id of 1300859853055963762
  • No crash reported in the backend system, no emails

Details:
Latest sdk - running iOS7
Crash type - sigbart, call [nsurldatauploadtask resume] when the state of the task is complete triggers this in iOS7.
Occurrences - more the 10

Hope you can help.
John.

Not building on Xcode 7 and iOS 9+

Hi. My app fails to build because the library seems outdated. This is the error:

.../Airbrake/CrashReporter.framework/CrashReporter(libCrashReporter-iphoneos.a-armv7-master.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I have tried enabling or disabling bitcode in my build settings but it doesn't make a difference.

backtrace will be empty

            // call stack
            length = [data length] - location;
            char *string = malloc(length + 1); 
            const char *bytes = [data bytes];
            for (unsigned long i = 0; location < [data length]; location++) {
                if (bytes[location] != '\0') {
                    string[i++] = bytes[location];
                }   
            }   
            NSArray *lines = [[NSString stringWithUTF8String:string] componentsSeparatedByString:@"\n"];

in ABNotice.m here the string won't end with '\0',then [NSString stringWithUTF8String:string] will(maybe depend on random) be nil,so you will get an empty backtrace

Swift Compiler Warning: ‘UIAlertView' is deprecated

Preliminary Info

What version of Airbrake are you using?

Installed version 4.2.8 using Cocoapods.

What are the versions of any relevant development tools you are using?

Xcode 11.4.1
Swift Language Version: Swift 5

Report

What unexpected behaviour are you seeing?

When compiling, Xcode raises deprecation warnings:
'UIAlertView' is deprecated: first deprecated in iOS 9.0 - UIAlertView is deprecated. Use UIAlertController with a preferredStyle of UIAlertControllerStyleAlert instead

What is the expected behaviour?

A warning free framework.

What are the steps to reproduce the unexpected behaviour?

Build any code using Xcode 11.4.1 with Airbrake v4.2.8 installed with Cocoapods

Warning: Attempt to present UIAlertController on VC1 which is already presenting VC2

I have configured Airbrake as described in the docs but as soon as my app starts it attempts to present an alert on my rootVC. But the root VC is already presenting another VC so this fails.

This is the code which attempts to present from ABNotifier.m

[[[UIApplication sharedApplication] delegate].window.rootViewController presentViewController:alert animated:YES completion:nil];

This is the failure message

2018-06-07 14:05:08.634650+0800 ape-mobile[91222:4325460] Warning: Attempt to present <UIAlertController: 0x7f852c82ec00> on <SignInViewController: 0x7f8529dc9490> which is already presenting <SignInPageViewController: 0x7f852b027600>

iOS: dictionary in parameters not posted

I am using Airbrake on iOS and whenever I log an error via [ABNotifier logException:parameters] the dictionary that I hand over in the parameters variable is not posted to Airbrake. Do you have any idea why this is occurring?

I can set environment variables to get the info across but obviously that is not the best way to go about this :).

I use a simple marco to toggle Airbrake on/off:

ifdef USE_AIRBRAKE

define AIRBRAKE_LOG(_EXCEPTION, _EXTRADATA) [ABNotifier logException: _EXCEPTION parameters:_EXTRADATA];

else

define AIRBRAKE_LOG(_EXCEPTION, _EXTRADATA);

endif

And when I use this macro the parameters are not visible in airbrake.

NSMutableDictionary *myUserInfo = [NSMutableDictionary dictionaryWithDictionary:[notification userInfo]];// notification = NSNotification object
[myUserInfo setValue:@"signature error 800" forKey:@"error"];
NSException *e = [NSException exceptionWithName:exceptionName reason:@"Signature error" userInfo:myUserInfo];
AIRBRAKE_LOG(e, myUserInfo);

I just get these parameters in airbrake's web interface:
{"controller"=>"", "action"=>""}

Stack trace not showing application frames.

The crash stack traces in the airbrake console , do not show the Application Stack frames.

For eg i see:
/usr/lib/system/libsystem_kernel.dylib:8 in __pthread_kill
/usr/lib/system/libsystem_c.dylib:140 in abort
/var/containers/Bundle/Application/1C73DFF8-4FD1-4943-ABB6-4311C397F590/My.app/
My: in -[PLCrashReporter generateLiveReportWithThread:]
/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation:644 in
/usr/lib/libobjc.A.dylib:112 in
/usr/lib/libc++abi.dylib:16 in
/usr/lib/libc++abi.dylib:144 in __cxa_rethrow
/usr/lib/libobjc.A.dylib:44 in objc_exception_rethrow
/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation:560 in CFRunLoopRunSpecific
/System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices:180 in GSEventRunModal
/System/Library/Frameworks/UIKit.framework/UIKit:684 in
/System/Library/Frameworks/UIKit.framework/UIKit:208 in UIApplicationMain
/var/containers/Bundle/Application/1C73DFF8-4FD1-4943-ABB6-4311C397F590/My.app/My:88 in main
: in 0x1857dc5b8

I have followed the build settings advise from the github page:
Deployment Postprocessing: Off
Strip Debug Symbols During Copy: Off
Strip Linked Product: Off

Why is the project ID hard coded in ABNotifier.h?

We've had a lot of issues setting this library up with RubyMotion, one of which was the fact that the Project ID was hard coded in a header file (hence we had to manually vendor the CocoaPod).

Could you please shed some light on why the Project ID is hard coded? (as apposed to say an argument to startNotifierWithAPIKey)

Thanks ❤️

Use of dispatch_sync on main global queue create deadlock when using other libraries/code

Explained here

http://stackoverflow.com/questions/7816159/dispatch-sync-on-main-queue-hangs-in-unit-test

If you dispatch_sync using the main global queue, someone else could have done the same (apple does) and then you have a deadlock (which I'm getting when using your SDK).

The solution is to use your own private queue, or just dispatch async (which is what i changed in your SDK to fix it). search for dispatch_sync and replace please....

Its a rare bug, but it happens...

INSTALLATION.html should probably include "delegate" section

The bundled INSTALLATION.html file should probably include the "Implementing the Delegate Protocol" section of the README.md file, as not adhering to the ABNotifierDelegate protocol in your AppDelegate.h will cause warnings when setting the delegate to 'self' if you implemented the startNotifierWithAPIKey:environmentName:useSSL:delegate: method as the instructions suggest.

Need to upgrade due to uniqueIdentifier

Hi there, I'm finally getting around to updating an app that uses airbrake and I got an error from Apple due to HTNotifier.m still using uniqueIdentifier. I assume you guys have updated to address this, although I didn't see a specific comment or anything. I was just wondering what the best way to upgrade is because I actually still have all "HTNotifier" files instead of AB. Do I need to remove all the HT files, add the AB ones? Then change all my code to use new methods?

writeTestNotice "no errors found" in 4.0

After updating from 3.1.0 to 4.0 via CocoaPods writeTestNotice fails to successfully report the error. The notice is posted successfully (201) but returns something like the following:

{"id":"1213189365100287349","url":"http://airbrake.io/locate/1213189365100287349"}

The url included just displays "Notice 1213189365100287349 was rejected: no errors found."

Is this a known issue? Should I stick with 3.1.0 for now?

Also, Airbrake is logging the 201 as an unexpected status code:

[Airbrake] Encountered unexpected status code: 201

I'm not sure if this is intentional as it may be unexpected despite being successful.

Lastly, if I may suggest that rather than modifying ABNotifierProjectID in ABNotifier.h the project ID be assignable either as a parameter to one/all of the startNotifierWithAPIKey: methods or via the ABNotifierDelegate. Having to edit the header file is an unnecessary complication when using Airbrake combined with CocoaPods and CI.

Crash report data is not readable.

In ABNotifier JSONString:filePath I'm getting the following error when trying to read crash reports:
Error Domain=NSCocoaErrorDomain Code=261 "The file “273C261A-F1BC-4A44-A553-0A8DB6802385-3502-000001B054F5E517.abnotice” couldn’t be opened using text encoding Unicode (UTF-8)." UserInfo={NSFilePath=/var/mobile/Containers/Data/Application/B0EDB313-C07D-46D7-B386-67EE317A8EE8/Library/AB Notices/273C261A-F1BC-4A44-A553-0A8DB6802385-3502-000001B054F5E517.abnotice, NSStringEncoding=4}

It seems something wrong with the file encoding. I checked where it is saved and UTF8 is used. Has anyone experienced it before?

App is running on iPhone 5c with IOS 9.1

Issues with iIOS notifier (customer feedback)

-Thinks the Automated reference count needs more support and “feels old”

User is on iOS

-He has problems with events being sent when too close in time, the original event is postponed when another event happens quickly, the report for the first event never fires.

-Feels there is little info for unexpected exceptions

-Doesn’t want to see unrelated events; a view filter for production and development error reports

-Would like a month to month overlay; wants error analytics in a time series

-Would like to see a breakdown and comparative analysis by

License

Hi,
can you please say under which license the iOS-notifier is published?

Thanks

ABNotifier.bundle causing incorrect languages to display on iTunes

I am using Airbrake on an app, and the localization files in ABNotifier.bundle are causing my app to display as if it supports a whole bunch of languages it actually doesn't.

XCode won't let me remove the offending languages, due to the fact they are inside of a .bundle.

iOS 8.3 - UIAlert

Under Apple iOS 8.3 the UIAlert you are sending to ask people to submit crash reports are not working anymore, meaning they crash the entire app. Since Apple deprecated the UIAlert in iOS8.3 for all users this is a HUGE bug from your side that will crash all Apps that use your library under iOS8.3

[4.2.1, Swift, Cocoapods] got "Could not build module 'Airbrake_iOS'"

My Podfile looks something like this (removed other Swift pods):

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks! # needed for some other pods that are written in Swift

target 'MyProject' do
pod 'Airbrake-iOS', '~> 4.2.1'
end

Then I followed the readme in order to use it in my Swift project. In my Bridging-Header.h, I add ...
#import <Airbrake_iOS/ABNotifier.h>
Then hit build. The problem is, I always get Could not build module 'Airbrake_iOS'.

I also tried this:
#import "ABNotifier.h"
But it says "ABNotifier.h" file not found.

So I add the source code directly to my project, comment out some code in GCAlertView.h to make it compile (detail at http://stackoverflow.com/a/30138540/467588). And it compiles fine.

There may be some issues with pod setup. Is anyone seeing this?

RubyMotion compatibility

I'm trying to integrate Airbrake in one of our RubyMotion apps but I can't seem to get it working.
I've used cocoapods to add airbrake to my app and everything seems to be registered well. But as soon as I try to send a notice nothing happens. It just returns the ABNotifier class without doing anything. My knowledge of iOS apps (and Objective-C for that matter) is still to limitid to be able to debug this.

I've got it correctly set up in my AppDelegate's application:didFinishLaunchingWithOptions method:

ABNotifier.startNotifierWithAPIKey('key', environmentName: ABNotifierAdHocEnvironment, useSSL: true, delegate: self)
ABNotifier.writeTestNotice

I've also defined the ABNotifierProjectID constant. I've also added the delegate methods to my AppDelegate to see if I would get any feedback but nothing hapens in there too.

I have a feeling that something else should be configure to make it actually catch/report errors but I have no idea where to start looking.

Upraded to 4.1.1 and now getting Enqueued from com.apple.main-thred errors

I upgraded to 4.1.1 to fix the issue with HTTP Status Code 201.

Now I am getting the following error when I click the send button to send an error:

__pthread_kill - Enqueued from com.apple.main-thread (Thread 1).

This is happening in ABNotifier.m in:
void (^postNoticesBlock) (void)

at the line:
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.