Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ jobs:
background: true
- run:
name: download flutter SDK
command: if ! test -f "~/flutter_sdk.zip"; then curl -o ~/flutter_sdk.zip https://storage.googleapis.com/flutter_infra/releases/stable/macos/flutter_macos_1.20.4-stable.zip; fi
command: if ! test -f "~/flutter_sdk.zip"; then curl -o ~/flutter_sdk.zip https://storage.googleapis.com/flutter_infra_release/releases/stable/macos/flutter_macos_2.2.3-stable.zip; fi
- run:
name: unzip flutter SDK
command: unzip ~/flutter_sdk.zip -d ~
- run: flutter doctor
- run:
name: Flutter build
command: cd ..; flutter build aot
command: cd ..; flutter build apk
- run:
name: Download Android Dependencies
command: ./gradlew androidDependencies
Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:
command: sudo gem install cocoapods
- run:
name: download flutter SDK
command: if ! test -f "~/flutter_sdk.zip"; then curl -o ~/flutter_sdk.zip https://storage.googleapis.com/flutter_infra/releases/stable/macos/flutter_macos_1.20.4-stable.zip; fi
command: if ! test -f "~/flutter_sdk.zip"; then curl -o ~/flutter_sdk.zip https://storage.googleapis.com/flutter_infra_release/releases/stable/macos/flutter_macos_2.2.3-stable.zip; fi
- run:
name: unzip flutter SDK
command: unzip ~/flutter_sdk.zip -d ~
Expand All @@ -98,9 +98,6 @@ jobs:
- run:
name: Install Pods
command: cd ios && pod install --repo-update
- run:
name: Flutter build
command: flutter build aot
- run:
name: Build and run tests
command: cd ios && xcodebuild -allowProvisioningUpdates -workspace Runner.xcworkspace -scheme Runner -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 12 Pro Max,OS=14.3' test | xcpretty
Expand Down
2 changes: 1 addition & 1 deletion Dangerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ if github.pr_body.length < 3 && git.lines_of_code > 10
end

if !git.modified_files.include?("CHANGELOG.md") && !declared_trivial
fail("Please include a CHANGELOG entry. \nYou can find it at [CHANGELOG.md](https://github.com/Instabug/Instabug-Flutter/blob/master/CHANGELOG.md).", sticky: false)
warn("Please include a CHANGELOG entry. \nYou can find it at [CHANGELOG.md](https://github.com/Instabug/Instabug-Flutter/blob/master/CHANGELOG.md).", sticky: false)
end
4 changes: 2 additions & 2 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/instabug_flutter/ios"

SPEC CHECKSUMS:
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
Flutter: 434fef37c0980e73bb6479ef766c45957d4b510c
Instabug: 28838c071edc50e4f13800e6877645d3b328aab9
instabug_flutter: 65794e9f82acebde599e56cc6a2e74a17b69410e
OCMock: 5ea90566be239f179ba766fd9fbae5885040b992

PODFILE CHECKSUM: 082ec096394aa5e2e9254f7b7845847607911bda

COCOAPODS: 1.9.1
COCOAPODS: 1.10.1
21 changes: 12 additions & 9 deletions example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = 56S6Q9SA8U;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -621,7 +622,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = com.example.InstabugSample;
PRODUCT_BUNDLE_IDENTIFIER = com.instabug.InstabugSample;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
Expand Down Expand Up @@ -743,6 +744,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = 56S6Q9SA8U;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -757,7 +759,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = com.example.InstabugSample;
PRODUCT_BUNDLE_IDENTIFIER = com.instabug.InstabugSample;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
Expand All @@ -773,6 +775,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = 56S6Q9SA8U;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -787,7 +790,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = com.example.InstabugSample;
PRODUCT_BUNDLE_IDENTIFIER = com.instabug.InstabugSample;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
Expand All @@ -808,7 +811,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = C3ZD2T892Z;
DEVELOPMENT_TEAM = 56S6Q9SA8U;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = InstabugSampleTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.3;
Expand Down Expand Up @@ -839,7 +842,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = C3ZD2T892Z;
DEVELOPMENT_TEAM = 56S6Q9SA8U;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = InstabugSampleTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.3;
Expand Down Expand Up @@ -869,7 +872,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = C3ZD2T892Z;
DEVELOPMENT_TEAM = 56S6Q9SA8U;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = InstabugSampleTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.3;
Expand Down Expand Up @@ -898,7 +901,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = C3ZD2T892Z;
DEVELOPMENT_TEAM = 56S6Q9SA8U;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = InstabugSampleUITests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.3;
Expand Down Expand Up @@ -928,7 +931,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = C3ZD2T892Z;
DEVELOPMENT_TEAM = 56S6Q9SA8U;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = InstabugSampleUITests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.3;
Expand Down Expand Up @@ -957,7 +960,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = C3ZD2T892Z;
DEVELOPMENT_TEAM = 56S6Q9SA8U;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = InstabugSampleUITests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.3;
Expand Down
4 changes: 2 additions & 2 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import 'package:instabug_flutter/Surveys.dart';

