diff --git a/android/native.gradle b/android/native.gradle index ce24c1c1e..2a88511d9 100644 --- a/android/native.gradle +++ b/android/native.gradle @@ -1,5 +1,5 @@ project.ext.instabug = [ - version: '14.0.0.6273368-SNAPSHOT' + version: '14.1.0.6273967-SNAPSHOT' ] dependencies { diff --git a/examples/default/android/build.gradle b/examples/default/android/build.gradle index a9222aeeb..5729e78c9 100644 --- a/examples/default/android/build.gradle +++ b/examples/default/android/build.gradle @@ -24,7 +24,7 @@ buildscript { classpath("com.android.tools.build:gradle:8.1.0") classpath("com.facebook.react:react-native-gradle-plugin") classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion") - classpath("com.instabug.library:instabug-plugin:14.0.0.6273368-SNAPSHOT") + classpath("com.instabug.library:instabug-plugin:14.1.0.6273967-SNAPSHOT") } } diff --git a/examples/default/ios/Podfile b/examples/default/ios/Podfile index d9bb06968..2849b67b7 100644 --- a/examples/default/ios/Podfile +++ b/examples/default/ios/Podfile @@ -19,7 +19,7 @@ target 'InstabugExample' do rn_maps_path = '../node_modules/react-native-maps' pod 'react-native-google-maps', :path => rn_maps_path - pod 'Instabug', :podspec => 'https://ios-releases.instabug.com/custom/release-support_cp_network_filtering_obfuscation-add_reset_network_state/13.4.3/Instabug.podspec' + pod 'Instabug', :podspec => 'https://ios-releases.instabug.com/custom/feature-support_cp_network_filtering_obfuscation-base/14.1.0/Instabug.podspec' use_react_native!( :path => config[:reactNativePath], # An absolute path to your application root. diff --git a/examples/default/ios/Podfile.lock b/examples/default/ios/Podfile.lock index eaf6fc979..54033371b 100644 --- a/examples/default/ios/Podfile.lock +++ b/examples/default/ios/Podfile.lock @@ -31,7 +31,7 @@ PODS: - hermes-engine (0.75.4): - hermes-engine/Pre-built (= 0.75.4) - hermes-engine/Pre-built (0.75.4) - - Instabug (13.4.3) + - Instabug (14.1.0) - instabug-reactnative-ndk (0.1.0): - DoubleConversion - glog @@ -1603,7 +1603,7 @@ PODS: - ReactCommon/turbomodule/core - Yoga - RNInstabug (13.4.0): - - Instabug (= 13.4.3) + - Instabug (= 14.1.0) - React-Core - RNReanimated (3.16.1): - DoubleConversion @@ -1747,7 +1747,7 @@ DEPENDENCIES: - fmt (from `../node_modules/react-native/third-party-podspecs/fmt.podspec`) - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) - hermes-engine (from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`) - - Instabug (from `https://ios-releases.instabug.com/custom/release-support_cp_network_filtering_obfuscation-add_reset_network_state/13.4.3/Instabug.podspec`) + - Instabug (from `https://ios-releases.instabug.com/custom/feature-support_cp_network_filtering_obfuscation-base/14.1.0/Instabug.podspec`) - instabug-reactnative-ndk (from `../node_modules/instabug-reactnative-ndk`) - OCMock - RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`) @@ -1844,7 +1844,7 @@ EXTERNAL SOURCES: :podspec: "../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec" :tag: hermes-2024-08-15-RNv0.75.1-4b3bf912cc0f705b51b71ce1a5b8bd79b93a451b Instabug: - :podspec: https://ios-releases.instabug.com/custom/release-support_cp_network_filtering_obfuscation-add_reset_network_state/13.4.3/Instabug.podspec + :podspec: https://ios-releases.instabug.com/custom/feature-support_cp_network_filtering_obfuscation-base/14.1.0/Instabug.podspec instabug-reactnative-ndk: :path: "../node_modules/instabug-reactnative-ndk" RCT-Folly: @@ -1995,7 +1995,7 @@ SPEC CHECKSUMS: Google-Maps-iOS-Utils: f77eab4c4326d7e6a277f8e23a0232402731913a GoogleMaps: 032f676450ba0779bd8ce16840690915f84e57ac hermes-engine: ea92f60f37dba025e293cbe4b4a548fd26b610a0 - Instabug: 12ea6990039094c48a7c7e8103ba8679c0833f5e + Instabug: afe23192d5487aa2afd4f3baa76913cc2c421cda instabug-reactnative-ndk: d765ac289d56e8896398d02760d9abf2562fc641 OCMock: 589f2c84dacb1f5aaf6e4cec1f292551fe748e74 RCT-Folly: 4464f4d875961fce86008d45f4ecf6cef6de0740 @@ -2061,7 +2061,7 @@ SPEC CHECKSUMS: ReactCommon: 6a952e50c2a4b694731d7682aaa6c79bc156e4ad RNCClipboard: 2821ac938ef46f736a8de0c8814845dde2dcbdfb RNGestureHandler: 511250b190a284388f9dd0d2e56c1df76f14cfb8 - RNInstabug: 514b187e5b884939fd337eefb3244ea75e7e34f8 + RNInstabug: 6e109844b6a8cb6d905e3dacd644973839862715 RNReanimated: f42a5044d121d68e91680caacb0293f4274228eb RNScreens: c7ceced6a8384cb9be5e7a5e88e9e714401fd958 RNSVG: 8b1a777d54096b8c2a0fd38fc9d5a454332bbb4d @@ -2069,6 +2069,6 @@ SPEC CHECKSUMS: SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d Yoga: aa3df615739504eebb91925fc9c58b4922ea9a08 -PODFILE CHECKSUM: 784fde5e5fa833eeefea8a5deaa699d18167d101 +PODFILE CHECKSUM: 48043b3d903923ac80ca4e335406e87f2daba40f COCOAPODS: 1.15.2 diff --git a/examples/default/src/App.tsx b/examples/default/src/App.tsx index 2a7c572f6..0e3bca8c8 100644 --- a/examples/default/src/App.tsx +++ b/examples/default/src/App.tsx @@ -7,6 +7,7 @@ import Instabug, { CrashReporting, InvocationEvent, LogLevel, + NetworkInterceptionMode, NetworkLogger, ReproStepsMode, } from 'instabug-reactnative'; @@ -29,7 +30,7 @@ export const App: React.FC = () => { token: '0fcc87b8bf731164828cc411eccc802a', invocationEvents: [InvocationEvent.floatingButton], debugLogsLevel: LogLevel.verbose, - // networkInterceptionMode: NetworkInterceptionMode.native, + networkInterceptionMode: NetworkInterceptionMode.native, }); CrashReporting.setNDKCrashesEnabled(true); diff --git a/ios/native.rb b/ios/native.rb index 90bb0bf58..4fc710cbe 100644 --- a/ios/native.rb +++ b/ios/native.rb @@ -1,4 +1,4 @@ -$instabug = { :version => '13.4.3' } +$instabug = { :version => '14.1.0' } def use_instabug! (spec = nil) version = $instabug[:version] diff --git a/src/modules/Instabug.ts b/src/modules/Instabug.ts index d41462a01..344fe2e99 100644 --- a/src/modules/Instabug.ts +++ b/src/modules/Instabug.ts @@ -1,4 +1,3 @@ -//todo: remove all logs tagged with 'Andrew' in the file import { AppState, type AppStateStatus, @@ -74,25 +73,6 @@ function reportCurrentViewForAndroid(screenName: string | null) { } } -function _logFlags() { - if (Platform.OS === 'android') { - console.log( - `Andrew: APM Flags -> { - isNativeInterceptionFeatureEnabled: ${isNativeInterceptionFeatureEnabled}, - hasAPMNetworkPlugin: ${hasAPMNetworkPlugin}, - shouldEnableNativeInterception: ${shouldEnableNativeInterception} - }`, - ); - } else { - console.log( - `Andrew: APM Flags -> { - isNativeInterceptionFeatureEnabled: ${isNativeInterceptionFeatureEnabled}, - shouldEnableNativeInterception: ${shouldEnableNativeInterception} - }`, - ); - } -} - /** * Initializes the SDK. * This is the main SDK method that does all the magic. This is the only @@ -148,14 +128,11 @@ const handleAppStateChange = async (nextAppState: AppStateStatus, config: Instab const isUpdated = await fetchApmNetworkFlags(); if (isUpdated) { - console.log('Andrew: App has come to the foreground!'); - console.log('Andrew: APM network flags updated.'); refreshAPMNetworkConfigs(config); } } _currentAppState = nextAppState; - console.log(`Andrew: Current AppState: ${_currentAppState}`); }; /** @@ -176,10 +153,6 @@ const fetchApmNetworkFlags = async () => { isUpdated = true; } } - - console.log( - `Andrew: fetchApmNetworkFlags {isNativeInterceptionFeatureEnabled: ${isNativeInterceptionFeatureEnabled}, hasAPMNetworkPlugin: ${hasAPMNetworkPlugin}}`, - ); return isUpdated; }; @@ -241,13 +214,6 @@ function handleAndroidNativeInterception() { * Control either to enable or disable the native interception for iOS after the init method is called. */ function handleIOSNativeInterception(config: InstabugConfig) { - console.log( - `Andrew: handleIOSNativeInterception(${ - shouldEnableNativeInterception && - config.networkInterceptionMode === NetworkInterceptionMode.native - })`, - ); - if ( shouldEnableNativeInterception && config.networkInterceptionMode === NetworkInterceptionMode.native @@ -295,12 +261,6 @@ const handleInterceptionModeForIOS = (config: InstabugConfig) => { * Initializes Instabug with the given configuration. */ const initializeNativeInstabug = (config: InstabugConfig) => { - console.log( - `Andrew: initializeNativeInstabug -> NativeNetworkInterceptionMode ${ - shouldEnableNativeInterception && - config.networkInterceptionMode === NetworkInterceptionMode.native - }`, - ); NativeInstabug.init( config.token, config.invocationEvents, @@ -319,7 +279,6 @@ function refreshAPMNetworkConfigs(config: InstabugConfig, forceRefreshIOS: boole if (Platform.OS === 'ios' && forceRefreshIOS) { handleIOSNativeInterception(config); } - _logFlags(); setApmNetworkFlagsIfChanged({ isNativeInterceptionFeatureEnabled, hasAPMNetworkPlugin, @@ -339,10 +298,6 @@ function refreshAPMNetworkConfigs(config: InstabugConfig, forceRefreshIOS: boole function addOnFeatureUpdatedListener(config: InstabugConfig) { emitter.addListener(NativeEvents.IBG_ON_FEATURES_UPDATED_CALLBACK, (flags) => { const { cpNativeInterceptionEnabled, hasAPMPlugin } = flags; - console.log(`Andrew: addOnFeatureUpdatedListener -> - isNativeInterceptionFeatureEnabled: ${cpNativeInterceptionEnabled}, - hasAPMNetworkPlugin: ${hasAPMPlugin}. - `); isNativeInterceptionFeatureEnabled = cpNativeInterceptionEnabled; hasAPMNetworkPlugin = hasAPMPlugin; shouldEnableNativeInterception = diff --git a/src/modules/NetworkLogger.ts b/src/modules/NetworkLogger.ts index 25275fd2d..db5061da8 100644 --- a/src/modules/NetworkLogger.ts +++ b/src/modules/NetworkLogger.ts @@ -41,9 +41,6 @@ export const setEnabled = (isEnabled: boolean) => { try { if (_networkDataObfuscationHandler) { network = await _networkDataObfuscationHandler(network); - console.log( - `Andrew: xhr.setOnDoneCallback -> _networkDataObfuscationHandler ${network.url}`, - ); } if (network.requestBodySize > InstabugConstants.MAX_NETWORK_BODY_SIZE_IN_BYTES) { @@ -88,7 +85,6 @@ export const setEnabled = (isEnabled: boolean) => { * @param isEnabled */ export const setNativeInterceptionEnabled = (isEnabled: boolean) => { - console.log(`Andrew: NetworkLogger -> setNativeInterceptionEnabled ${isEnabled}`); _isNativeInterceptionEnabled = isEnabled; }; @@ -108,12 +104,8 @@ export const setNetworkDataObfuscationHandler = ( _networkDataObfuscationHandler = handler; if (_isNativeInterceptionEnabled && Platform.OS === 'ios') { if (hasFilterExpression) { - console.log( - 'Andrew: setNetworkDataObfuscationHandler -> registerFilteringAndObfuscationListenerV2', - ); registerFilteringAndObfuscationListener(_requestFilterExpression); } else { - console.log('Andrew: setNetworkDataObfuscationHandler -> registerObfuscationListener'); registerObfuscationListener(); } } @@ -129,12 +121,8 @@ export const setRequestFilterExpression = (expression: string) => { if (_isNativeInterceptionEnabled && Platform.OS === 'ios') { if (_networkDataObfuscationHandler) { - console.log( - 'Andrew: setRequestFilterExpression -> registerFilteringAndObfuscationListenerV2', - ); registerFilteringAndObfuscationListener(_requestFilterExpression); } else { - console.log('Andrew: setRequestFilterExpression -> registerFilteringListener'); registerFilteringListener(_requestFilterExpression); } } @@ -186,11 +174,8 @@ export const registerNetworkLogsListener = ( handler?: (networkSnapshot: NetworkData) => void, ) => { if (Platform.OS === 'ios') { - console.log('Andrew: registerNetworkLogsListener called'); - // remove old listeners if (NetworkLoggerEmitter.listenerCount(NativeNetworkLoggerEvent.NETWORK_LOGGER_HANDLER) > 0) { - console.log('Andrew: removeAllListeners called'); NetworkLoggerEmitter.removeAllListeners(NativeNetworkLoggerEvent.NETWORK_LOGGER_HANDLER); } @@ -201,7 +186,6 @@ export const registerNetworkLogsListener = ( // attach a new listener to the existing one. _networkListener = NetworkListenerType.both; } - console.log(`Andrew: new NetworkLogsListener (${_networkListener}) attached`); } NetworkLoggerEmitter.addListener( diff --git a/src/utils/InstabugUtils.ts b/src/utils/InstabugUtils.ts index 2b8e5a7f5..50ccc2426 100644 --- a/src/utils/InstabugUtils.ts +++ b/src/utils/InstabugUtils.ts @@ -171,15 +171,11 @@ export function isContentTypeNotAllowed(contentType: string) { return allowed.every((type) => !contentType.includes(type)); } -//todo: remove all logs tagged with 'Andrew' in the file export const reportNetworkLog = (network: NetworkData) => { if (Platform.OS === 'android') { const requestHeaders = JSON.stringify(network.requestHeaders); const responseHeaders = JSON.stringify(network.responseHeaders); - console.log('Andrew: ' + `NetworkLogger -> ${JSON.stringify(apmFlags)}`); - console.log('Andrew: ' + 'NetworkLogger -> NativeInstabug.networkLogAndroid'); - NativeInstabug.networkLogAndroid( network.url, network.requestBody, @@ -196,8 +192,6 @@ export const reportNetworkLog = (network: NetworkData) => { !apmFlags.hasAPMNetworkPlugin || !apmFlags.shouldEnableNativeInterception ) { - console.log('Andrew: ' + 'NetworkLogger -> NativeAPM.networkLogAndroid'); - console.log('Andrew: ' + `NetworkLogger -> ${network.url}`); NativeAPM.networkLogAndroid( network.startTime, network.duration, @@ -218,12 +212,6 @@ export const reportNetworkLog = (network: NetworkData) => { ); } } else { - console.log( - 'Andrew: ' + - `NetworkLogger -> {isNativeInterceptionEnabled: ${apmFlags.isNativeInterceptionFeatureEnabled}}`, - ); - console.log('Andrew: ' + 'NetworkLogger -> NativeInstabug.networkLogIOS'); - NativeInstabug.networkLogIOS( network.url, network.method, @@ -308,10 +296,6 @@ export function checkNetworkRequestHandlers() { const obfuscationHandler = NetworkLogger.getNetworkDataObfuscationHandler(); const hasFilterExpression = NetworkLogger.hasRequestFilterExpression(); - console.log( - `Andrew: handlers - {filtering = ${hasFilterExpression}, obfuscation = ${obfuscationHandler != null}}`, - ); if (hasFilterExpression && obfuscationHandler) { // Register listener that handles both (Filtering & Obfuscation) registerFilteringAndObfuscationListener(NetworkLogger.getRequestFilterExpression());