Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
040c681
Bump datadog SDK package versions, add flags SDK
yugisu-flux Dec 1, 2025
c45b654
Initial Android implementation
yugisu-flux Dec 2, 2025
7094828
Remove `customFlagsHeaders` from iOS wrapper configuration
yugisu-flux Dec 3, 2025
54d1324
Update Flags SDK to evaluate feature flags synchronously
yugisu-flux Dec 3, 2025
d5848d7
FFL-1460 Track sync flag evaluations
yugisu-flux Dec 3, 2025
696b72c
FFL-1460 Remove `get*Details` methods from DdFlagsImplementation
yugisu-flux Dec 3, 2025
b7cebb4
Support the `client.getFlagsDetails` -> `client.getAllFlagsDetails` r…
yugisu-flux Dec 8, 2025
709c53a
Merge remote-tracking branch 'origin/dima/FFL-906-implement-flags-rea…
yugisu-flux Dec 8, 2025
2adedb0
Cast to FlagsClientInternal when using "internal" iOS APIs
yugisu-flux Dec 9, 2025
9651bd6
Merge branch 'dima/FFL-1256-implement-flags-react-native-android-wrap…
yugisu-flux Dec 9, 2025
8f78e64
FFL-1460 Implement a proper Android wrapper, update the flags caching…
yugisu-flux Dec 11, 2025
8462236
FFL-1460 Small changes to building Flags configuration
yugisu-flux Dec 11, 2025
4ae663b
Update iOS wrapper code with the changes to the exposed API
yugisu-flux Dec 11, 2025
8b78731
Move extension methods to the general file, add tests for them
yugisu-flux Dec 11, 2025
b695366
Move PrecomputedFlag from internal packages, minor changes
yugisu-flux Dec 11, 2025
06ed0cb
Fix build issues
yugisu-flux Dec 11, 2025
d9debbf
Rename of iOS methods
yugisu-flux Dec 15, 2025
62b258f
Remove usage of `_getInternal()` in favor of using `_FlagsInternalPro…
yugisu-flux Dec 15, 2025
62a43df
Update Android implementation to use UnparsedFlag
yugisu-flux Dec 16, 2025
00f6af2
Update Android implementation to use the setEvaluationContext callback
yugisu-flux Jan 5, 2026
3f5b5c9
FFL-1460 Update tests to accomodate new FlagsClient changes
yugisu-flux Jan 7, 2026
dbb65b0
Merge branch 'dima/update-flags-with-latest-v3' into dima/FFL-1460-sy…
yugisu-flux Jan 7, 2026
7cc7a1d
Merge branch 'dima/update-flags-with-latest-v3' into dima/FFL-1460-sy…
yugisu-flux Jan 7, 2026
f5f5291
Lock iOS deps to a specific commit
yugisu-flux Jan 7, 2026
e147449
Cut Android implementation to a separate PR
yugisu-flux Jan 7, 2026
bb3fcb6
Rename DatadogFlags -> DdFlags
yugisu-flux Jan 12, 2026
8996a36
Update example apps with better usages of flags
yugisu-flux Jan 12, 2026
1cb346b
Fix React Native hot reload issue
yugisu-flux Jan 12, 2026
e766f27
Fix failing iOS tests
yugisu-flux Jan 13, 2026
2cc11d6
Bump iOS SDK to 3.5.0
yugisu-flux Jan 14, 2026
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
52 changes: 35 additions & 17 deletions example-new-architecture/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ import {
DdLogs,
DdTrace,
RumConfiguration,
DatadogFlags,
DdFlags,
} from '@datadog/mobile-react-native';
import React from 'react';
import type {PropsWithChildren} from 'react';
import {
ActivityIndicator,
SafeAreaView,
ScrollView,
StatusBar,
Expand Down Expand Up @@ -92,29 +93,43 @@ function Section({children, title}: SectionProps): React.JSX.Element {
}

function App(): React.JSX.Element {
const [testFlagValue, setTestFlagValue] = React.useState(false);
const [isInitialized, setIsInitialized] = React.useState(false);

React.useEffect(() => {
(async () => {
await DatadogFlags.enable();

const flagsClient = DatadogFlags.getClient();
await flagsClient.setEvaluationContext({
targetingKey: 'test-user-1',
attributes: {
country: 'US',
},
});
const flag = await flagsClient.getBooleanDetails('rn-sdk-test-boolean-flag', false); // https://app.datadoghq.com/feature-flags/046d0e70-626d-41e1-8314-3f009fb79b7a?environmentId=d114cd9a-79ed-4c56-bcf3-bcac9293653b
setTestFlagValue(flag.value);
})();
(async () => {
// This is a blocking async app initialization effect.
// It simulates the way most React Native applications are initialized.
await DdFlags.enable();
const client = DdFlags.getClient();

const userId = 'test-user-1';
const userAttributes = {
country: 'US',
};

await client.setEvaluationContext({targetingKey: userId, attributes: userAttributes});

setIsInitialized(true);
})().catch(console.error);
}, []);

const isDarkMode = useColorScheme() === 'dark';

const backgroundStyle = {
backgroundColor: isDarkMode ? Colors.darker : Colors.lighter,
};

if (!isInitialized) {
return (
<SafeAreaView style={{height: '100%', justifyContent: 'center'}}>
<ActivityIndicator />
</SafeAreaView>
);
}

// TODO: [FFL-908] Use OpenFeature SDK instead of a manual client call.
const testFlagKey = 'rn-sdk-test-json-flag';
const testFlag = DdFlags.getClient().getObjectValue(testFlagKey, {greeting: "Default greeting"}); // https://app.datadoghq.com/feature-flags/bcf75cd6-96d8-4182-8871-0b66ad76127a?environmentId=d114cd9a-79ed-4c56-bcf3-bcac9293653b

return (
<SafeAreaView style={backgroundStyle}>
<StatusBar
Expand All @@ -125,11 +140,14 @@ function App(): React.JSX.Element {
contentInsetAdjustmentBehavior="automatic"
style={backgroundStyle}>
<Header />
<Text style={{ marginTop: 20 }}>rn-sdk-test-boolean-flag: {String(testFlagValue)}</Text>
<View
style={{
backgroundColor: isDarkMode ? Colors.black : Colors.white,
}}>
<Section title="Feature Flags">
Flag value for <Text style={styles.highlight}>{testFlagKey}</Text> is{'\n'}
<Text style={styles.highlight}>{JSON.stringify(testFlag)}</Text>
</Section>
<Section title="Step One">
Edit <Text style={styles.highlight}>App.tsx</Text> to change this
screen and then come back to see your edits.
Expand Down
103 changes: 57 additions & 46 deletions example-new-architecture/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
PODS:
- boost (1.84.0)
- DatadogCore (3.4.0):
- DatadogInternal (= 3.4.0)
- DatadogCrashReporting (3.4.0):
- DatadogInternal (= 3.4.0)
- PLCrashReporter (~> 1.12.0)
- DatadogFlags (3.4.0):
- DatadogInternal (= 3.4.0)
- DatadogInternal (3.4.0)
- DatadogLogs (3.4.0):
- DatadogInternal (= 3.4.0)
- DatadogRUM (3.4.0):
- DatadogInternal (= 3.4.0)
- DatadogCore (3.5.0):
- DatadogInternal (= 3.5.0)
- DatadogCrashReporting (3.5.0):
- DatadogInternal (= 3.5.0)
- KSCrash/Filters (= 2.5.0)
- KSCrash/Recording (= 2.5.0)
- DatadogFlags (3.5.0):
- DatadogInternal (= 3.5.0)
- DatadogInternal (3.5.0)
- DatadogLogs (3.5.0):
- DatadogInternal (= 3.5.0)
- DatadogRUM (3.5.0):
- DatadogInternal (= 3.5.0)
- DatadogSDKReactNative (2.13.2):
- DatadogCore (= 3.4.0)
- DatadogCrashReporting (= 3.4.0)
- DatadogFlags (= 3.4.0)
- DatadogLogs (= 3.4.0)
- DatadogRUM (= 3.4.0)
- DatadogTrace (= 3.4.0)
- DatadogWebViewTracking (= 3.4.0)
- DatadogCore (= 3.5.0)
- DatadogCrashReporting (= 3.5.0)
- DatadogFlags (= 3.5.0)
- DatadogLogs (= 3.5.0)
- DatadogRUM (= 3.5.0)
- DatadogTrace (= 3.5.0)
- DatadogWebViewTracking (= 3.5.0)
- DoubleConversion
- glog
- hermes-engine
Expand All @@ -41,13 +42,13 @@ PODS:
- ReactCommon/turbomodule/core
- Yoga
- DatadogSDKReactNative/Tests (2.13.2):
- DatadogCore (= 3.4.0)
- DatadogCrashReporting (= 3.4.0)
- DatadogFlags (= 3.4.0)
- DatadogLogs (= 3.4.0)
- DatadogRUM (= 3.4.0)
- DatadogTrace (= 3.4.0)
- DatadogWebViewTracking (= 3.4.0)
- DatadogCore (= 3.5.0)
- DatadogCrashReporting (= 3.5.0)
- DatadogFlags (= 3.5.0)
- DatadogLogs (= 3.5.0)
- DatadogRUM (= 3.5.0)
- DatadogTrace (= 3.5.0)
- DatadogWebViewTracking (= 3.5.0)
- DoubleConversion
- glog
- hermes-engine
Expand All @@ -68,11 +69,11 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- DatadogTrace (3.4.0):
- DatadogInternal (= 3.4.0)
- OpenTelemetrySwiftApi (= 1.13.1)
- DatadogWebViewTracking (3.4.0):
- DatadogInternal (= 3.4.0)
- DatadogTrace (3.5.0):
- DatadogInternal (= 3.5.0)
- OpenTelemetry-Swift-Api (~> 2.3.0)
- DatadogWebViewTracking (3.5.0):
- DatadogInternal (= 3.5.0)
- DoubleConversion (1.1.6)
- fast_float (6.1.4)
- FBLazyVector (0.76.9)
Expand All @@ -81,8 +82,18 @@ PODS:
- hermes-engine (0.76.9):
- hermes-engine/Pre-built (= 0.76.9)
- hermes-engine/Pre-built (0.76.9)
- OpenTelemetrySwiftApi (1.13.1)
- PLCrashReporter (1.12.0)
- KSCrash/Core (2.5.0)
- KSCrash/Filters (2.5.0):
- KSCrash/Recording
- KSCrash/RecordingCore
- KSCrash/ReportingCore
- KSCrash/Recording (2.5.0):
- KSCrash/RecordingCore
- KSCrash/RecordingCore (2.5.0):
- KSCrash/Core
- KSCrash/ReportingCore (2.5.0):
- KSCrash/Core
- OpenTelemetry-Swift-Api (2.3.0)
- RCT-Folly (2024.10.14.00):
- boost
- DoubleConversion
Expand Down Expand Up @@ -1716,8 +1727,8 @@ SPEC REPOS:
- DatadogRUM
- DatadogTrace
- DatadogWebViewTracking
- OpenTelemetrySwiftApi
- PLCrashReporter
- KSCrash
- OpenTelemetry-Swift-Api
- SocketRocket

EXTERNAL SOURCES:
Expand Down Expand Up @@ -1855,23 +1866,23 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
boost: 1dca942403ed9342f98334bf4c3621f011aa7946
DatadogCore: 8c384b6338c49534e43fdf7f9a0508b62bf1d426
DatadogCrashReporting: 103bfb4077db2ccee1846f71e53712972732d3b7
DatadogFlags: fbc8dc0e5e387c6c8e15a0afa39d067107e2e7ce
DatadogInternal: b0372935ad8dde5ad06960fe8d88c39b2cc92bcc
DatadogLogs: 484bb1bfe0c9a7cb2a7d9733f61614e8ea7b2f3a
DatadogRUM: 00069b27918e0ce4a9223b87b4bfa7929d6a0a1f
DatadogSDKReactNative: 7625fa42b4600102f01a3eee16162db6e51d86ff
DatadogTrace: 852cb80f9370eb1321eb30a73c82c8e3d9e4e980
DatadogWebViewTracking: 32dfeaf7aad47a605a689ed12e0d21ee8eb56141
DatadogCore: 4cbe2646591d2f96fb3188400863ec93ac411235
DatadogCrashReporting: e48da3f880a59d2aa2d04e5034e56507177e9d64
DatadogFlags: f8cf88371460d6c672abfd97fdc9af5be208f33b
DatadogInternal: 63308b529cd87fb2f99c5961d9ff13afb300a3aa
DatadogLogs: be538def1d5204e011f7952915ad0261014a0dd5
DatadogRUM: cffc65659ce29546fcc2639a74003135259548fc
DatadogSDKReactNative: 5d210f3aa609cec39909ecc3d378d950b69172fe
DatadogTrace: 085e35f9e4889f82f8a747922c58ea4b19728720
DatadogWebViewTracking: 61b8344da898cbaccffc75bc1a17c86175e8573a
DoubleConversion: f16ae600a246532c4020132d54af21d0ddb2a385
fast_float: 06eeec4fe712a76acc9376682e4808b05ce978b6
FBLazyVector: 7605ea4810e0e10ae4815292433c09bf4324ba45
fmt: 01b82d4ca6470831d1cc0852a1af644be019e8f6
glog: 08b301085f15bcbb6ff8632a8ebaf239aae04e6a
hermes-engine: 9e868dc7be781364296d6ee2f56d0c1a9ef0bb11
OpenTelemetrySwiftApi: aaee576ed961e0c348af78df58b61300e95bd104
PLCrashReporter: db59ef96fa3d25f3650040d02ec2798cffee75f2
KSCrash: 80e1e24eaefbe5134934ae11ca8d7746586bc2ed
OpenTelemetry-Swift-Api: 3d77582ab6837a63b65bf7d2eacc57d8f2595edd
RCT-Folly: 7b4f73a92ad9571b9dbdb05bb30fad927fa971e1
RCTDeprecation: ebe712bb05077934b16c6bf25228bdec34b64f83
RCTRequired: ca91e5dd26b64f577b528044c962baf171c6b716
Expand Down
Loading