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
16 changes: 14 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## [15.0.1](https://github.com/Instabug/Instabug-Flutter/compare/v14.3.0...15.0.1)

### Added

- Add support for xCode 16. ([#574](https://github.com/Instabug/Instabug-Flutter/pull/574))

- Add support for BugReporting user consents. ([#573](https://github.com/Instabug/Instabug-Flutter/pull/573))

### Changed

- Bump Instabug iOS SDK to v15.1.1 ([#581](https://github.com/Instabug/Instabug-Flutter/pull/581)). [See release notes](https://github.com/Instabug/Instabug-iOS/releases/tag/15.1.1).

- Bump Instabug Android SDK to v15.0.1 ([#581](https://github.com/Instabug/Instabug-Flutter/pull/581)). [See release notes](https://github.com/Instabug/Instabug-Android/releases/tag/v15.0.1).

## [14.3.1](https://github.com/Instabug/Instabug-Flutter/compare/v14.3.0...14.3.1) (May 20, 2025)

### Changed
Expand All @@ -19,12 +33,10 @@

- Bump Instabug Android SDK to v14.3.0 ([#569](https://github.com/Instabug/Instabug-Flutter/pull/569)). [See release notes](https://github.com/Instabug/Instabug-Android/releases/tag/v14.3.0).


### Fixed

- Fixed an issue with `SetReproStepsConfig` on Android platform ([#543](https://github.com/Instabug/Instabug-Flutter/pull/543)).


## [14.1.0](https://github.com/Instabug/Instabug-Flutter/compare/v14.0.0...v14.1.0) (January 2, 2025)

### Changed
Expand Down
4 changes: 2 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
group 'com.instabug.flutter'
version '14.3.1'
version '15.0.1'

buildscript {
repositories {
Expand Down Expand Up @@ -47,7 +47,7 @@ android {
}

dependencies {
api 'com.instabug.library:instabug:14.3.1.6803970-SNAPSHOT'
api 'com.instabug.library:instabug:15.0.1'
testImplementation 'junit:junit:4.13.2'
testImplementation "org.mockito:mockito-inline:3.12.1"
testImplementation "io.mockk:mockk:1.13.13"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,4 +186,26 @@ public void setCommentMinimumCharacterCount(@NonNull Long limit, @Nullable List<
}
BugReporting.setCommentMinimumCharacterCount(limit.intValue(), reportTypesArray);
}

@Override
public void addUserConsents(String key, String description, Boolean mandatory, Boolean checked, String actionType) {
ThreadManager.runOnMainThread(new Runnable() {
@Override
public void run() {
String mappedActionType;
try {
if (actionType==null) {
mappedActionType = null;
}
else {
mappedActionType = ArgsRegistry.userConsentActionType.get(actionType);
}

BugReporting.addUserConsent(key, description, mandatory, checked, mappedActionType);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ public T get(Object key) {
put("Position.bottomRight", InstabugVideoRecordingButtonPosition.BOTTOM_RIGHT);
}};

public static final ArgsMap<String> userConsentActionType = new ArgsMap<String>() {{
put("UserConsentActionType.dropAutoCapturedMedia", com.instabug.bug.userConsent.ActionType.DROP_AUTO_CAPTURED_MEDIA);
put("UserConsentActionType.dropLogs", com.instabug.bug.userConsent.ActionType.DROP_LOGS);
put("UserConsentActionType.noChat", com.instabug.bug.userConsent.ActionType.NO_CHAT);
}};

public static ArgsMap<WelcomeMessage.State> welcomeMessageStates = new ArgsMap<WelcomeMessage.State>() {{
put("WelcomeMessageMode.live", WelcomeMessage.State.LIVE);
put("WelcomeMessageMode.beta", WelcomeMessage.State.BETA);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import java.util.List;

import io.flutter.plugin.common.BinaryMessenger;

import com.instabug.bug.userConsent.ActionType;

public class BugReportingApiTest {
private final BinaryMessenger mMessenger = mock(BinaryMessenger.class);
Expand Down Expand Up @@ -194,4 +194,19 @@ public void testSetCommentMinimumCharacterCount() {

mBugReporting.verify(() -> BugReporting.setCommentMinimumCharacterCount(limit.intValue(), BugReporting.ReportType.BUG, BugReporting.ReportType.QUESTION));
}

@Test
public void TestAddUserConsents() {

final String key = "testKey";
final String description = "Consent description";
final boolean mandatory = true;
final boolean checked = true;
final String actionType = "UserConsentActionType.dropAutoCapturedMedia";


api.addUserConsents(key, description, mandatory, checked, actionType);

mBugReporting.verify(()->BugReporting.addUserConsent(key, description, mandatory, checked,"drop_auto_captured_media"));
}
}
4 changes: 2 additions & 2 deletions example/ios/InstabugTests/ApmApiTests.m
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#import <XCTest/XCTest.h>
#import "OCMock/OCMock.h"
#import "ApmApi.h"
#import "Instabug/IBGAPM.h"
#import "Instabug/Instabug.h"
#import "InstabugSDK/IBGAPM.h"
#import "InstabugSDK/InstabugSDK.h"
#import "IBGAPM+PrivateAPIs.h"

@interface ApmApiTests : XCTestCase
Expand Down
25 changes: 23 additions & 2 deletions example/ios/InstabugTests/BugReportingApiTests.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#import <XCTest/XCTest.h>
#import "OCMock/OCMock.h"
#import "BugReportingApi.h"
#import "Instabug/IBGBugReporting.h"
#import "InstabugSDK/IBGBugReporting.h"

@interface BugReportingApiTests : XCTestCase

Expand Down Expand Up @@ -174,5 +174,26 @@ - (void)testSetCommentMinimumCharacterCountGivenNoReportTypes {

OCMVerify([self.mBugReporting setCommentMinimumCharacterCountForReportTypes:IBGBugReportingReportTypeBug | IBGBugReportingReportTypeFeedback | IBGBugReportingReportTypeQuestion withLimit:limit.intValue]);
}

- (void)testAddUserConsentWithKey {
NSString *key = @"testKey";
NSString *description = @"Consent description";
NSNumber *mandatory = @1;
NSNumber *checked = @0;
NSString *actionType= @"UserConsentActionType.dropAutoCapturedMedia";
FlutterError *error;
IBGActionType mappedActionType = IBGActionTypeDropAutoCapturedMedia;

[self.api addUserConsentsKey:key
description:description
mandatory:mandatory
checked:checked
actionType:actionType
error: &error
];
OCMVerify([self.mBugReporting addUserConsentWithKey:key
description:description
mandatory:[mandatory boolValue]
checked:[checked boolValue]
actionType:mappedActionType]);
}
@end
4 changes: 2 additions & 2 deletions example/ios/InstabugTests/CrashReportingApiTests.m
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#import <XCTest/XCTest.h>
#import "OCMock/OCMock.h"
#import "CrashReportingApi.h"
#import "Instabug/IBGCrashReporting.h"
#import "Instabug/Instabug.h"
#import "InstabugSDK/IBGCrashReporting.h"
#import "InstabugSDK/InstabugSDK.h"
#import "Util/Instabug+Test.h"
#import "Util/IBGCrashReporting+CP.h"

Expand Down
2 changes: 1 addition & 1 deletion example/ios/InstabugTests/FeatureRequestsApiTests.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#import <XCTest/XCTest.h>
#import "OCMock/OCMock.h"
#import "FeatureRequestsApi.h"
#import "Instabug/IBGFeatureRequests.h"
#import "InstabugSDK/IBGFeatureRequests.h"

@interface FeatureRequestsApiTests : XCTestCase

Expand Down
2 changes: 1 addition & 1 deletion example/ios/InstabugTests/InstabugApiTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#import <XCTest/XCTest.h>
#import "OCMock/OCMock.h"
#import "InstabugApi.h"
#import "Instabug/Instabug.h"
#import "InstabugSDK/InstabugSDK.h"
#import "Util/Instabug+Test.h"
#import "IBGNetworkLogger+CP.h"
#import "Flutter/Flutter.h"
Expand Down
2 changes: 1 addition & 1 deletion example/ios/InstabugTests/InstabugLogApiTests.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#import <XCTest/XCTest.h>
#import "OCMock/OCMock.h"
#import "InstabugLogApi.h"
#import "Instabug/IBGLog.h"
#import "InstabugSDK/IBGLog.h"

@interface InstabugLogApiTests : XCTestCase

Expand Down
2 changes: 1 addition & 1 deletion example/ios/InstabugTests/RepliesApiTests.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#import <XCTest/XCTest.h>
#import "OCMock/OCMock.h"
#import "RepliesApi.h"
#import "Instabug/IBGReplies.h"
#import "InstabugSDK/IBGReplies.h"

@interface RepliesApiTests : XCTestCase

Expand Down
2 changes: 1 addition & 1 deletion example/ios/InstabugTests/SessionReplayApiTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#import <instabug_flutter/SessionReplayApi.h>
#import "OCMock/OCMock.h"
#import "SessionReplayApi.h"
#import "Instabug/IBGSessionReplay.h"
#import "InstabugSDK/IBGSessionReplay.h"

@interface SessionReplayApiTests : XCTestCase

Expand Down
2 changes: 1 addition & 1 deletion example/ios/InstabugTests/SurveysApiTests.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#import <XCTest/XCTest.h>
#import "OCMock/OCMock.h"
#import "SurveysApi.h"
#import "Instabug/IBGSurveys.h"
#import "InstabugSDK/IBGSurveys.h"
#import "Util/IBGSurvey+Test.h"

@interface SurveysApiTests : XCTestCase
Expand Down
4 changes: 2 additions & 2 deletions example/ios/InstabugTests/Util/Apm+Test.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// This header file defines Instabug methods that are called using selectors for test verification.

#import <Instabug/IBGAPM.h>
#import <Instabug/Instabug.h>
#import <InstabugSDK/IBGAPM.h>
#import <InstabugSDK/InstabugSDK.h>

@interface IBGAPM (Test)
+ (void)startUITraceCPWithName:(NSString *)name startTimestampMUS:(NSTimeInterval)startTimestampMUS;
Expand Down
2 changes: 1 addition & 1 deletion example/ios/InstabugTests/Util/IBGCrashReporting+CP.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#import <Instabug/Instabug.h>
#import <InstabugSDK/InstabugSDK.h>


@interface IBGCrashReporting (CP)
Expand Down
2 changes: 1 addition & 1 deletion example/ios/InstabugTests/Util/IBGNetworkLogger+Test.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This header file defines IBGNetworkLogger methods that are called using selectors for test verification.

#import <Instabug/Instabug.h>
#import <InstabugSDK/InstabugSDK.h>

@interface IBGNetworkLogger (Test)
+ (void)addNetworkLogWithUrl:(NSString *)url
Expand Down
2 changes: 1 addition & 1 deletion example/ios/InstabugTests/Util/IBGSurvey+Test.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This header file makes IBGSurvey title property editable to be used in tests.

#import <Instabug/IBGSurveys.h>
#import <InstabugSDK/IBGSurveys.h>

@interface IBGSurvey (Test)
@property (nonatomic, strong) NSString *title;
Expand Down
2 changes: 1 addition & 1 deletion example/ios/InstabugTests/Util/Instabug+Test.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This header file defines Instabug methods that are called using selectors for test verification.

#import <Instabug/Instabug.h>
#import <InstabugSDK/InstabugSDK.h>

@interface Instabug (Test)
+ (void)setCurrentPlatform:(IBGPlatform)platform;
Expand Down
3 changes: 2 additions & 1 deletion example/ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
platform :ios, '13.4'
platform :ios, '14.4'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down Expand Up @@ -27,6 +27,7 @@ require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelpe

flutter_ios_podfile_setup
target 'Runner' do

use_frameworks!
use_modular_headers!

Expand Down
12 changes: 6 additions & 6 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
PODS:
- Flutter (1.0.0)
- Instabug (14.3.0)
- instabug_flutter (14.3.1):
- Instabug (15.1.1)
- instabug_flutter (15.0.1):
- Flutter
- Instabug (= 14.3.0)
- Instabug (= 15.1.1)
- OCMock (3.6)

DEPENDENCIES:
Expand All @@ -24,10 +24,10 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
Instabug: 97a4e694731f46bbc02dbe49ab29cc552c5e2f41
instabug_flutter: 0a2d35be020c80b2b63bd8337a94a3f2ffe65bc0
Instabug: 3e7af445c14d7823fcdecba223f09b5f7c0c6ce1
instabug_flutter: e4e366434313bab3a2db123c1501ca6247dc950b
OCMock: 5ea90566be239f179ba766fd9fbae5885040b992

PODFILE CHECKSUM: 8f7552fd115ace1988c3db54a69e4a123c448f84
PODFILE CHECKSUM: 4d0aaaf6a444f68024f992999ff2c2ee26baa6ec

COCOAPODS: 1.16.2
5 changes: 4 additions & 1 deletion example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.6;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand All @@ -559,6 +559,7 @@
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 15.6;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -696,6 +697,7 @@
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 15.6;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -727,6 +729,7 @@
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 15.6;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down
2 changes: 1 addition & 1 deletion example/ios/Runner/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import UIKit
import Flutter

@UIApplicationMain
@main
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
Expand Down
4 changes: 2 additions & 2 deletions example/ios/Runner/InstabugExampleMethodCallHandler.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#import <Foundation/Foundation.h>
#import "InstabugExampleMethodCallHandler.h"
#import <Instabug/IBGCrashReporting.h>
#import <Instabug/Instabug.h>
#import <InstabugSDK/IBGCrashReporting.h>
#import <InstabugSDK/InstabugSDK.h>
#import <Flutter/Flutter.h>

// MARK: - Private Interface
Expand Down
Loading