Skip to content

Commit ebda076

Browse files
committed
Updating SDK to 1.0.0
1 parent df413a4 commit ebda076

65 files changed

Lines changed: 5616 additions & 535 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,34 @@
44
.idea
55
.packages
66
.pub/
7-
build/
7+
.flutter-plugins-dependencies
8+
.vscode/
9+
.idea/
10+
.gradle/
811
ios/.generated/
912
packages
1013
pubspec.lock
14+
gen
15+
16+
example/android/.gradle/
17+
example/.dart_tool/
18+
example/.idea/
19+
example/.packages
20+
example/.pub/
21+
example/build/
22+
example/.packages
23+
example/pubspec.lock
24+
example/.flutter-plugins-dependencies
25+
example/.flutter-plugins
26+
27+
android/.gradle/
28+
.idea/
29+
.dart_tool/
30+
.packages
31+
.pub/
32+
build/
33+
deploy/
34+
.packages
35+
pubspec.lock
36+
.flutter-plugins-dependencies
37+
.flutter-plugins

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
## [0.0.1] - TODO: Add release date.
1+
## [1.0.0]
22

3-
* TODO: Describe initial release.
3+
* Initial public release

README.md

Lines changed: 25 additions & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -8,87 +8,45 @@ Sign up for a service at https://www.bugsee.com.
88

99
Install Bugsee plugin into your dart project by adding it to dependecies in your pubspec.yaml
1010

