Skip to content

Commit 934acfa

Browse files
committed
feat(ios): enabling auto masking
1 parent 64d289b commit 934acfa

File tree

4 files changed

+21
-6
lines changed

4 files changed

+21
-6
lines changed

example/ios/InstabugTests/InstabugApiTests.m

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,14 @@ - (void)testWillRedirectToAppStore {
451451
OCMVerify([self.mInstabug willRedirectToAppStore]);
452452
}
453453

454+
- (void)testSetAutoMaskingEnabled {
455+
NSNumber *isEnabled = @1;
456+
FlutterError *error;
457+
[self.api setAutoMaskingEnabledIsEnabled:isEnabled error:&error];
458+
459+
OCMVerify([self.mNetworkLogger setAutoMaskingEnabled:YES]);
460+
}
461+
454462
- (void)testNetworkLogWithW3Caught {
455463
NSString *url = @"https://example.com";
456464
NSString *requestBody = @"hi";

example/ios/Podfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelpe
2727

2828
flutter_ios_podfile_setup
2929
target 'Runner' do
30+
pod 'Instabug', :podspec => 'https://ios-releases.instabug.com/custom/feature-MOB-16541-NetworkAutoMaskAPI/14.0.0/Instabug.podspec'
3031
use_frameworks!
3132
use_modular_headers!
3233

example/ios/Podfile.lock

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,35 @@
11
PODS:
22
- Flutter (1.0.0)
33
- Instabug (14.0.0)
4-
- instabug_flutter (13.4.0):
4+
- instabug_flutter (14.0.0):
55
- Flutter
66
- Instabug (= 14.0.0)
77
- OCMock (3.6)
88

99
DEPENDENCIES:
1010
- Flutter (from `Flutter`)
11+
- Instabug (from `https://ios-releases.instabug.com/custom/feature-MOB-16541-NetworkAutoMaskAPI/14.0.0/Instabug.podspec`)
1112
- instabug_flutter (from `.symlinks/plugins/instabug_flutter/ios`)
1213
- OCMock (= 3.6)
1314

1415
SPEC REPOS:
1516
trunk:
16-
- Instabug
1717
- OCMock
1818

1919
EXTERNAL SOURCES:
2020
Flutter:
2121
:path: Flutter
22+
Instabug:
23+
:podspec: https://ios-releases.instabug.com/custom/feature-MOB-16541-NetworkAutoMaskAPI/14.0.0/Instabug.podspec
2224
instabug_flutter:
2325
:path: ".symlinks/plugins/instabug_flutter/ios"
2426

2527
SPEC CHECKSUMS:
2628
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
27-
Instabug: a0beffc01658773e2fac549845782f8937707dc4
28-
instabug_flutter: 71ec9d13d57a4958cabab59fe06792cade3bf754
29+
Instabug: 3fa42ac8b4350cb632df724b14a86ebdb875aad9
30+
instabug_flutter: ff8ab5ff34a476b1d2d887478ec190cda962b973
2931
OCMock: 5ea90566be239f179ba766fd9fbae5885040b992
3032

31-
PODFILE CHECKSUM: 8f7552fd115ace1988c3db54a69e4a123c448f84
33+
PODFILE CHECKSUM: e7d6c199070a4a2b3664012221f598abd9a35e69
3234

33-
COCOAPODS: 1.16.2
35+
COCOAPODS: 1.15.2

ios/Classes/Modules/InstabugApi.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,10 @@ - (void)willRedirectToStoreWithError:(FlutterError * _Nullable __autoreleasing *
341341
[Instabug willRedirectToAppStore];
342342
}
343343

344+
- (void)setAutoMaskingEnabledIsEnabled:(NSNumber *)isEnabled error:(FlutterError *_Nullable *_Nonnull)error {
345+
IBGNetworkLogger.autoMaskingEnabled = [isEnabled boolValue];
346+
}
347+
344348
- (void)addFeatureFlagsFeatureFlagsMap:(nonnull NSDictionary<NSString *,NSString *> *)featureFlagsMap error:(FlutterError * _Nullable __autoreleasing * _Nonnull)error {
345349
NSMutableArray<IBGFeatureFlag *> *featureFlags = [NSMutableArray array];
346350
for(id key in featureFlagsMap){

0 commit comments

Comments
 (0)