diff --git a/CHANGELOG.md b/CHANGELOG.md index 49278fba8..f14747606 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,16 @@ # Changelog -## [Unreleased](https://github.com/Instabug/Instabug-Flutter/compare/v13.3.0...dev) +## [13.4.0](https://github.com/Instabug/Instabug-Flutter/compare/v13.3.0...v13.4.0) (September 15, 2024) ### Added - Add support for masking screen names captured by Instabug through the `Instabug.setScreenNameMaskingCallback` API ([#500](https://github.com/Instabug/Instabug-Flutter/pull/500)). +### Changed + +- Bump Instabug Android SDK to v13.4.0 ([#506](https://github.com/Instabug/Instabug-Flutter/pull/506)). [See release notes](https://github.com/Instabug/Instabug-Android/releases/tag/v13.4.0). +- Bump Instabug iOS SDK to v13.4.0 ([#506](https://github.com/Instabug/Instabug-Flutter/pull/506)). [See release notes](https://github.com/Instabug/Instabug-iOS/releases/tag/13.4.0). + ### Fixed - Fixed an issue with empty screen names captured in `InstabugNavigatorObserver` and fallback to `N/A` when the screen name is empty ([#505](https://github.com/Instabug/Instabug-Flutter/pull/505)), closes [#504](https://github.com/Instabug/Instabug-Flutter/issues/504). diff --git a/android/build.gradle b/android/build.gradle index f16d516e5..cc2b1d037 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,5 +1,5 @@ group 'com.instabug.flutter' -version '13.3.0' +version '13.4.0' buildscript { repositories { @@ -41,7 +41,7 @@ android { } dependencies { - api 'com.instabug.library:instabug:13.3.0' + api 'com.instabug.library:instabug:13.4.0' testImplementation 'junit:junit:4.13.2' testImplementation "org.mockito:mockito-inline:3.12.1" diff --git a/example/ios/InstabugTests/InstabugApiTests.m b/example/ios/InstabugTests/InstabugApiTests.m index 886e22ece..3e83aec1c 100644 --- a/example/ios/InstabugTests/InstabugApiTests.m +++ b/example/ios/InstabugTests/InstabugApiTests.m @@ -4,7 +4,7 @@ #import "InstabugApi.h" #import "Instabug/Instabug.h" #import "Util/Instabug+Test.h" -#import "Util/IBGNetworkLogger+Test.h" +#import "IBGNetworkLogger+CP.h" #import "Flutter/Flutter.h" @interface InstabugTests : XCTestCase @@ -435,7 +435,11 @@ - (void)testNetworkLog { duration:duration.integerValue gqlQueryName:nil serverErrorMessage:nil - ]); + isW3cCaughted:nil + partialID:nil + timestamp:nil + generatedW3CTraceparent:nil + caughtedW3CTraceparent:nil]); } - (void)testWillRedirectToAppStore { diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 17a3f845c..8f27d4856 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -1,9 +1,9 @@ PODS: - Flutter (1.0.0) - - Instabug (13.3.0) - - instabug_flutter (13.3.0): + - Instabug (13.4.0) + - instabug_flutter (13.4.0): - Flutter - - Instabug (= 13.3.0) + - Instabug (= 13.4.0) - OCMock (3.6) DEPENDENCIES: @@ -24,8 +24,8 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 - Instabug: 4f26295103a330ec0236918359eef7ccaa74e2fa - instabug_flutter: 6be22be13b3dda72b293151d2c009952bb20b940 + Instabug: 183aa1e038d01ddc000f06835f46a9ea1f6c992b + instabug_flutter: 2cae2dc6f1d9e2442154886b3740a47f3429d239 OCMock: 5ea90566be239f179ba766fd9fbae5885040b992 PODFILE CHECKSUM: 8f7552fd115ace1988c3db54a69e4a123c448f84 diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj index f40f40e79..858ba01e5 100644 --- a/example/ios/Runner.xcodeproj/project.pbxproj +++ b/example/ios/Runner.xcodeproj/project.pbxproj @@ -87,7 +87,6 @@ CC359DB82937720C0067A924 /* ApmApiTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ApmApiTests.m; sourceTree = ""; }; CC3D69E6293F47FC000DCE54 /* ArgsRegistryTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ArgsRegistryTests.m; sourceTree = ""; }; CC78720E293CA8EE008CB2A5 /* Instabug+Test.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Instabug+Test.h"; sourceTree = ""; }; - CC787211293CAB28008CB2A5 /* IBGNetworkLogger+Test.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "IBGNetworkLogger+Test.h"; sourceTree = ""; }; CC9925D1293DEB0B001FD3EE /* CrashReportingApiTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CrashReportingApiTests.m; sourceTree = ""; }; CC9925D4293DF534001FD3EE /* FeatureRequestsApiTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FeatureRequestsApiTests.m; sourceTree = ""; }; CC9925D6293DFB03001FD3EE /* InstabugLogApiTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = InstabugLogApiTests.m; sourceTree = ""; }; @@ -216,7 +215,6 @@ children = ( BE26C80C2BD55575009FECCF /* IBGCrashReporting+CP.h */, CC78720E293CA8EE008CB2A5 /* Instabug+Test.h */, - CC787211293CAB28008CB2A5 /* IBGNetworkLogger+Test.h */, CC198C62293E2392007077C8 /* IBGSurvey+Test.h */, ); path = Util; diff --git a/example/lib/main.dart b/example/lib/main.dart index 7749ed02d..cda7ff3ec 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -2,10 +2,10 @@ import 'dart:async'; import 'dart:developer'; import 'dart:io'; import 'dart:convert'; -import 'package:http/http.dart' as http; import 'package:flutter/material.dart'; import 'package:instabug_flutter/instabug_flutter.dart'; +import 'package:instabug_http_client/instabug_http_client.dart'; import 'package:instabug_flutter_example/src/app_routes.dart'; import 'package:instabug_flutter_example/src/widget/nested_view.dart'; diff --git a/example/lib/src/components/network_content.dart b/example/lib/src/components/network_content.dart index c364ff89d..f55af5c95 100644 --- a/example/lib/src/components/network_content.dart +++ b/example/lib/src/components/network_content.dart @@ -10,6 +10,8 @@ class NetworkContent extends StatefulWidget { } class _NetworkContentState extends State { + final http = InstabugHttpClient(); + final endpointUrlController = TextEditingController(); @override diff --git a/example/pubspec.lock b/example/pubspec.lock index 5b56a50f9..31cb6f5dd 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -115,7 +115,15 @@ packages: path: ".." relative: true source: path - version: "13.3.0" + version: "13.4.0" + instabug_http_client: + dependency: "direct main" + description: + name: instabug_http_client + sha256: "7d52803c0dd639f6dddbe07333418eb251ae02f3f9f4d30402517533ca692784" + url: "https://pub.dev" + source: hosted + version: "2.4.0" leak_tracker: dependency: transitive description: diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 69fed929d..7f3e9e622 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -26,6 +26,7 @@ dependencies: http: ^0.13.0 instabug_flutter: path: ../ + instabug_http_client: ^2.4.0 dev_dependencies: espresso: 0.2.0+5 @@ -35,6 +36,10 @@ dev_dependencies: sdk: flutter flutter_lints: 1.0.4 +dependency_overrides: + instabug_flutter: + path: ../ + # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec diff --git a/ios/Classes/Modules/InstabugApi.m b/ios/Classes/Modules/InstabugApi.m index 44f356685..11ea09354 100644 --- a/ios/Classes/Modules/InstabugApi.m +++ b/ios/Classes/Modules/InstabugApi.m @@ -263,10 +263,10 @@ - (void)networkLogData:(NSDictionary *)data error:(FlutterError NSString *method = data[@"method"]; NSString *requestBody = data[@"requestBody"]; NSString *responseBody = data[@"responseBody"]; - int32_t responseCode = [data[@"responseCode"] integerValue]; + int32_t responseCode = (int32_t) [data[@"responseCode"] integerValue]; int64_t requestBodySize = [data[@"requestBodySize"] integerValue]; int64_t responseBodySize = [data[@"responseBodySize"] integerValue]; - int32_t errorCode = [data[@"errorCode"] integerValue]; + int32_t errorCode = (int32_t) [data[@"errorCode"] integerValue]; NSString *errorDomain = data[@"errorDomain"]; NSDictionary *requestHeaders = data[@"requestHeaders"]; if ([requestHeaders count] == 0) { @@ -286,32 +286,27 @@ - (void)networkLogData:(NSDictionary *)data error:(FlutterError serverErrorMessage = data[@"serverErrorMessage"]; } - SEL networkLogSEL = NSSelectorFromString(@"addNetworkLogWithUrl:method:requestBody:requestBodySize:responseBody:responseBodySize:responseCode:requestHeaders:responseHeaders:contentType:errorDomain:errorCode:startTime:duration:gqlQueryName:serverErrorMessage:"); - - if ([[IBGNetworkLogger class] respondsToSelector:networkLogSEL]) { - NSInvocation *inv = [NSInvocation invocationWithMethodSignature:[[IBGNetworkLogger class] methodSignatureForSelector:networkLogSEL]]; - [inv setSelector:networkLogSEL]; - [inv setTarget:[IBGNetworkLogger class]]; - - [inv setArgument:&(url) atIndex:2]; - [inv setArgument:&(method) atIndex:3]; - [inv setArgument:&(requestBody) atIndex:4]; - [inv setArgument:&(requestBodySize) atIndex:5]; - [inv setArgument:&(responseBody) atIndex:6]; - [inv setArgument:&(responseBodySize) atIndex:7]; - [inv setArgument:&(responseCode) atIndex:8]; - [inv setArgument:&(requestHeaders) atIndex:9]; - [inv setArgument:&(responseHeaders) atIndex:10]; - [inv setArgument:&(contentType) atIndex:11]; - [inv setArgument:&(errorDomain) atIndex:12]; - [inv setArgument:&(errorCode) atIndex:13]; - [inv setArgument:&(startTime) atIndex:14]; - [inv setArgument:&(duration) atIndex:15]; - [inv setArgument:&(gqlQueryName) atIndex:16]; - [inv setArgument:&(serverErrorMessage) atIndex:17]; - - [inv invoke]; - } + [IBGNetworkLogger addNetworkLogWithUrl:url + method:method + requestBody:requestBody + requestBodySize:requestBodySize + responseBody:responseBody + responseBodySize:responseBodySize + responseCode:responseCode + requestHeaders:requestHeaders + responseHeaders:responseHeaders + contentType:contentType + errorDomain:errorDomain + errorCode:errorCode + startTime:startTime + duration:duration + gqlQueryName:gqlQueryName + serverErrorMessage:serverErrorMessage + isW3cCaughted:nil + partialID:nil + timestamp:nil + generatedW3CTraceparent:nil + caughtedW3CTraceparent:nil]; } - (void)willRedirectToStoreWithError:(FlutterError * _Nullable __autoreleasing *)error { diff --git a/ios/Classes/Util/IBGNetworkLogger+CP.h b/ios/Classes/Util/IBGNetworkLogger+CP.h index ae5d32d66..764524fb2 100644 --- a/ios/Classes/Util/IBGNetworkLogger+CP.h +++ b/ios/Classes/Util/IBGNetworkLogger+CP.h @@ -6,6 +6,28 @@ NS_ASSUME_NONNULL_BEGIN + (void)disableAutomaticCapturingOfNetworkLogs; ++ (void)addNetworkLogWithUrl:(NSString *_Nonnull)url + method:(NSString *_Nonnull)method + requestBody:(NSString *_Nonnull)request + requestBodySize:(int64_t)requestBodySize + responseBody:(NSString *_Nonnull)response + responseBodySize:(int64_t)responseBodySize + responseCode:(int32_t)code + requestHeaders:(NSDictionary *_Nonnull)requestHeaders + responseHeaders:(NSDictionary *_Nonnull)responseHeaders + contentType:(NSString *_Nonnull)contentType + errorDomain:(NSString *_Nullable)errorDomain + errorCode:(int32_t)errorCode + startTime:(int64_t)startTime + duration:(int64_t) duration + gqlQueryName:(NSString * _Nullable)gqlQueryName + serverErrorMessage:(NSString * _Nullable)serverErrorMessage + isW3cCaughted:(NSNumber * _Nullable)isW3cCaughted + partialID:(NSNumber * _Nullable)partialID + timestamp:(NSNumber * _Nullable)timestamp + generatedW3CTraceparent:(NSString * _Nullable)generatedW3CTraceparent + caughtedW3CTraceparent:(NSString * _Nullable)caughtedW3CTraceparent; + @end NS_ASSUME_NONNULL_END diff --git a/ios/instabug_flutter.podspec b/ios/instabug_flutter.podspec index 31f7d8782..fa08814fd 100644 --- a/ios/instabug_flutter.podspec +++ b/ios/instabug_flutter.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'instabug_flutter' - s.version = '13.3.0' + s.version = '13.4.0' s.summary = 'Flutter plugin for integrating the Instabug SDK.' s.author = 'Instabug' s.homepage = 'https://www.instabug.com/platforms/flutter' @@ -17,6 +17,6 @@ Pod::Spec.new do |s| s.pod_target_xcconfig = { 'OTHER_LDFLAGS' => '-framework "Flutter" -framework "Instabug"'} s.dependency 'Flutter' - s.dependency 'Instabug', '13.3.0' + s.dependency 'Instabug', '13.4.0' end diff --git a/pubspec.yaml b/pubspec.yaml index 466933d8c..ba6dd0be2 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: instabug_flutter -version: 13.3.0 +version: 13.4.0 description: >- Instabug empowers mobile teams to monitor, prioritize, and debug performance and stability issues throughout the app development lifecycle.