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
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ android {
}

dependencies {
api 'com.instabug.library:instabug:15.0.2.7140934-SNAPSHOT'
api 'com.instabug.library:instabug:15.0.2.7160278-SNAPSHOT'
testImplementation 'junit:junit:4.13.2'
testImplementation "org.mockito:mockito-inline:3.12.1"
testImplementation "io.mockk:mockk:1.13.13"
Expand Down
14 changes: 14 additions & 0 deletions android/src/main/java/com/instabug/flutter/modules/ApmApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,20 @@ public void isEndScreenLoadingEnabled(@NonNull ApmPigeon.Result<Boolean> result)
isScreenLoadingEnabled(result);
}

@Override
public void isAutoUiTraceEnabled(@NonNull ApmPigeon.Result<Boolean> result) {
try {
InternalAPM._isFeatureEnabledCP(APMFeature.UI_TRACE, "InstabugCaptureScreenLoading", new FeatureAvailabilityCallback() {
@Override
public void invoke(boolean isFeatureAvailable) {
result.success(isFeatureAvailable);
}
});
} catch (Exception e) {
e.printStackTrace();
}
}

@Override
public void isEnabled(@NonNull ApmPigeon.Result<Boolean> result) {
try {
Expand Down
22 changes: 22 additions & 0 deletions android/src/test/java/com/instabug/flutter/ApmApiTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,28 @@ public void testSetScreenLoadingMonitoringEnabled() {
mAPM.verify(() -> APM.setScreenLoadingEnabled(isEnabled));
}

@Test
public void testIsAutoUiTraceEnabled() {

boolean expected = true;
ApmPigeon.Result<Boolean> result = spy(makeResult((actual) -> assertEquals(expected, actual)));

mInternalApmStatic.when(() -> InternalAPM._isFeatureEnabledCP(any(), any(), any())).thenAnswer(
invocation -> {
FeatureAvailabilityCallback callback = (FeatureAvailabilityCallback) invocation.getArguments()[2];
callback.invoke(expected);
return null;
});


api.isScreenRenderEnabled(result);

mInternalApmStatic.verify(() -> InternalAPM._isFeatureEnabledCP(any(), any(), any()));
mInternalApmStatic.verifyNoMoreInteractions();

verify(result).success(expected);
}

@Test
public void testIsScreenRenderEnabled() {

Expand Down
1 change: 1 addition & 0 deletions example/ios/InstabugTests/ApmApiTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ - (void)testEndScreenLoading {
OCMVerify([self.mAPM endScreenLoadingCPWithEndTimestampMUS:endScreenLoadingCPWithEndTimestampMUS]);
}


- (void)testIsScreenRenderEnabled {
XCTestExpectation *expectation = [self expectationWithDescription:@"Call completion handler"];

Expand Down
2 changes: 1 addition & 1 deletion example/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ target 'Runner' do

use_frameworks!
use_modular_headers!
pod 'Instabug', :podspec => 'https://ios-releases.instabug.com/custom/faeture-screen_rendering-release/15.1.29/Instabug.podspec'
pod 'Instabug', :podspec => 'https://ios-releases.instabug.com/custom/faeture-screen_rendering-release/15.1.31/Instabug.podspec'
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

Expand Down
14 changes: 7 additions & 7 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
PODS:
- Flutter (1.0.0)
- Instabug (15.1.29)
- Instabug (15.1.31)
- instabug_flutter (14.3.0):
- Flutter
- Instabug (= 15.1.29)
- Instabug (= 15.1.31)
- OCMock (3.6)

DEPENDENCIES:
- Flutter (from `Flutter`)
- Instabug (from `https://ios-releases.instabug.com/custom/faeture-screen_rendering-release/15.1.29/Instabug.podspec`)
- Instabug (from `https://ios-releases.instabug.com/custom/faeture-screen_rendering-release/15.1.31/Instabug.podspec`)
- instabug_flutter (from `.symlinks/plugins/instabug_flutter/ios`)
- OCMock (= 3.6)

Expand All @@ -20,16 +20,16 @@ EXTERNAL SOURCES:
Flutter:
:path: Flutter
Instabug:
:podspec: https://ios-releases.instabug.com/custom/faeture-screen_rendering-release/15.1.29/Instabug.podspec
:podspec: https://ios-releases.instabug.com/custom/faeture-screen_rendering-release/15.1.31/Instabug.podspec
instabug_flutter:
:path: ".symlinks/plugins/instabug_flutter/ios"

SPEC CHECKSUMS:
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
Instabug: c2ddabc44a1f425615fedba6331a7d1e8805e413
instabug_flutter: 30227104e2ba5857bcd7794dc21e353bdb691f3e
Instabug: 447d3f5a9f1c83120235437e08c9a51aaa8f8605
instabug_flutter: 65aa2dee3036a3c7c8feff8e898c9547239a891d
OCMock: 5ea90566be239f179ba766fd9fbae5885040b992

PODFILE CHECKSUM: 8194fdeb7c217898e3faaeed21926a5fc586751d
PODFILE CHECKSUM: c5b98f57c27da87950775c360d20aaedd3216b8d

COCOAPODS: 1.15.2
11 changes: 5 additions & 6 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,17 @@ part 'src/screens/screen_render_page.dart';

void main() {
runZonedGuarded(
() {
() async {
WidgetsFlutterBinding.ensureInitialized();

Instabug.init(
await Instabug.init(
token: 'ed6f659591566da19b67857e1b9d40ab',
invocationEvents: [InvocationEvent.floatingButton],
debugLogsLevel: LogLevel.verbose,
appVariant: 'variant 1',
).then((_) {
APM.setScreenRenderingEnabled(true);
});

);
APM.setScreenRenderingEnabled(true);
APM.setAutoUITraceEnabled(false);
FlutterError.onError = (FlutterErrorDetails details) {
Zone.current.handleUncaughtError(details.exception, details.stack!);
};
Expand Down
Loading