From 85334351369c582d672813116df25b8d03fe8a37 Mon Sep 17 00:00:00 2001 From: Ahmed Mahmoud Date: Tue, 10 Sep 2024 11:09:59 +0300 Subject: [PATCH 1/5] chore(ios): bump sdk to v13.4.0 --- example/ios/Podfile.lock | 8 ++++---- ios/instabug_flutter.podspec | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 17a3f845c..5c5d26932 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 (13.4.0) - instabug_flutter (13.3.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: ea66471d4f6c1a26ca7de18bf7046d271c863d4a OCMock: 5ea90566be239f179ba766fd9fbae5885040b992 PODFILE CHECKSUM: 8f7552fd115ace1988c3db54a69e4a123c448f84 diff --git a/ios/instabug_flutter.podspec b/ios/instabug_flutter.podspec index 31f7d8782..a9da1c0cd 100644 --- a/ios/instabug_flutter.podspec +++ b/ios/instabug_flutter.podspec @@ -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 From 3ed6a514e1b5cacf1f73cc315a3466b2328cb0f8 Mon Sep 17 00:00:00 2001 From: Ahmed Mahmoud Date: Tue, 10 Sep 2024 11:10:31 +0300 Subject: [PATCH 2/5] chore(android): bump sdk to v13.4.0 --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index f16d516e5..ae29537e2 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -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" From 0768d134e751e3ac47d334cef9096768e5db37a3 Mon Sep 17 00:00:00 2001 From: Ahmed Mahmoud Date: Tue, 10 Sep 2024 11:12:38 +0300 Subject: [PATCH 3/5] chore: bump sdk version to v13.4.0 --- CHANGELOG.md | 2 +- android/build.gradle | 2 +- example/ios/Podfile.lock | 4 ++-- example/pubspec.lock | 2 +- ios/instabug_flutter.podspec | 2 +- pubspec.yaml | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 34e09b698..d66b9e9eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # 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) (August 11, 2024) ### Added diff --git a/android/build.gradle b/android/build.gradle index ae29537e2..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 { diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 5c5d26932..8f27d4856 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -1,7 +1,7 @@ PODS: - Flutter (1.0.0) - Instabug (13.4.0) - - instabug_flutter (13.3.0): + - instabug_flutter (13.4.0): - Flutter - Instabug (= 13.4.0) - OCMock (3.6) @@ -25,7 +25,7 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 Instabug: 183aa1e038d01ddc000f06835f46a9ea1f6c992b - instabug_flutter: ea66471d4f6c1a26ca7de18bf7046d271c863d4a + instabug_flutter: 2cae2dc6f1d9e2442154886b3740a47f3429d239 OCMock: 5ea90566be239f179ba766fd9fbae5885040b992 PODFILE CHECKSUM: 8f7552fd115ace1988c3db54a69e4a123c448f84 diff --git a/example/pubspec.lock b/example/pubspec.lock index 5b56a50f9..ff72b8c2f 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -115,7 +115,7 @@ packages: path: ".." relative: true source: path - version: "13.3.0" + version: "13.4.0" leak_tracker: dependency: transitive description: diff --git a/ios/instabug_flutter.podspec b/ios/instabug_flutter.podspec index a9da1c0cd..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' 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. From f52978835fda2830ba27854a8c0f23383ff10e28 Mon Sep 17 00:00:00 2001 From: Ahmed Mahmoud Date: Tue, 10 Sep 2024 11:14:40 +0300 Subject: [PATCH 4/5] chore: update changelog --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d66b9e9eb..99b2ac4fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ - 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). + ## [13.3.0](https://github.com/Instabug/Instabug-Flutter/compare/v13.2.0...v13.3.0) (August 5, 2024) ### Added From 5e22ff7c9dc03cbc212c2cdad74024518d93f202 Mon Sep 17 00:00:00 2001 From: Ahmed Elrefaey <68241710+a7medev@users.noreply.github.com> Date: Wed, 11 Sep 2024 16:26:34 +0300 Subject: [PATCH 5/5] fix(ios): update native network logging method signature (#507) * fix(ios): update native network logging method signature * feat(example): add network logging in example --- example/ios/InstabugTests/InstabugApiTests.m | 8 ++- example/ios/Runner.xcodeproj/project.pbxproj | 2 - example/lib/main.dart | 2 +- .../lib/src/components/network_content.dart | 2 + example/pubspec.lock | 8 +++ example/pubspec.yaml | 5 ++ ios/Classes/Modules/InstabugApi.m | 51 +++++++++---------- ios/Classes/Util/IBGNetworkLogger+CP.h | 22 ++++++++ 8 files changed, 67 insertions(+), 33 deletions(-) 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/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 ff72b8c2f..31cb6f5dd 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -116,6 +116,14 @@ packages: relative: true source: path 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