Skip to content

Commit 364516a

Browse files
asamiza7medev
authored andcommitted
[MOB-12513] Fix Mockito and Pigeon Dependency Conflict (#377)
* Unrestrict a specific Pigeon version * Unrestrict a specific Mockito version * Upgrade Flutter CI version with Mockito and Pigeon * Remove ask question button in example --------- Co-authored-by: Ahmed Mahmoud <[email protected]>
1 parent f47ae32 commit 364516a

File tree

6 files changed

+12
-19
lines changed

6 files changed

+12
-19
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ commands:
99
setup_flutter:
1010
steps:
1111
- flutter/install_sdk_and_pub:
12-
flutter_version: 3.3.0
12+
flutter_version: 3.10.5
1313
- run:
1414
name: Generate Pigeons
1515
command: sh ./scripts/pigeon.sh

example/lib/main.dart

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,6 @@ class _MyHomePageState extends State<MyHomePage> {
162162
ReportType.feedback, [InvocationOption.emailFieldOptional]);
163163
}
164164

165-
void askQuestion() {
166-
BugReporting.show(
167-
ReportType.question, [InvocationOption.emailFieldOptional]);
168-
}
169-
170165
void showNpsSurvey() {
171166
Surveys.showSurvey('pcV_mE2ttqHxT1iqvBxL0w');
172167
}
@@ -333,10 +328,6 @@ class _MyHomePageState extends State<MyHomePage> {
333328
onPressed: sendFeedback,
334329
text: 'Send Feedback',
335330
),
336-
InstabugButton(
337-
onPressed: askQuestion,
338-
text: 'Ask a Question',
339-
),
340331
InstabugButton(
341332
onPressed: showNpsSurvey,
342333
text: 'Show NPS Survey',

ios/Classes/Modules/BugReportingApi.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ - (void)setEnabledAttachmentTypesScreenshot:(NSNumber *)screenshot extraScreensh
112112

113113
- (void)bindOnInvokeCallbackWithError:(FlutterError *_Nullable *_Nonnull)error {
114114
IBGBugReporting.willInvokeHandler = ^{
115-
[self->_flutterApi onSdkInvokeWithCompletion:^(NSError *_Nullable _){
115+
[self->_flutterApi onSdkInvokeWithCompletion:^(FlutterError *_Nullable _){
116116
}];
117117
};
118118
}
@@ -141,7 +141,7 @@ - (void)bindOnDismissCallbackWithError:(FlutterError *_Nullable *_Nonnull)error
141141

142142
[self->_flutterApi onSdkDismissDismissType:dismissTypeString
143143
reportType:reportTypeString
144-
completion:^(NSError *_Nullable _){
144+
completion:^(FlutterError *_Nullable _){
145145
}];
146146
};
147147
}

ios/Classes/Modules/RepliesApi.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ - (void)hasChatsWithCompletion:(nonnull void (^)(NSNumber * _Nullable, FlutterEr
4343

4444
- (void)bindOnNewReplyCallbackWithError:(FlutterError *_Nullable *_Nonnull)error {
4545
IBGReplies.didReceiveReplyHandler = ^{
46-
[self->_flutterApi onNewReplyWithCompletion:^(NSError *_Nullable _){
46+
[self->_flutterApi onNewReplyWithCompletion:^(FlutterError *_Nullable _){
4747
}];
4848
};
4949
}

ios/Classes/Modules/SurveysApi.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,14 @@ - (void)getAvailableSurveysWithCompletion:(void (^)(NSArray<NSString *> *_Nullab
6565

6666
- (void)bindOnShowSurveyCallbackWithError:(FlutterError *_Nullable *_Nonnull)error {
6767
IBGSurveys.willShowSurveyHandler = ^{
68-
[self->_flutterApi onShowSurveyWithCompletion:^(NSError *_Nullable _){
68+
[self->_flutterApi onShowSurveyWithCompletion:^(FlutterError *_Nullable _){
6969
}];
7070
};
7171
}
7272

7373
- (void)bindOnDismissSurveyCallbackWithError:(FlutterError *_Nullable *_Nonnull)error {
7474
IBGSurveys.didDismissSurveyHandler = ^{
75-
[self->_flutterApi onDismissSurveyWithCompletion:^(NSError *_Nullable _){
75+
[self->_flutterApi onDismissSurveyWithCompletion:^(FlutterError *_Nullable _){
7676
}];
7777
};
7878
}

pubspec.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: instabug_flutter
22
version: 11.13.0
33
description: >-
4-
Instabug empowers mobile teams to monitor, prioritize, and debug
5-
performance and stability issues throughout the app development lifecycle.
4+
Instabug empowers mobile teams to monitor, prioritize, and debug
5+
performance and stability issues throughout the app development lifecycle.
66
homepage: https://www.instabug.com/platforms/flutter
77
repository: https://github.com/Instabug/Instabug-Flutter
88
documentation: https://docs.instabug.com/docs/flutter-overview
@@ -18,9 +18,11 @@ dev_dependencies:
1818
flutter_test:
1919
sdk: flutter
2020
lint: ^1.0.0
21-
mockito: 5.2.0
21+
# mockito v5.2.0 is needed for running Flutter 2 tests on CI
22+
mockito: '>=5.2.0 <=5.4.2'
2223
pana: ^0.21.0
23-
pigeon: ^3.0.0
24+
# pigeon v3.0.0 is needed for running Flutter 2 tests on CI
25+
pigeon: '>=3.0.0 <=10.1.5'
2426

2527
flutter:
2628
plugin:

0 commit comments

Comments
 (0)