@thealteroffice/react-native-adgeist 0.0.14 → 0.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (24) hide show
  1. package/ios/generated/RNAdgeistSpec/RNAdgeistSpec-generated.mm +81 -0
  2. package/ios/generated/RNAdgeistSpec/RNAdgeistSpec.h +86 -0
  3. package/{android/app/build/generated/source/codegen/jni/react/renderer/components/RNAdgeistSpec → ios/generated}/RNAdgeistSpecJSI.h +1 -118
  4. package/lib/module/cdpclient/index.js +60 -4
  5. package/lib/module/cdpclient/index.js.map +1 -1
  6. package/lib/module/components/AdgeistProvider.js +57 -17
  7. package/lib/module/components/AdgeistProvider.js.map +1 -1
  8. package/lib/module/components/BannerAd.js +131 -58
  9. package/lib/module/components/BannerAd.js.map +1 -1
  10. package/lib/typescript/src/cdpclient/index.d.ts +20 -0
  11. package/lib/typescript/src/cdpclient/index.d.ts.map +1 -1
  12. package/lib/typescript/src/components/AdgeistProvider.d.ts +32 -3
  13. package/lib/typescript/src/components/AdgeistProvider.d.ts.map +1 -1
  14. package/lib/typescript/src/components/BannerAd.d.ts +56 -4
  15. package/lib/typescript/src/components/BannerAd.d.ts.map +1 -1
  16. package/package.json +1 -1
  17. package/src/cdpclient/index.ts +71 -8
  18. package/src/components/AdgeistProvider.tsx +77 -23
  19. package/src/components/BannerAd.tsx +176 -81
  20. package/android/app/build/generated/source/codegen/java/com/facebook/fbreact/specs/NativeAdgeistSpec.java +0 -63
  21. package/android/app/build/generated/source/codegen/jni/CMakeLists.txt +0 -36
  22. package/android/app/build/generated/source/codegen/jni/RNAdgeistSpec-generated.cpp +0 -68
  23. package/android/app/build/generated/source/codegen/jni/RNAdgeistSpec.h +0 -31
  24. /package/{android/app/build/generated/source/codegen/jni/react/renderer/components/RNAdgeistSpec → ios/generated}/RNAdgeistSpecJSI-generated.cpp +0 -0
@@ -1,23 +1,50 @@
1
- import React, { createContext, useContext, useEffect, useState } from 'react';
1
+ /**
2
+ * @module AdgeistProvider
3
+ * @description Context provider for Adgeist ad-serving configuration and initialization
4
+ */
5
+
6
+ import React, {
7
+ createContext,
8
+ useContext,
9
+ useEffect,
10
+ useState,
11
+ useCallback,
12
+ } from 'react';
2
13
  import Adgeist from '../NativeAdgeist';
3
14
  import { ConsentModal } from './ConsentModal';
4
15
 
16
+ /**
17
+ * Interface for Adgeist context
18
+ */
5
19
  interface AdgeistContextType {
6
20
  publisherId: string;
7
21
  apiKey: string;
8
22
  domain: string;
9
23
  isTestEnvironment: boolean;
10
24
  isInitialized: boolean;
25
+ initializationError?: Error;
11
26
  setAdgeistConsentModal: (value: boolean) => void;
12
27
  }
13
28
 
