{"id":19527634,"url":"https://github.com/bugfender/bugfendersdk-macos","last_synced_at":"2025-02-26T02:26:18.185Z","repository":{"id":73697522,"uuid":"97935472","full_name":"bugfender/BugfenderSDK-macOS","owner":"bugfender","description":"[BETA] Bugfender SDK for macOS, remotely access your application logs","archived":false,"fork":false,"pushed_at":"2019-04-09T14:17:38.000Z","size":844,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-01-08T16:02:42.274Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bugfender.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-21T10:20:07.000Z","updated_at":"2023-04-07T08:18:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"18a9d9e7-fd57-4c08-8bc1-b23c2110908d","html_url":"https://github.com/bugfender/BugfenderSDK-macOS","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugfender%2FBugfenderSDK-macOS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugfender%2FBugfenderSDK-macOS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugfender%2FBugfenderSDK-macOS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugfender%2FBugfenderSDK-macOS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bugfender","download_url":"https://codeload.github.com/bugfender/BugfenderSDK-macOS/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240779323,"owners_count":19856164,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T01:15:50.070Z","updated_at":"2025-02-26T02:26:18.147Z","avatar_url":"https://github.com/bugfender.png","language":"Objective-C","readme":"Bugfender SDK for macOS [![CocoaDocs](https://img.shields.io/badge/docs-%E2%9C%93-blue.svg)](http://cocoadocs.org/docsets/BugfenderSDK/) \n===================\n\nBugfender is a cloud service to collect mobile application logs. Developers can control log sending programmatically and manually for each device. Logs are available at the [Bugfender console](https://app.bugfender.com/). You'll need an account.\n\nBugfenderSDK works for iOS 8.0 and better.\n\n# Installing the SDK\nFirst of all you will need to add the framework to your project.\n\n## Manual\n\nIf you prefer to install the SDK manually:\n\n1. Go to your **Project** \u003e **Your Target** \u003e **General** \u003e **Linked Frameworks and Libraries** and drag `BugfenderSDK.framework` there.\n1. Make sure you have `SystemConfiguration.framework` and `MobileCoreServices.framework` there as well.\n1. [Add -ObjC to your linker flags](https://developer.apple.com/library/mac/qa/qa1490/_index.html).\n1. _(If using Swift)_ Import [Bugfender.swift](https://raw.githubusercontent.com/bugfender/BugfenderSDK-iOS/master/swift/Bugfender.swift) helper file to your project. Add an `import BugfenderSDK` statement at the top.\n\n# Using Bugfender\nOnce you have the framework in your project, here is how to use it.\n\n## Swift\n\nIn your AppDelegate class:\n\n```Swift\nimport BugfenderSDK\n```\n\nAnd add the following to `application(_:didFinishLaunchingWithOptions:)`:\n\n```Swift\nBugfender.activateLogger(\"YOUR_APP_KEY\")\nBugfender.enableUIEventLogging() // optional, log user interactions automatically\nBFLog(\"Hello world!\") // use BFLog as you would use NSLog\n```\n\nThen you may use `BFLog` as you would normally use `NSLog`.\n\nYou may also want to specify a logging level by using the following helper functions:\n\n- `Bugfender.print(...)`: Default log.\n- `Bugfender.warning(...)`: Warning log.\n- `Bugfender.error(...)`: Error log.\n\n## Objective-C\n\nMake Bugfender available project-wide by adding the following line to the `.pch` file:\n\n```objective-c\n#import \u003cBugfenderSDK/BugfenderSDK.h\u003e\n```\n\nGet an API key from the [Bugfender console](https://app.bugfender.com/). In your `AppDelegate` call [activateLogger](http://cocoadocs.org/docsets/BugfenderSDK/0.3.9/Classes/Bugfender.html#//api/name/activateLogger:) when the application starts, like this:\n\n```objective-c\n- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions\n{\n    ...\n    // Activate the remote logger with an App Key.\n    [Bugfender activateLogger:@\"YOUR_APP_KEY\"];\n    [Bugfender enableUIEventLogging]; // optional, log user interactions automatically\n    BFLog(\"Hello world!\") // use BFLog as you would use NSLog\n    ...\n}\n```\n\nThen you may use `BFLog` as you would normally use `NSLog`.\n\nYou may also want to specify a logging level by using the following macros:\n\n- `BFLog(...)`: Default log.\n- `BFLogWarn(...)`: Warning log.\n- `BFLogErr(...)`: Error log.\n\n# Advanced features\nCheck out the full documentation at [CocoaDocs](http://cocoadocs.org/docsets/BugfenderSDK/).\n\n## Sending issues\n\nBugfender allows you to send issues to the server. An issue is similar to a session but they are showed in the `issues` section and you can send issues any time from the app, even if the device is not enabled in the system. Issues are useful to keep track of important errors that you can detect in your code.\n\nFor sending an issue you can use the following function:\n\n```objective-c\n+(void)sendIssueWithTitle:(NSString*)title text:(NSString*)text;\n```\n\n*The `text` parameter has Markdown notation support on the server, so you can add some style to the text being sent.*\n\nHere you have an example on how to send an issue using Markdown for the text:\n\n```objective-c\n[Bugfender sendIssueWithTitle:@\"App Error\" text:@\"We have found an **Error**, we need to check it\"];\n```\n\n## Having your app decide when to send logs\n\nIn some special circumstances you may want to send logs, regardless of the enabled state of the device in the Bugfender console, for example in a custom exception handler. Use `forceSendOnce` to force sending the logs once, and use `setForceEnabled:` to force it for some period of time.\n\n## Device associated data\nYou can associate information to a device as if it were a dictionary:\n\n```objective-c\n[Bugfender setDeviceString:@\"john.smith@example.com\" forKey:@\"user email\"];\n```\n\nYou can find more information in our blog post [Associated device information](https://bugfender.com/blog/associated-device-information/).\n\n## Device  identifier\n\nBugfender automatically generates an identifier for the application install in a device. You can retrieve it to show in your UI or send to your server:\n\n```objective-c\nNSString *bugfenderDeviceIdentifier = [Bugfender deviceIdentifier];\n```\n\nTo help your users find the device identifier, one easy way to do it is adding it to the app's user defaults, so it shows up in the app's section inside the device Settings.\n\n```objective-c\n// Displaying the device identifier in the app's settings.\n[[NSUserDefaults standardUserDefaults] setObject:[Bugfender deviceIdentifier] forKey:@\"bugfenderDeviceIDKey\"];\n[[NSUserDefaults standardUserDefaults] synchronize];\n```\n\n## Log buffer size\n\nBugfender keeps up to 5 MB worth of log data in the device. This way Bugfender can work offline, and you can get some log data from the past when enabling a device. You can change that limit with `setMaximumLocalStorageSize`.\n\n```objective-c\n// Setting maximum cache size to 1 Mb\n[Bugfender setMaximumLocalStorageSize:1024*1024];\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbugfender%2Fbugfendersdk-macos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbugfender%2Fbugfendersdk-macos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbugfender%2Fbugfendersdk-macos/lists"}