11-
```
11+
```yaml
1212
dependencies:
13-
bugsee: any
13+
bugsee:
14+
git:
15+
url: [email protected]:bugsee/flutter-bugsee.git
16+
# ref: 1.2.3 # if forcing a specific version by tag or branch
1417
```
1518

16-
Import Bugsee in every file you plan to call Bugsee API from:
19+
## Launching
1720

1821
```dart
1922
import 'package:bugsee/bugsee.dart';
20-
```
21-
22-
## Launching
23-
24-
Bugsee SDK has to be launched within the native part of your application
25-
26-
### iOS
27-
28-
Locate your ios/Runner/AppDelegate.m and add the following:
29-
30-
```objectivec
31-
#import "Bugsee/Bugsee.h"
32-
33-
/// ...
3423
35-
@implementation AppDelegate
24+
Future<Null> launchBugsee(Function(bool isBugseeLaunched) appRunner) async {
25+
var launchOptions;
26+
var bugseeToken = "";
3627
37-
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
38-
[GeneratedPluginRegistrant registerWithRegistry:self];
28+
if (Platform.isAndroid) {
29+
bugseeToken = "<android app token>";
30+
launchOptions = new AndroidLaunchOptions();
31+
} else if (Platform.isIOS) {
32+
bugseeToken = "<ios app token>";
33+
launchOptions = new IOSLaunchOptions();
34+
}
3935
40-
[Bugsee launchWithToken:@"<YOUR APP TOKEN>"];
41-
42-
// Override point for customization after application launch.
43-
return [super application:application didFinishLaunchingWithOptions:launchOptions];
36+
await Bugsee.launch(bugseeToken,
37+
appRunCallback: appRunner, launchOptions: launchOptions);
4438
}
45-
```
46-
47-
Refer to official native iOS [documentation](https://docs.bugsee.com/sdk/ios/installation) for additional launch options.
48-
49-
### Android
50-
51-
Add native Bugsee SDK to your build.gradle:
52-
53-
```groovy
54-
dependencies {
55-
implementation 'com.bugsee:bugsee-android:+'
56-
}
57-
58-
```
59-
60-
If you don't have it already, create your own class for main application and make sure you extend FlutterApplication when doing so.
61-
Launch the Bigsee SDK from there:
6239
63-
```java
64-
import com.bugsee.library.Bugsee;
65-
import java.util.HashMap;
66-
import io.flutter.app.FlutterApplication;
67-
68-
public class MainApplication extends FlutterApplication {
69-
@Override
70-
public void onCreate() {
71-
super.onCreate();
72-
HashMap<String, Object> options = new HashMap<>();
73-
74-
// Regular doesn't capture anything in Flutter for now
75-
options.put(Bugsee.Option.ExtendedVideoMode, true);
76-
Bugsee.launch(this, "<YOUR APP TOKEN>", options);
77-
}
40+
Future<Null> main() async {
41+
await launchBugsee((bool isBugseeLaunched) async {
42+
runApp(new MyApp());
43+
});
7844
}
7945
46+
class MyApp extends StatelessWidget {
47+
....
8048
```
8149

82-
Modify the manifest to point to this Application:
83-
84-
```xml
85-
<application
86-
android:name="com.acme.app.MainApplication"
87-
...
88-
```
89-
90-
Refer to official native Android [documentation](https://docs.bugsee.com/sdk/android/installation) for additional launch options.
91-
9250
## Custom data
9351

9452
### Events
@@ -126,52 +84,5 @@ try {
12684
}
12785
```
12886

129-
## Auto exception handling
130-
131-
Create the following method in your code:
132-
133-
```dart
134-
Future<Null> _reportError(dynamic error, dynamic stackTrace) async {
135-
print('Caught error: $error');
136-
137-
await Bugsee.logException(
138-
exception: error,
139-
handled: false,
140-
stackTrace: stackTrace,
141-
);
142-
}
143-
```
144-
145-
Hook the method to execute on Flutter errors:
146-
147-
```dart
148-
// This captures errors reported by the Flutter framework.
149-
FlutterError.onError = (FlutterErrorDetails details) async {
150-
// In production mode report to the application zone to report to Bugsee.
151-
Zone.current.handleUncaughtError(details.exception, details.stack);
152-
};
153-
```
154-
155-
Wrap your application to run in a Zone, which will catch most of the unhandled
156-
errors automatically:
157-
158-
```dart
159-
// This creates a [Zone] that contains the Flutter application and stablishes
160-
// an error handler that captures errors and reports them.
161-
//
162-
// Using a zone makes sure that as many errors as possible are captured,
163-
// including those thrown from [Timer]s, microtasks, I/O, and those forwarded
164-
// from the `FlutterError` handler.
165-
//
166-
// More about zones:
167-
//
168-
// - https://api.dartlang.org/stable/1.24.2/dart-async/Zone-class.html
169-
// - https://www.dartlang.org/articles/libraries/zones
170-
runZoned<Future<Null>>(() async {
171-
runApp(new CrashyApp());
172-
}, onError: (error, stackTrace) async {
173-
await _reportError(error, stackTrace);
174-
});
175-
```
17687

177-
Bugsee can be further customized. For a complete SDK documentation covering additional options and API's visit [https://docs.bugsee.com/sdk/flutter](https://docs.bugsee.com/sdk/flutter)
88+
Bugsee can be further customized. For a complete SDK documentation covering additional options and API's visit [https://docs.bugsee.com/sdk/flutter](https://docs.bugsee.com/sdk/flutter)

android/.classpath

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11/"/>
4+
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
5+
<classpathentry kind="output" path="bin/default"/>
6+
</classpath>

android/.project

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>bugsee</name>
4+
<comment>Project android_ created by Buildship.</comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
</buildSpec>
19+
<natures>
20+
<nature>org.eclipse.jdt.core.javanature</nature>
21+
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
22+
</natures>
23+
<filteredResources>
24+
<filter>
25+
<id>0</id>
26+
<name></name>
27+
<type>30</type>
28+
<matcher>
29+
<id>org.eclipse.core.resources.regexFilterMatcher</id>
30+
<arguments>node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
31+
</matcher>
32+
</filter>
33+
</filteredResources>
34+
</projectDescription>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
arguments=
2+
auto.sync=false
3+
build.scans.enabled=false
4+
connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
5+
connection.project.dir=
6+
eclipse.preferences.version=1
7+
gradle.user.home=
8+
java.home=/usr/lib/jvm/java-11-openjdk-amd64
9+
jvm.arguments=
10+
offline.mode=false
11+
override.workspace.settings=true
12+
show.console.view=true
13+
show.executions.view=true
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package io.flutter.plugins;
2+
3+
import io.flutter.plugin.common.PluginRegistry;
4+
import com.bugsee.BugseePlugin;
5+
import io.flutter.plugins.packageinfo.PackageInfoPlugin;
6+
7+
/**
8+
* Generated file. Do not edit.
9+
*/
10+
public final class GeneratedPluginRegistrant {
11+
public static void registerWith(PluginRegistry registry) {
12+
if (alreadyRegisteredWith(registry)) {
13+
return;
14+
}
15+
BugseePlugin.registerWith(registry.registrarFor("com.bugsee.BugseePlugin"));
16+
PackageInfoPlugin.registerWith(registry.registrarFor("io.flutter.plugins.packageinfo.PackageInfoPlugin"));
17+
}
18+
19+
private static boolean alreadyRegisteredWith(PluginRegistry registry) {
20+
final String key = GeneratedPluginRegistrant.class.getCanonicalName();
21+
if (registry.hasPlugin(key)) {
22+
return true;
23+
}
24+
registry.registrarFor(key);
25+
return false;
26+
}
27+
}

android/build.gradle

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// package plugin.android
2+
13
group 'com.bugsee.bugsee'
24
version '1.0-SNAPSHOT'
35

@@ -17,12 +19,18 @@ rootProject.allprojects {
1719
google()
1820
jcenter()
1921
}
22+
23+
// gradle.projectsEvaluated {
24+
// tasks.withType(JavaCompile) {
25+
// options.compilerArgs << "-Xlint:deprecation"
26+
// }
27+
// }
2028
}
2129

2230
apply plugin: 'com.android.library'
2331

2432
android {
25-
compileSdkVersion 27
33+
compileSdkVersion 30
2634

2735
defaultConfig {
2836
minSdkVersion 16
@@ -33,6 +41,6 @@ android {
3341
}
3442

3543
dependencies {
36-
implementation 'com.bugsee:bugsee-android:1.11.9'
44+
implementation 'com.bugsee:bugsee-android:1.19.16'
3745
}
3846
}

android/gradle.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
org.gradle.jvmargs=-Xmx1536M
2+
android.useAndroidX=true
3+
// android.enableR8=true
4+
android.enableJetifier=true
52.4 KB
Binary file not shown.

0 commit comments

Comments
 (0)