cloudx-react-native 3.4.4 → 3.4.6
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.
- package/android/build.gradle +1 -1
- package/cloudx-react-native.podspec +1 -1
- package/ios/CloudX.mm +39 -7
- package/lib/commonjs/version.js +5 -2
- package/lib/commonjs/version.js.map +1 -1
- package/lib/module/version.js +5 -2
- package/lib/module/version.js.map +1 -1
- package/lib/typescript/src/version.d.ts +1 -1
- package/lib/typescript/src/version.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/version.ts +5 -2
package/android/build.gradle
CHANGED
package/ios/CloudX.mm
CHANGED
|
@@ -1421,22 +1421,54 @@ RCT_EXPORT_METHOD(destroyRewarded:(NSString *)adUnitIdentifier)
|
|
|
1421
1421
|
return [self deepestPresentedViewControllerFrom: [self keyWindowRootViewController]];
|
|
1422
1422
|
}
|
|
1423
1423
|
|
|
1424
|
-
/// Scene-based key-window lookup (iOS 13+)
|
|
1425
|
-
///
|
|
1426
|
-
///
|
|
1424
|
+
/// Scene-based key-window lookup (iOS 13+) with progressive fallbacks. Resolves the
|
|
1425
|
+
/// window at call time so callers never hold a stale reference.
|
|
1426
|
+
///
|
|
1427
|
+
/// The strict "foreground-active scene + isKeyWindow" path holds on the New
|
|
1428
|
+
/// Architecture (Fabric), but a New-Architecture-style key window is not always
|
|
1429
|
+
/// reported on the Old Architecture (Paper): the host window created by
|
|
1430
|
+
/// RCTAppDelegate may not flag isKeyWindow at the moment a fullscreen ad is shown,
|
|
1431
|
+
/// which previously left interstitial/rewarded ads with no presenter and surfaced
|
|
1432
|
+
/// as a "no visible view controller" display failure. Fall back through
|
|
1433
|
+
/// progressively looser candidates so a valid root is found on both architectures.
|
|
1427
1434
|
- (nullable UIViewController *)keyWindowRootViewController
|
|
1428
1435
|
{
|
|
1429
|
-
|
|
1436
|
+
NSArray<UIScene *> *scenes = UIApplication.sharedApplication.connectedScenes.allObjects;
|
|
1437
|
+
|
|
1438
|
+
// Priority 1: key window of a foreground-active window scene (the common case).
|
|
1439
|
+
// Priority 2: any window with a root in a foreground-active scene (OldArch).
|
|
1440
|
+
UIViewController *foregroundFallback = nil;
|
|
1441
|
+
for ( UIScene *scene in scenes )
|
|
1430
1442
|
{
|
|
1431
1443
|
if ( scene.activationState != UISceneActivationStateForegroundActive ) continue;
|
|
1432
1444
|
if ( ![scene isKindOfClass: [UIWindowScene class]] ) continue;
|
|
1433
1445
|
|
|
1434
|
-
|
|
1435
|
-
for ( UIWindow *window in windowScene.windows )
|
|
1446
|
+
for ( UIWindow *window in ((UIWindowScene *)scene).windows )
|
|
1436
1447
|
{
|
|
1437
|
-
if ( window.isKeyWindow ) return window.rootViewController;
|
|
1448
|
+
if ( window.isKeyWindow && window.rootViewController ) return window.rootViewController;
|
|
1449
|
+
if ( !foregroundFallback && window.rootViewController ) foregroundFallback = window.rootViewController;
|
|
1438
1450
|
}
|
|
1439
1451
|
}
|
|
1452
|
+
if ( foregroundFallback ) return foregroundFallback;
|
|
1453
|
+
|
|
1454
|
+
// Priority 3: any window scene regardless of activation state.
|
|
1455
|
+
for ( UIScene *scene in scenes )
|
|
1456
|
+
{
|
|
1457
|
+
if ( ![scene isKindOfClass: [UIWindowScene class]] ) continue;
|
|
1458
|
+
for ( UIWindow *window in ((UIWindowScene *)scene).windows )
|
|
1459
|
+
{
|
|
1460
|
+
if ( window.rootViewController ) return window.rootViewController;
|
|
1461
|
+
}
|
|
1462
|
+
}
|
|
1463
|
+
|
|
1464
|
+
// Priority 4: the app delegate's window (classic non-scene window setup).
|
|
1465
|
+
id<UIApplicationDelegate> appDelegate = UIApplication.sharedApplication.delegate;
|
|
1466
|
+
if ( [appDelegate respondsToSelector: @selector(window)] )
|
|
1467
|
+
{
|
|
1468
|
+
UIWindow *window = appDelegate.window;
|
|
1469
|
+
if ( window.rootViewController ) return window.rootViewController;
|
|
1470
|
+
}
|
|
1471
|
+
|
|
1440
1472
|
return nil;
|
|
1441
1473
|
}
|
|
1442
1474
|
|
package/lib/commonjs/version.js
CHANGED
|
@@ -5,6 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.PLUGIN_VERSION = void 0;
|
|
7
7
|
// Keep PLUGIN_VERSION in sync with the `version` field in package.json.
|
|
8
|
-
// Phase 1
|
|
9
|
-
|
|
8
|
+
// RELEASE.md Phase 1 bumps both together (see the Version Files table).
|
|
9
|
+
// This value is reported to the native SDK in CloudX.initialize() and is used
|
|
10
|
+
// for wrapper-version telemetry/attribution, so a stale value mis-attributes
|
|
11
|
+
// installs to the wrong release.
|
|
12
|
+
const PLUGIN_VERSION = exports.PLUGIN_VERSION = '3.4.6';
|
|
10
13
|
//# sourceMappingURL=version.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["PLUGIN_VERSION","exports"],"sourceRoot":"../../src","sources":["version.ts"],"mappings":";;;;;;AAAA;AACA;AACO,MAAMA,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG,OAAO","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["PLUGIN_VERSION","exports"],"sourceRoot":"../../src","sources":["version.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACO,MAAMA,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG,OAAO","ignoreList":[]}
|
package/lib/module/version.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
// Keep PLUGIN_VERSION in sync with the `version` field in package.json.
|
|
2
|
-
// Phase 1
|
|
3
|
-
|
|
2
|
+
// RELEASE.md Phase 1 bumps both together (see the Version Files table).
|
|
3
|
+
// This value is reported to the native SDK in CloudX.initialize() and is used
|
|
4
|
+
// for wrapper-version telemetry/attribution, so a stale value mis-attributes
|
|
5
|
+
// installs to the wrong release.
|
|
6
|
+
export const PLUGIN_VERSION = '3.4.6';
|
|
4
7
|
//# sourceMappingURL=version.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["PLUGIN_VERSION"],"sourceRoot":"../../src","sources":["version.ts"],"mappings":"AAAA;AACA;AACA,OAAO,MAAMA,cAAc,GAAG,OAAO","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["PLUGIN_VERSION"],"sourceRoot":"../../src","sources":["version.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,cAAc,GAAG,OAAO","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const PLUGIN_VERSION = "3.4.
|
|
1
|
+
export declare const PLUGIN_VERSION = "3.4.6";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../src/version.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../src/version.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,cAAc,UAAU,CAAC"}
|
package/package.json
CHANGED
package/src/version.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
// Keep PLUGIN_VERSION in sync with the `version` field in package.json.
|
|
2
|
-
// Phase 1
|
|
3
|
-
|
|
2
|
+
// RELEASE.md Phase 1 bumps both together (see the Version Files table).
|
|
3
|
+
// This value is reported to the native SDK in CloudX.initialize() and is used
|
|
4
|
+
// for wrapper-version telemetry/attribution, so a stale value mis-attributes
|
|
5
|
+
// installs to the wrong release.
|
|
6
|
+
export const PLUGIN_VERSION = '3.4.6';
|