Welcome to the Bugfender documentation! Here you will find everything you need to know about integrating and using Bugfender in your iOS, Android, or Unity projects. Bugfender is a remote logger that helps you track and debug your applications in real-time.
Installation
To get started with Bugfender, follow the instructions below to install the Bugfender SDK for your platform:
iOS
- Install Bugfender via Cocoapods by adding the following line to your Podfile:
pod 'BugfenderSDK'
- Run
pod install
to install Bugfender SDK. - Import the Bugfender framework into your AppDelegate file:
#import <BugfenderSDK/BugfenderSDK.h>
- Initialize Bugfender by adding the following line of code in your
application:didFinishLaunchingWithOptions:
method:
[Bugfender activateLogger:@"YOUR_APP_KEY"];
- Build and run your project.
Android
- Add the Bugfender Gradle dependency to your app’s build.gradle file:
implementation 'com.bugfender.sdk:android-base:3.1.0'
- Call the Bugfender initialization in your Application class’s
onCreate
method:
Bugfender.init(context, "YOUR_APP_KEY", enableUIEventLogging);
- Build and run your project.
Unity
- Download the latest Bugfender Unity package from the official Bugfender website and import it into your Unity project.
- Get your Bugfender App Key from the Bugfender dashboard.
- Add the Bugfender behavior to your objects by attaching the
BugfenderBehaviour
script. - Enter your Bugfender App Key into the
BugfenderBehaviour
component’s field within the Inspector. - Build and run your project.
Usage
Basic Logging
Bugfender allows you to log messages from your application code, making it easier to analyze and troubleshoot issues. To log a message, use the following syntax in your code:
Bugfender.log("Your log message");
Sending Issues to Bugfender
Bugfender can track and collect issues by sending them directly to the Bugfender dashboard. Use the following code to send issues:
Bugfender.sendIssueWithTitle("Issue Title", "Issue Description");
Advanced Configuration
Customize User Identifier
To track user-specific logs, you can customize the user identifier by adding the following line of code:
Bugfender.setDeviceString("user", "your_user_id");
Enable/Disable Bugfender
If you want to enable or disable Bugfender dynamically, you can use the following methods:
To enable Bugfender logging:
[Bugfender enableUIEventLogging];
To disable Bugfender logging:
[Bugfender disableUIEventLogging];
Troubleshooting
Common Issues
If you are experiencing any issues with Bugfender integration or logging, please review the following common problems and solutions:
- Problem: No logs are appearing on the Bugfender dashboard.
Solution: Verify that you have correctly initialized Bugfender and that you are logging messages using the appropriate syntax. - Problem: The Bugfender SDK is not capturing specific logs.
Solution: Double-check your code to ensure that the necessary logging calls are in place.
Conclusion
Congratulations! You have successfully integrated Bugfender into your project. With Bugfender’s powerful logging capabilities, you can now track and debug your applications in real-time. If you have any further questions or need additional support, please feel free to reach out to our team.