Skip to content

Commit f81b52d

Browse files
authored
Merge branch 'jwt/MOB-12298-new-improve-logger' into loren/embedded/MOB-12260-create-embedded-tab-in-example-app
2 parents 1ac7370 + 0af6532 commit f81b52d

2 files changed

Lines changed: 7 additions & 24 deletions

File tree

src/core/classes/Iterable.ts

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,23 @@ import { Linking, NativeEventEmitter, Platform } from 'react-native';
33
import { buildInfo } from '../../itblBuildInfo';
44

55
import { 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';
87
import { IterableInAppMessage } from '../../inApp/classes/IterableInAppMessage';
98
import { IterableInAppCloseSource } from '../../inApp/enums/IterableInAppCloseSource';
109
import { IterableInAppDeleteSource } from '../../inApp/enums/IterableInAppDeleteSource';
1110
import { IterableInAppLocation } from '../../inApp/enums/IterableInAppLocation';
1211
import { IterableAuthResponseResult } from '../enums/IterableAuthResponseResult';
1312
import { 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';
1814
import { IterableAction } from './IterableAction';
1915
import { IterableActionContext } from './IterableActionContext';
16+
import { IterableApi } from './IterableApi';
2017
import { IterableAttributionInfo } from './IterableAttributionInfo';
18+
import { IterableAuthManager } from './IterableAuthManager';
2119
import { IterableAuthResponse } from './IterableAuthResponse';
2220
import type { IterableCommerceItem } from './IterableCommerceItem';
2321
import { IterableConfig } from './IterableConfig';
2422
import { IterableLogger } from './IterableLogger';
25-
import type { IterableAuthFailure } from '../types/IterableAuthFailure';
26-
import { IterableAuthManager } from './IterableAuthManager';
27-
import { IterableApi } from './IterableApi';
2823

2924
const 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.

src/core/classes/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
export * from './Iterable';
22
export * from './IterableAction';
33
export * from './IterableActionContext';
4+
export * from './IterableApi';
45
export * from './IterableAttributionInfo';
6+
export * from './IterableAuthManager';
57
export * from './IterableAuthResponse';
68
export * from './IterableCommerceItem';
79
export * from './IterableConfig';

0 commit comments

Comments
 (0)