Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

snaphot: d11-14.2.1 #1344

Draft
wants to merge 5 commits into
base: dream11
Choose a base branch
from
Draft
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
8 changes: 1 addition & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -419,7 +419,7 @@ jobs:
command: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
- run:
name: Publish new enterprise version
command: npm publish
command: npm publish --tag snapshot

publish:
macos:
@@ -613,15 +613,9 @@ workflows:
- e2e_android_dream11
- e2e_ios_dream11
type: approval
filters:
branches:
only: dream11
- release_custom_package:
name: release_dream11
requires:
- hold_release_dream11
filters:
branches:
only: dream11
prepare_steps:
- prepare_dream11
6 changes: 5 additions & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
@@ -52,7 +52,11 @@ android {

compileSdkVersion getExtOrDefault('compileSdkVersion').toInteger()
buildToolsVersion getExtOrDefault('buildToolsVersion')

testOptions {
unitTests {
returnDefaultValues = true
}
}
defaultConfig {
minSdkVersion getExtOrDefault('minSdkVersion').toInteger()
targetSdkVersion getExtOrDefault('targetSdkVersion').toInteger()
2 changes: 1 addition & 1 deletion android/native.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
project.ext.instabug = [
version: '14.0.2.1'
version: '14.2.0.1'
]

dependencies {
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package com.instabug.reactlibrary;


import android.util.Log;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

@@ -18,6 +20,7 @@
import com.instabug.library.sessionreplay.model.SessionMetadata;
import com.instabug.reactlibrary.utils.EventEmitterModule;
import com.instabug.reactlibrary.utils.MainThreadHandler;

import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CountDownLatch;
@@ -120,34 +123,34 @@ public void onSessionReplayLinkReady(@Nullable String link) {

}

public ReadableMap getSessionMetadataMap(SessionMetadata sessionMetadata){
public ReadableMap getSessionMetadataMap(SessionMetadata sessionMetadata) {
WritableMap params = Arguments.createMap();
params.putString("appVersion",sessionMetadata.getAppVersion());
params.putString("OS",sessionMetadata.getOs());
params.putString("device",sessionMetadata.getDevice());
params.putDouble("sessionDurationInSeconds",(double)sessionMetadata.getSessionDurationInSeconds());
params.putBoolean("hasLinkToAppReview",sessionMetadata.getLinkedToReview());
params.putArray("networkLogs",getNetworkLogsArray(sessionMetadata.getNetworkLogs()));
params.putString("appVersion", sessionMetadata.getAppVersion());
params.putString("OS", sessionMetadata.getOs());
params.putString("device", sessionMetadata.getDevice());
params.putDouble("sessionDurationInSeconds", (double) sessionMetadata.getSessionDurationInSeconds());
params.putBoolean("hasLinkToAppReview", sessionMetadata.getLinkedToReview());
params.putArray("networkLogs", getNetworkLogsArray(sessionMetadata.getNetworkLogs()));

String launchType = sessionMetadata.getLaunchType();
Long launchDuration = sessionMetadata.getLaunchDuration();

if (launchType != null) {
params.putString("launchType",ArgsRegistry.launchTypeReversed.get(sessionMetadata.getLaunchType()) );
params.putString("launchType", ArgsRegistry.launchTypeReversed.get(sessionMetadata.getLaunchType()));
} else {
params.putString("launchType",ArgsRegistry.launchType.get("unknown"));
params.putString("launchType", ArgsRegistry.launchType.get("unknown"));
}

if (launchDuration != null) {
params.putDouble("launchDuration", (double)launchDuration);
params.putDouble("launchDuration", (double) launchDuration);
} else {
params.putDouble("launchDuration", 0.0);
}

return params;
}

public ReadableArray getNetworkLogsArray(List<SessionMetadata.NetworkLog> networkLogList ) {
public ReadableArray getNetworkLogsArray(List<SessionMetadata.NetworkLog> networkLogList) {
WritableArray networkLogs = Arguments.createArray();

if (networkLogList != null) {
@@ -166,6 +169,7 @@ public ReadableArray getNetworkLogsArray(List<SessionMetadata.NetworkLog> networ

private boolean shouldSync = true;
private CountDownLatch latch;

@ReactMethod
public void setSyncCallback() {
MainThreadHandler.runOnMainThread(new Runnable() {
@@ -176,22 +180,28 @@ public void run() {
@Override
public boolean onSessionReadyToSync(@NonNull SessionMetadata sessionMetadata) {

sendEvent(Constants.IBG_SESSION_REPLAY_ON_SYNC_CALLBACK_INVOCATION,getSessionMetadataMap(sessionMetadata));
Log.v("IBG-RN", "The android callback is called");

sendEvent(Constants.IBG_SESSION_REPLAY_ON_SYNC_CALLBACK_INVOCATION, getSessionMetadataMap(sessionMetadata));

latch = new CountDownLatch(1);

try {
Log.v("IBG-RN", "waiting for RN callback");

latch.await();

} catch (InterruptedException e) {
e.printStackTrace();
return true;
}

Log.v("IBG-RN", "The onSessionReadyToSync returned with " + shouldSync);

return shouldSync;
}
});
}
catch(Exception e){
} catch (Exception e) {
e.printStackTrace();
}

@@ -202,12 +212,12 @@ public boolean onSessionReadyToSync(@NonNull SessionMetadata sessionMetadata) {
@ReactMethod
public void evaluateSync(boolean result) {
shouldSync = result;
Log.v("IBG-RN", "The RN evaluateSync returned with " + result);

if (latch != null) {
latch.countDown();
}
}



}
2 changes: 1 addition & 1 deletion examples/default/ios/Podfile
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ target 'InstabugExample' do
config = use_native_modules!
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/dream11/14.0.0/Instabug.podspec'
pod 'Instabug', :podspec => 'https://ios-releases.instabug.com/custom/dream11/14.0.0/Instabug.podspec'
# Flags change depending on the env values.
flags = get_default_flags()

12 changes: 7 additions & 5 deletions examples/default/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1602,7 +1602,7 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- RNInstabug (14.0.2):
- RNInstabug (14.2.1-SNAPSHOT):
- Instabug (= 14.0.0)
- React-Core
- RNReanimated (3.16.1):
@@ -1747,6 +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/dream11/14.0.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`)
@@ -1825,7 +1826,6 @@ SPEC REPOS:
trunk:
- Google-Maps-iOS-Utils
- GoogleMaps
- Instabug
- OCMock
- SocketRocket

@@ -1843,6 +1843,8 @@ EXTERNAL SOURCES:
hermes-engine:
: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/dream11/14.0.0/Instabug.podspec
instabug-reactnative-ndk:
:path: "../node_modules/instabug-reactnative-ndk"
RCT-Folly:
@@ -1993,7 +1995,7 @@ SPEC CHECKSUMS:
Google-Maps-iOS-Utils: f77eab4c4326d7e6a277f8e23a0232402731913a
GoogleMaps: 032f676450ba0779bd8ce16840690915f84e57ac
hermes-engine: ea92f60f37dba025e293cbe4b4a548fd26b610a0
Instabug: a0beffc01658773e2fac549845782f8937707dc4
Instabug: 88b979bbd80e12580254585b99402a60f680d959
instabug-reactnative-ndk: d765ac289d56e8896398d02760d9abf2562fc641
OCMock: 589f2c84dacb1f5aaf6e4cec1f292551fe748e74
RCT-Folly: 4464f4d875961fce86008d45f4ecf6cef6de0740
@@ -2059,14 +2061,14 @@ SPEC CHECKSUMS:
ReactCommon: 6a952e50c2a4b694731d7682aaa6c79bc156e4ad
RNCClipboard: 2821ac938ef46f736a8de0c8814845dde2dcbdfb
RNGestureHandler: 511250b190a284388f9dd0d2e56c1df76f14cfb8
RNInstabug: 6660dcbf339b47468206d37659c67977b143484e
RNInstabug: 7a5c07f970be44aa73d2698a79a1d6954d929800
RNReanimated: f42a5044d121d68e91680caacb0293f4274228eb
RNScreens: c7ceced6a8384cb9be5e7a5e88e9e714401fd958
RNSVG: 8b1a777d54096b8c2a0fd38fc9d5a454332bbb4d
RNVectorIcons: 6382277afab3c54658e9d555ee0faa7a37827136
SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d
Yoga: 055f92ad73f8c8600a93f0e25ac0b2344c3b07e6

PODFILE CHECKSUM: e337c2376579dfe7bf7bbaaeb766b185ea3fc261
PODFILE CHECKSUM: a0fb4e0c8e6dcbeb77d9fab053936b2d0f2395a2

COCOAPODS: 1.14.0
2 changes: 1 addition & 1 deletion examples/default/yarn.lock
Original file line number Diff line number Diff line change
@@ -4411,7 +4411,7 @@ inline-style-prefixer@^6.0.1:

"instabug-reactnative-ndk@github:https://github.com/Instabug/Instabug-React-Native-NDK":
version "0.1.0"
resolved "https://codeload.github.com/Instabug/Instabug-React-Native-NDK/tar.gz/f1c06b354156d7ea301a361d3f246b38dc2aea51"
resolved "https://codeload.github.com/Instabug/Instabug-React-Native-NDK/tar.gz/d1bd019a5d0292eaac96ffd70fd584eeed0ef32e"

"instabug-reactnative@link:../..":
version "0.0.0"
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "instabug-reactnative",
"description": "React Native plugin for integrating the Instabug SDK",
"version": "14.0.2",
"version": "14.2.1-SNAPSHOT",
"author": "Instabug (https://instabug.com)",
"repository": "github:Instabug/Instabug-React-Native",
"homepage": "https://www.instabug.com/platforms/react-native",
2 changes: 1 addition & 1 deletion scripts/dream-11-delete-unused-features.sh
Original file line number Diff line number Diff line change
@@ -59,4 +59,4 @@ node scripts/replace.js "return (major == 7 && minor >= 3) || major >= 8" "retur
node scripts/replace.js "static boolean supportsNamespace() {" "$(printf "static boolean supportsNamespace() {\n return false")" android/build.gradle

# Add Dream11 custom iOS build podspec to Podfile
node scripts/replace.js "target 'InstabugExample' do" "$(printf "target 'InstabugExample' do\n pod 'Instabug', :podspec => 'https://ios-releases.instabug.com/custom/dream11/Instabug.podspec'")" examples/default/ios/Podfile
#node scripts/replace.js "target 'InstabugExample' do" "$(printf "target 'InstabugExample' do\n pod 'Instabug', :podspec => 'https://ios-releases.instabug.com/custom/dream11/Instabug.podspec'")" examples/default/ios/Podfile
2 changes: 2 additions & 0 deletions src/modules/SessionReplay.ts
Original file line number Diff line number Diff line change
@@ -94,6 +94,7 @@ export const getSessionReplayLink = async (): Promise<string> => {
export const setSyncCallback = async (
handler: (payload: SessionMetadata) => boolean,
): Promise<void> => {
emitter.removeAllListeners(NativeEvents.SESSION_REPLAY_ON_SYNC_CALLBACK_INVOCATION);
emitter.addListener(NativeEvents.SESSION_REPLAY_ON_SYNC_CALLBACK_INVOCATION, (payload) => {
const result = handler(payload);
const shouldSync = Boolean(result);
@@ -104,6 +105,7 @@ export const setSyncCallback = async (
);
}

console.warn('IBG-RN: The callback passed to SessionReplay.setSyncCallback');
NativeSessionReplay.evaluateSync(shouldSync);
});