@@ -3,28 +3,23 @@ import { Linking, NativeEventEmitter, Platform } from 'react-native';
33import { buildInfo } from '../../itblBuildInfo' ;
44
55import { RNIterableAPI } from '../../api' ;
6- // TODO: Organize these so that there are no circular dependencies
7- // See https://github.com/expo/expo/issues/35100
6+ import { IterableInAppManager } from '../../inApp/classes/IterableInAppManager' ;
87import { IterableInAppMessage } from '../../inApp/classes/IterableInAppMessage' ;
98import { IterableInAppCloseSource } from '../../inApp/enums/IterableInAppCloseSource' ;
109import { IterableInAppDeleteSource } from '../../inApp/enums/IterableInAppDeleteSource' ;
1110import { IterableInAppLocation } from '../../inApp/enums/IterableInAppLocation' ;
1211import { IterableAuthResponseResult } from '../enums/IterableAuthResponseResult' ;
1312import { IterableEventName } from '../enums/IterableEventName' ;
14-
15- // Add this type-only import to avoid circular dependency
16- import type { IterableInAppManager } from '../../inApp/classes/IterableInAppManager' ;
17-
13+ import type { IterableAuthFailure } from '../types/IterableAuthFailure' ;
1814import { IterableAction } from './IterableAction' ;
1915import { IterableActionContext } from './IterableActionContext' ;
16+ import { IterableApi } from './IterableApi' ;
2017import { IterableAttributionInfo } from './IterableAttributionInfo' ;
18+ import { IterableAuthManager } from './IterableAuthManager' ;
2119import { IterableAuthResponse } from './IterableAuthResponse' ;
2220import type { IterableCommerceItem } from './IterableCommerceItem' ;
2321import { IterableConfig } from './IterableConfig' ;
2422import { IterableLogger } from './IterableLogger' ;
25- import type { IterableAuthFailure } from '../types/IterableAuthFailure' ;
26- import { IterableAuthManager } from './IterableAuthManager' ;
27- import { IterableApi } from './IterableApi' ;
2823
2924const RNEventEmitter = new NativeEventEmitter ( RNIterableAPI ) ;
3025
@@ -69,21 +64,7 @@ export class Iterable {
6964 * Iterable.inAppManager.showMessage(message, true);
7065 * ```
7166 */
72- static get inAppManager ( ) {
73- // Lazy initialization to avoid circular dependency
74- if ( ! this . _inAppManager ) {
75- // Import here to avoid circular dependency at module level
76-
77- const {
78- IterableInAppManager,
79- // eslint-disable-next-line @typescript-eslint/no-var-requires,@typescript-eslint/no-require-imports
80- } = require ( '../../inApp/classes/IterableInAppManager' ) ;
81- this . _inAppManager = new IterableInAppManager ( ) ;
82- }
83- return this . _inAppManager ;
84- }
85-
86- private static _inAppManager : IterableInAppManager | undefined ;
67+ static inAppManager : IterableInAppManager = new IterableInAppManager ( ) ;
8768
8869 /**
8970 * Authentication manager for the current user.
0 commit comments