Skip to content
Prev Previous commit
Next Next commit
fix: linting
  • Loading branch information
AyaMahmoud148 committed May 14, 2025
commit 37699540f93240bb7a75abcdbb0170b531937b54
6 changes: 5 additions & 1 deletion .lh/examples/default/ios/Podfile.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@
"activeCommit": 0,
"commits": [
{
"activePatchIndex": 0,
"activePatchIndex": 1,
"patches": [
{
"date": 1742910753663,
"content": "Index: \n===================================================================\n--- \n+++ \n"
},
{
"date": 1742910852149,
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -0,0 +1,45 @@\n+require_relative '../node_modules/react-native/scripts/react_native_pods'\n+\n+require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'\n+\n+platform :ios, '13.4'\n+prepare_react_native_project!\n+\n+linkage = ENV['USE_FRAMEWORKS']\n+if linkage != nil\n+ Pod::UI.puts \"Configuring Pod with #{linkage}ally linked Frameworks\".green\n+ use_frameworks! :linkage => linkage.to_sym\n+end\n+\n+target 'InstabugExample' do\n+ config = use_native_modules!\n+ rn_maps_path = '../node_modules/react-native-maps'\n+ pod 'react-native-google-maps', :path => rn_maps_path\n+ # Flags change depending on the env values.\n+ flags = get_default_flags()\n+\n+ use_react_native!(\n+ :path => config[:reactNativePath],\n+ # Hermes is now enabled by default. Disable by setting this flag to false.\n+ # Upcoming versions of React Native may rely on get_default_flags(), but\n+ # we make it explicit here to aid in the React Native upgrade process.\n+ :hermes_enabled => flags[:hermes_enabled],\n+ :fabric_enabled => flags[:fabric_enabled],\n+ # An absolute path to your application root.\n+ :app_path => \"#{Pod::Config.instance.installation_root}/..\"\n+ )\n+\n+ target 'InstabugTests' do\n+ inherit! :complete\n+ pod 'OCMock'\n+ end\n+\n+ post_install do |installer|\n+ react_native_post_install(\n+ installer,\n+ # Set `mac_catalyst_enabled` to `true` in order to apply patches\n+ # necessary for Mac Catalyst builds\n+ :mac_catalyst_enabled => false\n+ )\n+ end\n+end\n"
}
],
"date": 1742910753663,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1297,16 +1297,16 @@ public void run() {
* @param autoMaskingTypes The masking type to be applied.
*/
@ReactMethod
public void enableAutoMasking(@NonNull ReadableArray autoMaskingTypes) {
int[] autoMassingTypesArray = new int[autoMaskingTypes.size()];
for (int i=0;i< autoMaskingTypes.size();i++)
{
String key = autoMaskingTypes.getString(i);

autoMassingTypesArray[i]= ArgsRegistry.autoMaskingTypes.get(key);

public void enableAutoMasking(@NonNull ReadableArray autoMaskingTypes) {
int[] autoMassingTypesArray = new int[autoMaskingTypes.size()];
for (int i=0;i< autoMaskingTypes.size();i++)
{
String key = autoMaskingTypes.getString(i);

autoMassingTypesArray[i]= ArgsRegistry.autoMaskingTypes.get(key);

}

Instabug.setAutoMaskScreenshotsTypes(autoMassingTypesArray);
}

Instabug.setAutoMaskScreenshotsTypes(autoMassingTypesArray);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,6 @@ public void testEnableAutoMasking(){
String maskMedia = "media";
String maskNone = "none";


rnModule.enableAutoMasking(JavaOnlyArray.of(maskLabel, maskMedia, maskTextInputs,maskNone));

mockInstabug.verify(() -> Instabug.setAutoMaskScreenshotsTypes(MaskingType.LABELS,MaskingType.MEDIA,MaskingType.TEXT_INPUTS,MaskingType.MASK_NOTHING));
Expand Down
26 changes: 13 additions & 13 deletions examples/default/ios/InstabugTests/InstabugSampleTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -610,19 +610,19 @@ - (void) testIsW3CaughtHeaderEnabled {

- (void)testEnableAutoMasking {
id mock = OCMClassMock([Instabug class]);

NSArray *autoMaskingTypes = [NSArray arrayWithObjects:
[NSNumber numberWithInteger:IBGAutoMaskScreenshotOptionLabels],
[NSNumber numberWithInteger:IBGAutoMaskScreenshotOptionTextInputs],
[NSNumber numberWithInteger:IBGAutoMaskScreenshotOptionMedia],
[NSNumber numberWithInteger:IBGAutoMaskScreenshotOptionMaskNothing],
nil];

OCMStub([mock setAutoMaskScreenshots:IBGAutoMaskScreenshotOptionLabels | IBGAutoMaskScreenshotOptionTextInputs | IBGAutoMaskScreenshotOptionMedia | IBGAutoMaskScreenshotOptionMaskNothing]);

[self.instabugBridge enableAutoMasking:autoMaskingTypes];

OCMVerify([mock setAutoMaskScreenshots:IBGAutoMaskScreenshotOptionLabels | IBGAutoMaskScreenshotOptionTextInputs | IBGAutoMaskScreenshotOptionMedia | IBGAutoMaskScreenshotOptionMaskNothing]);
NSArray *autoMaskingTypes = [NSArray arrayWithObjects:
[NSNumber numberWithInteger:IBGAutoMaskScreenshotOptionLabels],
[NSNumber numberWithInteger:IBGAutoMaskScreenshotOptionTextInputs],
[NSNumber numberWithInteger:IBGAutoMaskScreenshotOptionMedia],
[NSNumber numberWithInteger:IBGAutoMaskScreenshotOptionMaskNothing],
nil];
OCMStub([mock setAutoMaskScreenshots:IBGAutoMaskScreenshotOptionLabels | IBGAutoMaskScreenshotOptionTextInputs | IBGAutoMaskScreenshotOptionMedia | IBGAutoMaskScreenshotOptionMaskNothing]);
[self.instabugBridge enableAutoMasking:autoMaskingTypes];
OCMVerify([mock setAutoMaskScreenshots:IBGAutoMaskScreenshotOptionLabels | IBGAutoMaskScreenshotOptionTextInputs | IBGAutoMaskScreenshotOptionMedia | IBGAutoMaskScreenshotOptionMaskNothing]);
}

- (void)testSetNetworkLogBodyEnabled {
Expand Down