14
- interface AdgeistProviderPropsType {
29
+ /**
30
+ * Props for AdgeistProvider
31
+ */
32
+ interface AdgeistProviderProps {
15
33
  children: React.ReactNode;
34
+ /** Custom API origin for Adgeist SDK */
16
35
  customAdgeistApiOrigin?: string;
36
+ /** Publisher identifier */
17
37
  publisherId: string;
38
+ /** API key for authentication */
18
39
  apiKey: string;
40
+ /** Domain for ad serving */
19
41
  domain: string;
20
- isTestEnvironment: boolean;
42
+ /** Enable test environment mode */
43
+ isTestEnvironment?: boolean;
44
+ /** Callback for initialization errors */
45
+ onInitializationError?: (error: Error) => void;
46
+ /** Callback for successful initialization */
47
+ onInitializationSuccess?: () => void;
21
48
  }
22
49
 
23
50
  const AdgeistContext = createContext<AdgeistContextType>({
@@ -29,35 +56,51 @@ const AdgeistContext = createContext<AdgeistContextType>({
29
56
  setAdgeistConsentModal: () => {},
30
57
  });
31
58
 
32
- export const AdgeistProvider: React.FC<AdgeistProviderPropsType> = ({
59
+ /**
60
+ * AdgeistProvider component for managing ad-serving configuration
61
+ * @param props - Component properties
62
+ * @returns JSX.Element
63
+ */
64
+ export const AdgeistProvider: React.FC<AdgeistProviderProps> = ({
33
65
  children,
34
66
  publisherId = '',
35
67
  apiKey = '',
36
68
  domain = '',
37
69
  customAdgeistApiOrigin = 'bg-services-qa-api.adgeist.ai',
38
70
  isTestEnvironment = true,
71
+ onInitializationError,
72
+ onInitializationSuccess,
39
73
  }) => {
40
- const [isInitialized, setIsInitialized] = useState(false);
41
- const [adgeistConsentModal, setAdgeistConsentModal] = useState(false);
42
- const [isKotlinInitializationFailed, setIsKotlinInitializationFailed] =
43
- useState(false);
74
+ const [isInitialized, setIsInitialized] = useState<boolean>(false);
75
+ const [initializationError, setInitializationError] = useState<
76
+ Error | undefined
77
+ >();
78
+ const [adgeistConsentModal, setAdgeistConsentModal] =
79
+ useState<boolean>(false);
44
80
 
45
- useEffect(() => {
46
- const initializeAdgeist = async () => {
47
- setIsKotlinInitializationFailed(false);
48
- setIsInitialized(false);
81
+ /**
82
+ * Initializes Adgeist SDK
83
+ */
84
+ const initializeAdgeist = useCallback(async () => {
85
+ setInitializationError(undefined);
86
+ setIsInitialized(false);
49
87
 
50
- try {
51
- await Adgeist.initializeSdk(customAdgeistApiOrigin);
52
- setIsInitialized(true);
53
- } catch {
54
- setIsKotlinInitializationFailed(true);
55
- setIsInitialized(false);
56
- }
57
- };
88
+ try {
89
+ await Adgeist.initializeSdk(customAdgeistApiOrigin);
90
+ setIsInitialized(true);
91
+ onInitializationSuccess?.();
92
+ } catch (error: unknown) {
93
+ const err =
94
+ error instanceof Error ? error : new Error('Unknown error occurred');
95
+ setInitializationError(err);
96
+ setIsInitialized(false);
97
+ onInitializationError?.(err);
98
+ }
99
+ }, [customAdgeistApiOrigin, onInitializationError, onInitializationSuccess]);
58
100
 
101
+ useEffect(() => {
59
102
  initializeAdgeist();
60
- }, [customAdgeistApiOrigin]);
103
+ }, [initializeAdgeist]);
61
104
 
62
105
  return (
63
106
  <AdgeistContext.Provider
@@ -67,10 +110,11 @@ export const AdgeistProvider: React.FC<AdgeistProviderPropsType> = ({
67
110
  domain,
68
111
  isTestEnvironment,
69
112
  isInitialized,
113
+ initializationError,
70
114
  setAdgeistConsentModal,
71
115
  }}
72
116
  >
73
- {isKotlinInitializationFailed && <>{children}</>}
117
+ {initializationError && <>{children}</>}
74
118
 
75
119
  {isInitialized && (
76
120
  <>
@@ -82,4 +126,14 @@ export const AdgeistProvider: React.FC<AdgeistProviderPropsType> = ({
82
126
  );
83
127
  };
84
128
 
85
- export const useAdgeistContext = () => useContext(AdgeistContext);
129
+ /**
130
+ * Hook to access Adgeist context
131
+ * @returns AdgeistContextType
132
+ */
133
+ export const useAdgeistContext = () => {
134
+ const context = useContext(AdgeistContext);
135
+ if (!context) {
136
+ throw new Error('useAdgeistContext must be used within an AdgeistProvider');
137
+ }
138
+ return context;
139
+ };
@@ -1,4 +1,9 @@
1
- import React, { useEffect, useState } from 'react';
1
+ /**
2
+ * @module BannerAd
3
+ * @description A React Native component for displaying banner and video ads with robust error handling and analytics.
4
+ */
5
+
6
+ import React, { useCallback, useEffect, useState } from 'react';
2
7
  import {
3
8
  Image,
4
9
  Linking,
@@ -8,10 +13,13 @@ import {
8
13
  TouchableWithoutFeedback,
9
14
  ActivityIndicator,
10
15
  } from 'react-native';
16
+ import Video from 'react-native-video';
11
17
  import Adgeist from '../NativeAdgeist';
12
18
  import { useAdgeistContext } from './AdgeistProvider';
13
- import Video from 'react-native-video';
14
19
 
20
+ /**
21
+ * Interface for ad data structure
22
+ */
15
23
  interface AdData {
16
24
  id: string;
17
25
  bidId: string;
@@ -19,11 +27,17 @@ interface AdData {
19
27
  seatBid: SeatBid[];
20
28
  }
21
29
 
30
+ /**
31
+ * Interface for seat bid data
32
+ */
22
33
  interface SeatBid {
23
34
  bidId: string;
24
35
  bid: Bid[];
25
36
  }
26
37
 
38
+ /**
39
+ * Interface for individual bid
40
+ */
27
41
  interface Bid {
28
42
  id: string;
29
43
  impId: string;
@@ -31,6 +45,9 @@ interface Bid {
31
45
  ext: BidExtension;
32
46
  }
33
47
 
48
+ /**
49
+ * Interface for bid extension data
50
+ */
34
51
  interface BidExtension {
35
52
  creativeUrl: string;
36
53
  ctaUrl: string;
@@ -38,64 +55,91 @@ interface BidExtension {
38
55
  creativeDescription: string;
39
56
  creativeBrandName?: string;
40
57
  }
41
- interface AdBannerTypes {
58
+
59
+ /**
60
+ * Props for the BannerAd component
61
+ */
62
+ interface AdBannerProps {
63
+ /** Unique identifier for the ad slot */
42
64
  dataAdSlot: string;
43
- dataSlotType: 'banner' | 'video';
65
+ /** Type of ad to display */
66
+ dataSlotType?: 'banner' | 'video';
67
+ /** Width of the ad container */
44
68
  width?: number;
69
+ /** Height of the ad container */
45
70
  height?: number;
46
- isResponsive: boolean;
71
+ /** Enable responsive layout */
72
+ isResponsive?: boolean;
73
+ /** Responsive layout type */
47
74
  responsiveType?: 'SQUARE' | 'VERTICAL' | 'WIDE';
75
+ /** Callback for ad load errors */
76
+ onAdLoadError?: (error: Error) => void;
77
+ /** Callback for ad load success */
78
+ onAdLoadSuccess?: (adData: AdData) => void;
48
79
  }
49
80
 
50
- export const BannerAd: React.FC<AdBannerTypes> = ({
81
+ export const BannerAd: React.FC<AdBannerProps> = ({
51
82
  dataAdSlot,
52
83
  dataSlotType = 'banner',
53
84
  width = 0,
54
85
  height = 0,
55
86
  isResponsive = false,
56
87
  // responsiveType = 'SQUARE',
88
+ onAdLoadError,
89
+ onAdLoadSuccess,
57
90
  }) => {
58
91
  const [adData, setAdData] = useState<AdData | null>(null);
59
- const [isLoading, setIsLoading] = useState(false);
92
+ const [isMuted, setIsMuted] = useState<boolean>(false);
93
+ const [error, setError] = useState<Error | null>(null);
94
+ const [isLoading, setIsLoading] = useState<boolean>(false);
95
+
60
96
  const { isInitialized, publisherId, apiKey, domain, isTestEnvironment } =
61
97
  useAdgeistContext();
62
98
 
63
99
  const creativeData = adData?.seatBid?.[0]?.bid?.[0]?.ext as BidExtension;
64
100
 
65
- useEffect(() => {
66
- (async () => {
67
- try {
68
- if (isInitialized) {
69
- setIsLoading(true);
70
- const response: Object = await Adgeist.fetchCreative(
71
- apiKey,
72
- domain,
73
- dataAdSlot,
74
- publisherId,
75
- isTestEnvironment
76
- );
101
+ /**
102
+ * Fetches ad creative and sends impression analytics
103
+ */
104
+ const fetchAd = useCallback(async () => {
105
+ if (!isInitialized) return;
106
+
107
+ try {
108
+ setIsLoading(true);
109
+ setError(null);
110
+
111
+ const response = await Adgeist.fetchCreative(
112
+ apiKey,
113
+ domain,
114
+ dataAdSlot,
115
+ publisherId,
116
+ isTestEnvironment
117
+ );
77
118
 
78
- const creative: { data: AdData } = response as { data: AdData };
79
- setAdData(creative.data);
80
- setIsLoading(false);
119
+ const creative: { data: AdData } = response as { data: AdData };
120
+ setAdData(creative.data);
121
+ onAdLoadSuccess?.(creative.data);
81
122
 
82
- if (creative.data.seatBid.length > 0) {
83
- await Adgeist.sendCreativeAnalytic(
84
- creative.data.seatBid?.[0]?.bid?.[0]?.id || '',
85
- dataAdSlot,
86
- publisherId,
87
- 'IMPRESSION',
88
- domain,
89
- apiKey,
90
- creative.data.id,
91
- isTestEnvironment
92
- );
93
- }
94
- }
95
- } catch (error) {
96
- console.error('Ad load failed:', error);
123
+ if (creative.data.seatBid.length > 0) {
124
+ await Adgeist.sendCreativeAnalytic(
125
+ creative.data.seatBid?.[0]?.bid?.[0]?.id || '',
126
+ dataAdSlot,
127
+ publisherId,
128
+ 'IMPRESSION',
129
+ domain,
130
+ apiKey,
131
+ creative.data.id,
132
+ isTestEnvironment
133
+ );
97
134
  }
98
- })();
135
+ } catch (err) {
136
+ const error = err instanceof Error ? err : new Error('Ad load failed');
137
+ setError(error);
138
+ onAdLoadError?.(error);
139
+ console.error('Ad load failed:', error);
140
+ } finally {
141
+ setIsLoading(false);
142
+ }
99
143
  }, [
100
144
  isInitialized,
101
145
  publisherId,
@@ -103,25 +147,47 @@ export const BannerAd: React.FC<AdBannerTypes> = ({
103
147
  apiKey,
104
148
  domain,
105
149
  isTestEnvironment,
150
+ onAdLoadError,
151
+ onAdLoadSuccess,
106
152
  ]);
107
153
 
108
- const handleClick = async () => {
109
- if (adData && adData?.seatBid.length > 0) {
110
- await Adgeist.sendCreativeAnalytic(
111
- adData?.seatBid?.[0]?.bid?.[0]?.id || '',
112
- dataAdSlot,
113
- publisherId,
114
- 'CLICK',
115
- domain,
116
- apiKey,
117
- adData.id,
118
- isTestEnvironment
119
- );
120
- Linking.openURL(creativeData.ctaUrl).catch((err) =>
121
- console.error('Failed to open URL:', err)
122
- );
154
+ /**
155
+ * Handles ad click and sends click analytics
156
+ */
157
+ const handleClick = useCallback(async () => {
158
+ if (adData && adData.seatBid.length > 0) {
159
+ const bidId = adData.seatBid[0]?.bid[0]?.id;
160
+ if (!bidId) return;
161
+
162
+ try {
163
+ await Adgeist.sendCreativeAnalytic(
164
+ bidId,
165
+ dataAdSlot,
166
+ publisherId,
167
+ 'CLICK',
168
+ domain,
169
+ apiKey,
170
+ adData.id,
171
+ isTestEnvironment
172
+ );
173
+ await Linking.openURL(creativeData.ctaUrl);
174
+ } catch (err) {
175
+ console.error('Failed to handle ad click:', err);
176
+ }
123
177
  }
124
- };
178
+ }, [
179
+ adData,
180
+ dataAdSlot,
181
+ publisherId,
182
+ domain,
183
+ apiKey,
184
+ isTestEnvironment,
185
+ creativeData,
186
+ ]);
187
+
188
+ useEffect(() => {
189
+ fetchAd();
190
+ }, [fetchAd]);
125
191
 
126
192
  if (isLoading) {
127
193
  return (
@@ -136,7 +202,7 @@ export const BannerAd: React.FC<AdBannerTypes> = ({
136
202
  );
137
203
  }
138
204
 
139
- if (!creativeData?.creativeUrl) return null;
205
+ if (!creativeData?.creativeUrl || error) return null;
140
206
 
141
207
  return (
142
208
  <TouchableWithoutFeedback
@@ -152,16 +218,37 @@ export const BannerAd: React.FC<AdBannerTypes> = ({
152
218
  >
153
219
  {dataSlotType === 'banner' ? (
154
220
  <Image
155
- style={[styles.creative, { width: '100%', height: '70%' }]}
156
- source={{ uri: creativeData.creativeUrl }}
157
- />
158
- ) : (
159
- <Video
221
+ style={styles.creative}
160
222
  source={{ uri: creativeData.creativeUrl }}
223
+ accessibilityLabel="Ad Creative"
161
224
  resizeMode="contain"
162
- style={{ width: '100%', height: '70%' }}
163
- repeat={true}
225
+ onError={(e) =>
226
+ console.error('Image load error:', e.nativeEvent.error)
227
+ }
164
228
  />
229
+ ) : (
230
+ <View style={styles.videoCreative}>
231
+ <Video
232
+ source={{ uri: creativeData.creativeUrl }}
233
+ resizeMode="contain"
234
+ style={{ width: '100%', height: '100%' }}
235
+ repeat={true}
236
+ muted={isMuted}
237
+ onError={(e) => console.error('Video load error:', e)}
238
+ />
239
+
240
+ <TouchableWithoutFeedback onPress={() => setIsMuted(!isMuted)}>
241
+ <Image
242
+ style={styles.soundIcon}
243
+ source={{
244
+ uri: isMuted
245
+ ? 'https://d2cfeg6k9cklz9.cloudfront.net/ad-icons/Muted.png'
246
+ : 'https://d2cfeg6k9cklz9.cloudfront.net/ad-icons/Unmuted.png',
247
+ }}
248
+ accessibilityLabel={isMuted ? 'Unmute video' : 'Mute video'}
249
+ />
250
+ </TouchableWithoutFeedback>
251
+ </View>
165
252
  )}
166
253
 
167
254
  <View style={styles.adContent}>
@@ -186,18 +273,13 @@ export const BannerAd: React.FC<AdBannerTypes> = ({
186
273
  {creativeData?.creativeBrandName || 'Brand Name'}
187
274
  </Text>
188
275
  </View>
189
- <TouchableWithoutFeedback
190
- onPress={() => {
191
- handleClick();
192
- }}
193
- accessible
194
- accessibilityLabel="Visit Site Button"
195
- >
276
+ <TouchableWithoutFeedback onPress={handleClick}>
196
277
  <Image
197
- style={[styles.linkButton]}
278
+ style={styles.linkButton}
198
279
  source={{
199
280
  uri: 'https://d2cfeg6k9cklz9.cloudfront.net/onboarding-icons/Button.png',
200
281
  }}
282
+ accessibilityLabel="Visit Advertiser Site"
201
283
  />
202
284
  </TouchableWithoutFeedback>
203
285
  </View>
@@ -208,7 +290,7 @@ export const BannerAd: React.FC<AdBannerTypes> = ({
208
290
 
209
291
  const styles = StyleSheet.create({
210
292
  adContainer: {
211
- backgroundColor: 'white',
293
+ backgroundColor: '#FFFFFF',
212
294
  borderRadius: 5,
213
295
  },
214
296
  loadingOverlayContainer: {
@@ -218,13 +300,27 @@ const styles = StyleSheet.create({
218
300
  creative: {
219
301
  resizeMode: 'contain',
220
302
  borderTopLeftRadius: 5,
221
- backgroundColor: 'white',
303
+ backgroundColor: '#FFFFFF',
222
304
  borderTopRightRadius: 5,
305
+ width: '100%',
306
+ height: '70%',
307
+ },
308
+ videoCreative: {
309
+ position: 'relative',
310
+ width: '100%',
311
+ height: '70%',
312
+ },
313
+ soundIcon: {
314
+ position: 'absolute',
315
+ bottom: 10,
316
+ right: 10,
317
+ width: 30,
318
+ height: 30,
223
319
  },
224
320
  adContent: {
225
321
  width: '100%',
226
322
  height: '30%',
227
- backgroundColor: 'white',
323
+ backgroundColor: '#FFFFFF',
228
324
  flexDirection: 'row',
229
325
  justifyContent: 'space-between',
230
326
  paddingVertical: 10,
@@ -237,20 +333,19 @@ const styles = StyleSheet.create({
237
333
  width: '80%',
238
334
  },
239
335
  title: {
240
- color: 'black',
336
+ color: '#1A1A1A',
241
337
  fontSize: 18,
242
- fontWeight: 'bold',
338
+ fontWeight: '600',
243
339
  },
244
340
  description: {
245
- color: 'black',
341
+ color: '#4A4A4A',
246
342
  fontSize: 16,
343
+ marginBottom: 4,
247
344
  },
248
345
  brandName: {
249
- color: 'black',
250
- fontSize: 16,
251
- opacity: 0.6,
252
- marginTop: 5,
253
- fontWeight: 'semibold',
346
+ color: '#6B7280',
347
+ fontSize: 14,
348
+ textTransform: 'uppercase',
254
349
  },
255
350
  linkButton: {
256
351
  width: 40,
@@ -1,63 +0,0 @@
1
-
2
- /**
3
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
- *
5
- * Do not edit this file as changes may cause incorrect behavior and will be lost
6
- * once the code is regenerated.
7
- *
8
- * @generated by codegen project: GenerateModuleJavaSpec.js
9
- *
10
- * @nolint
11
- */
12
-
13
- package com.facebook.fbreact.specs;
14
-
15
- import com.facebook.proguard.annotations.DoNotStrip;
16
- import com.facebook.react.bridge.Promise;
17
- import com.facebook.react.bridge.ReactApplicationContext;
18
- import com.facebook.react.bridge.ReactContextBaseJavaModule;
19
- import com.facebook.react.bridge.ReactMethod;
20
- import com.facebook.react.bridge.ReadableMap;
21
- import com.facebook.react.turbomodule.core.interfaces.TurboModule;
22
- import javax.annotation.Nonnull;
23
-
24
- public abstract class NativeAdgeistSpec extends ReactContextBaseJavaModule implements TurboModule {
25
- public static final String NAME = "Adgeist";
26
-
27
- public NativeAdgeistSpec(ReactApplicationContext reactContext) {
28
- super(reactContext);
29
- }
30
-
31
- @Override
32
- public @Nonnull String getName() {
33
- return NAME;
34
- }
35
-
36
- @ReactMethod
37
- @DoNotStrip
38
- public abstract void initializeSdk(String customDomain, Promise promise);
39
-
40
- @ReactMethod
41
- @DoNotStrip
42
- public abstract void fetchCreative(String apiKey, String origin, String adSpaceId, String publisherId, boolean isTestEnvironment, Promise promise);
43
-
44
- @ReactMethod
45
- @DoNotStrip
46
- public abstract void sendCreativeAnalytic(String campaignId, String adSpaceId, String publisherId, String eventType, String origin, String apiKey, String bidId, boolean isTestEnvironment, Promise promise);
47
-
48
- @ReactMethod
49
- @DoNotStrip
50
- public abstract void setUserDetails(ReadableMap user);
51
-
52
- @ReactMethod
53
- @DoNotStrip
54
- public abstract void logEvent(ReadableMap event);
55
-
56
- @ReactMethod
57
- @DoNotStrip
58
- public abstract void getConsentStatus(Promise promise);
59
-
60
- @ReactMethod
61
- @DoNotStrip
62
- public abstract void updateConsentStatus(boolean consent);
63
- }
@@ -1,36 +0,0 @@
1
- # Copyright (c) Meta Platforms, Inc. and affiliates.
2
- #
3
- # This source code is licensed under the MIT license found in the
4
- # LICENSE file in the root directory of this source tree.
5
-
6
- cmake_minimum_required(VERSION 3.13)
7
- set(CMAKE_VERBOSE_MAKEFILE on)
8
-
9
- file(GLOB react_codegen_SRCS CONFIGURE_DEPENDS *.cpp react/renderer/components/RNAdgeistSpec/*.cpp)
10
-
11
- add_library(
12
- react_codegen_RNAdgeistSpec
13
- OBJECT
14
- ${react_codegen_SRCS}
15
- )
16
-
17
- target_include_directories(react_codegen_RNAdgeistSpec PUBLIC . react/renderer/components/RNAdgeistSpec)
18
-
19
- target_link_libraries(
20
- react_codegen_RNAdgeistSpec
21
- fbjni
22
- jsi
23
- # We need to link different libraries based on whether we are building rncore or not, that's necessary
24
- # because we want to break a circular dependency between react_codegen_rncore and reactnative
25
- reactnative
26
- )
27
-
28
- target_compile_options(
29
- react_codegen_RNAdgeistSpec
30
- PRIVATE
31
- -DLOG_TAG=\"ReactNative\"
32
- -fexceptions
33
- -frtti
34
- -std=c++20
35
- -Wall
36
- )