void main() {
FlutterError.onError = (FlutterErrorDetails details) {
Zone.current.handleUncaughtError(details.exception, details.stack);
Zone.current.handleUncaughtError(details.exception, details.stack!);
};

runZonedGuarded(() => runApp(MyApp()), CrashReporting.reportCrash);
Expand Down Expand Up @@ -46,7 +46,7 @@ class MyApp extends StatelessWidget {
}

class MyHomePage extends StatefulWidget {
const MyHomePage({Key key, this.title}) : super(key: key);
const MyHomePage({Key? key, required this.title}) : super(key: key);

// This widget is the home page of your application. It is stateful, meaning
// that it has a State object (defined below) that contains fields that affect
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1

environment:
sdk: ">=2.7.0 <3.0.0"
sdk: ">=2.12.0 <3.0.0"

dependencies:
flutter:
Expand Down
2 changes: 0 additions & 2 deletions ios/Classes/InstabugFlutterPlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
[inv getReturnValue:&returnVal];
NSObject *resultSet = (__bridge NSObject *)returnVal;
result(resultSet);
} else {
result(nil);
}
}
if (!isImplemented) {
Expand Down
4 changes: 2 additions & 2 deletions lib/BugReporting.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ class BugReporting {
static Function? _onDismissCallback;
static const MethodChannel _channel = MethodChannel('instabug_flutter');

static Future<String> get platformVersion async =>
(await _channel.invokeMethod<String>('getPlatformVersion'))!;
static Future<String?> get platformVersion async =>
await _channel.invokeMethod<String>('getPlatformVersion');

static Future<dynamic> _handleMethod(MethodCall call) async {
switch (call.method) {
Expand Down
4 changes: 2 additions & 2 deletions lib/Chats.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import 'package:flutter/services.dart';
class Chats {
static const MethodChannel _channel = MethodChannel('instabug_flutter');

static Future<String> get platformVersion async =>
(await _channel.invokeMethod<String>('getPlatformVersion'))!;
static Future<String?> get platformVersion async =>
await _channel.invokeMethod<String>('getPlatformVersion');

@deprecated

Expand Down
12 changes: 4 additions & 8 deletions lib/CrashReporting.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import 'package:stack_trace/stack_trace.dart';
class CrashReporting {
static const MethodChannel _channel = MethodChannel('instabug_flutter');
static bool enabled = true;
static Future<String> get platformVersion async =>
(await _channel.invokeMethod<String>('getPlatformVersion'))!;
static Future<String?> get platformVersion async =>
await _channel.invokeMethod<String>('getPlatformVersion');

///Enables and disables Enables and disables automatic crash reporting.
/// [boolean] isEnabled
Expand All @@ -38,11 +38,7 @@ class CrashReporting {
/// [StackTrace] stack
static Future<void> reportHandledCrash(dynamic exception,
[StackTrace? stack]) async {
if (stack != null) {
_sendCrash(exception, stack, true);
} else {
_sendCrash(exception, StackTrace.current, true);
}
_sendCrash(exception, stack ?? StackTrace.current, true);
}

static Future<void> _reportUnhandledCrash(
Expand All @@ -59,7 +55,7 @@ class CrashReporting {
trace.frames[i].uri.toString(),
trace.frames[i].member,
trace.frames[i].line,
trace.frames[i].column == null ? 0 : trace.frames[i].column!));
trace.frames[i].column ?? 0));
}
final CrashData crashData = CrashData(
exception.toString(), Platform.operatingSystem.toString(), frames);
Expand Down
4 changes: 2 additions & 2 deletions lib/FeatureRequests.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ enum ActionType { requestNewFeature, addCommentToFeature }
class FeatureRequests {
static const MethodChannel _channel = MethodChannel('instabug_flutter');

static Future<String> get platformVersion async =>
(await _channel.invokeMethod<String>('getPlatformVersion'))!;
static Future<String?> get platformVersion async =>
await _channel.invokeMethod<String>('getPlatformVersion');

///Shows the UI for feature requests list
static Future<void> show() async {
Expand Down
4 changes: 2 additions & 2 deletions lib/Instabug.dart
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ enum ReproStepsMode { enabled, disabled, enabledWithNoScreenshots }
class Instabug {
static const MethodChannel _channel = MethodChannel('instabug_flutter');

static Future<String> get platformVersion async =>
(await _channel.invokeMethod<String>('getPlatformVersion'))!;
static Future<String?> get platformVersion async =>
await _channel.invokeMethod<String>('getPlatformVersion');

/// Starts the SDK.
/// This is the main SDK method that does all the magic. This is the only
Expand Down
4 changes: 2 additions & 2 deletions lib/InstabugLog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import 'package:flutter/services.dart';
class InstabugLog {
static const MethodChannel _channel = MethodChannel('instabug_flutter');

static Future<String> get platformVersion async =>
(await _channel.invokeMethod<String>('getPlatformVersion'))!;
static Future<String?> get platformVersion async =>
await _channel.invokeMethod<String>('getPlatformVersion');

/// Appends a log [message] to Instabug internal log
/// These logs are then sent along the next uploaded report.
Expand Down
4 changes: 2 additions & 2 deletions lib/NetworkLogger.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import 'package:instabug_flutter/models/network_data.dart';
class NetworkLogger {
static const MethodChannel _channel = MethodChannel('instabug_flutter');

static Future<String> get platformVersion async =>
(await _channel.invokeMethod<String>('getPlatformVersion'))!;
static Future<String?> get platformVersion async =>
await _channel.invokeMethod<String>('getPlatformVersion');

static Future<bool?> networkLog(NetworkData data) async {
final params = <dynamic>[data.toMap()];
Expand Down
4 changes: 2 additions & 2 deletions lib/Replies.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ class Replies {
static Function? _unreadRepliesCountCallback;
static const MethodChannel _channel = MethodChannel('instabug_flutter');

static Future<String> get platformVersion async =>
(await _channel.invokeMethod<String>('getPlatformVersion'))!;
static Future<String?> get platformVersion async =>
await _channel.invokeMethod<String>('getPlatformVersion');

static Future<dynamic> _handleMethod(MethodCall call) async {
switch (call.method) {
Expand Down
4 changes: 2 additions & 2 deletions lib/Surveys.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ class Surveys {
static Function? _hasRespondedToSurveyCallback;
static const MethodChannel _channel = MethodChannel('instabug_flutter');

static Future<String> get platformVersion async =>
(await _channel.invokeMethod<String>('getPlatformVersion'))!;
static Future<String?> get platformVersion async =>
await _channel.invokeMethod<String>('getPlatformVersion');

static Future<dynamic> _handleMethod(MethodCall call) async {
switch (call.method) {
Expand Down
14 changes: 5 additions & 9 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
name: instabug_flutter
version: 10.0.0
version: 9.2.0-nullsafety.0
description: >-
Instabug is an in-app feedback and bug reporting tool for mobile apps.
With just a simple shake, your users or beta testers can report bugs or
send in-app feedback and the SDK will capture an environment snapshot of
your user's device including all console logs, server-side network requests
and bug reproduction steps compiling all these details in one organised dashboard
to help you debug and fix bugs faster.
Deliver the best user experience through a comprehensive platform that will
help you uncover, analyze and fix any app performance, quality or stability issues.
homepage: https://github.com/Instabug/Instabug-Flutter#readme
documentation: https://github.com/Instabug/Instabug-Flutter#readme

Expand All @@ -19,7 +15,7 @@ dev_dependencies:
build_runner: ^2.0.3
flutter_test:
sdk: flutter
mockito: ^5.0.7
mockito: ^5.0.10

flutter:
plugin:
Expand All @@ -32,4 +28,4 @@ flutter:

environment:
sdk: ">=2.12.0 <3.0.0"
flutter: ">=2.0.0 <3.0.0"
flutter: ">=1.17.0 <3.0.0"
Loading