nitro-google-mobile-ads-pangle 0.0.0-stage → 0.1.0
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/LICENSE +21 -0
- package/Package.swift +109 -0
- package/README.md +14 -2
- package/android/build.gradle +7 -0
- package/android/src/main/java/com/margelo/nitro/googlemobileadspangle/HybridPangleMediation.kt +10 -0
- package/ios/HybridPangleMediation.swift +13 -0
- package/nitro.json +8 -0
- package/nitrogen/generated/.gitattributes +1 -0
- package/nitrogen/generated/android/NitroGoogleMobileAdsPangle+autolinking.cmake +27 -0
- package/nitrogen/generated/android/NitroGoogleMobileAdsPangle+autolinking.gradle +10 -0
- package/nitrogen/generated/android/NitroGoogleMobileAdsPangleOnLoad.cpp +18 -0
- package/nitrogen/generated/android/c++/JHybridPangleMediationSpec.cpp +70 -0
- package/nitrogen/generated/android/c++/include/NitroGoogleMobileAdsPangle/private/JHybridPangleMediationSpec.hpp +84 -0
- package/nitrogen/generated/android/c++/include/NitroGoogleMobileAdsPangle/private/JHybridPangleMediationSpecJavaPart.hpp +26 -0
- package/nitrogen/generated/android/include/NitroGoogleMobileAdsPangle/private/NitroGoogleMobileAdsPangleOnLoad.hpp +13 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemobileadspangle/HybridPangleMediationSpec.kt +81 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemobileadspangle/NitroGoogleMobileAdsPangleOnLoad.kt +22 -0
- package/nitrogen/generated/apple/NitroGoogleMobileAdsPangle-Swift-Cxx-Bridge.cpp +20 -0
- package/nitrogen/generated/apple/NitroGoogleMobileAdsPangleAppleCxx/NitroGoogleMobileAdsPangleAppleCxx.cpp +9 -0
- package/nitrogen/generated/apple/NitroGoogleMobileAdsPangleAppleCxx/include/NitroGoogleMobileAdsPangleAppleCxx/NitroGoogleMobileAdsPangleAppleCxx.h +29 -0
- package/nitrogen/generated/apple/NitroGoogleMobileAdsPangleAutolinking.cpp +20 -0
- package/nitrogen/generated/apple/NitroGoogleMobileAdsPangleAutolinking.mm +24 -0
- package/nitrogen/generated/apple/c++/HybridPangleMediationSpecSwift.cpp +36 -0
- package/nitrogen/generated/apple/c++/HybridPangleMediationSpec_cxx-Swift.cpp +28 -0
- package/nitrogen/generated/apple/c++/include/NitroGoogleMobileAdsPangle/NitroGoogleMobileAdsPangleAutolinking.hpp +13 -0
- package/nitrogen/generated/apple/c++/include/NitroGoogleMobileAdsPangle/private/HybridPangleMediationSpecSwift.hpp +72 -0
- package/nitrogen/generated/apple/c++/include/NitroGoogleMobileAdsPangle/private/HybridPangleMediationSpec_cxx-Swift.hpp +23 -0
- package/nitrogen/generated/apple/c++/include/NitroGoogleMobileAdsPangle/private/NitroGoogleMobileAdsPangle-Swift-Cxx-Umbrella.hpp +33 -0
- package/nitrogen/generated/apple/c++/include/module.modulemap +12 -0
- package/nitrogen/generated/apple/swift/HybridPangleMediationSpec.swift +65 -0
- package/nitrogen/generated/apple/swift/HybridPangleMediationSpec_cxx.swift +138 -0
- package/nitrogen/generated/hybrid-classes.json +19 -0
- package/nitrogen/generated/shared/c++/NitroGoogleMobileAdsPangleCxxModule.cpp +2 -0
- package/nitrogen/generated/shared/c++/include/NitroGoogleMobileAdsPangle/NitroGoogleMobileAdsPangleCxxModule.hpp +2 -0
- package/nitrogen/generated/shared/javascript/PangleMediation.cjs +19 -0
- package/nitrogen/generated/shared/javascript/PangleMediation.d.cts +9 -0
- package/package.json +42 -4
- package/src/PangleMediation.nitro.ts +11 -0
- package/src/index.ts +1 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Kazutoyo Tokai
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/Package.swift
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
// swift-tools-version: 6.4
|
|
2
|
+
|
|
3
|
+
import Foundation
|
|
4
|
+
import PackageDescription
|
|
5
|
+
|
|
6
|
+
let name = "NitroGoogleMobileAdsPangle"
|
|
7
|
+
let generated = "nitrogen/generated"
|
|
8
|
+
let nitroDependencies: [Target.Dependency] = [
|
|
9
|
+
.product(name: "NitroModules", package: "nitro-core")
|
|
10
|
+
]
|
|
11
|
+
let cxxSettings: [CXXSetting] = [
|
|
12
|
+
.define("DEBUG", .when(configuration: .debug)),
|
|
13
|
+
.define("NDEBUG", .when(configuration: .release)),
|
|
14
|
+
.disableWarning("nullability-extension"),
|
|
15
|
+
]
|
|
16
|
+
let swiftSources = ["ios", "\(generated)/apple/swift"]
|
|
17
|
+
let bridgeSources = ["c++", "NitroGoogleMobileAdsPangle-Swift-Cxx-Bridge.cpp", "NitroGoogleMobileAdsPangleAutolinking.cpp"]
|
|
18
|
+
// Bare-host integration. Nitrogen generates the bindings; this manifest owns the targets.
|
|
19
|
+
let package = Package(
|
|
20
|
+
name: name,
|
|
21
|
+
platforms: [.iOS(.v16), .macOS(.v13)],
|
|
22
|
+
products: [
|
|
23
|
+
.library(name: name, targets: ["\(name)Cxx", name, "\(name)SwiftBridge"])
|
|
24
|
+
],
|
|
25
|
+
dependencies: [
|
|
26
|
+
.package(path: "../nitro-core"),
|
|
27
|
+
.package(url: "https://github.com/googleads/googleads-mobile-ios-mediation-pangle.git", exact: "8.4.00900"),
|
|
28
|
+
.package(url: "https://github.com/googleads/swift-package-manager-google-mobile-ads.git", "13.0.0"..<"14.0.0"),
|
|
29
|
+
],
|
|
30
|
+
targets: [
|
|
31
|
+
.target(
|
|
32
|
+
name: "\(name)Cxx",
|
|
33
|
+
dependencies: nitroDependencies,
|
|
34
|
+
path: "\(generated)/shared/c++",
|
|
35
|
+
exclude: ["include"],
|
|
36
|
+
publicHeadersPath: "include",
|
|
37
|
+
cxxSettings: cxxSettings
|
|
38
|
+
),
|
|
39
|
+
.target(
|
|
40
|
+
name: "\(name)AppleCxx",
|
|
41
|
+
dependencies: [.target(name: "\(name)Cxx")] + nitroDependencies,
|
|
42
|
+
path: "\(generated)/apple/\(name)AppleCxx",
|
|
43
|
+
cxxSettings: cxxSettings
|
|
44
|
+
),
|
|
45
|
+
.target(
|
|
46
|
+
name: name,
|
|
47
|
+
dependencies: [
|
|
48
|
+
.target(name: "\(name)AppleCxx"),
|
|
49
|
+
.product(name: "PangleAdapterTarget", package: "googleads-mobile-ios-mediation-pangle"),
|
|
50
|
+
.product(name: "GoogleMobileAds", package: "swift-package-manager-google-mobile-ads"),
|
|
51
|
+
] + nitroDependencies,
|
|
52
|
+
path: ".",
|
|
53
|
+
exclude: excludes(in: ".", keeping: swiftSources),
|
|
54
|
+
sources: swiftSources,
|
|
55
|
+
cxxSettings: cxxSettings,
|
|
56
|
+
swiftSettings: [
|
|
57
|
+
// UIKit implementations run synchronously on the host's main thread.
|
|
58
|
+
.swiftLanguageMode(.v5),
|
|
59
|
+
.unsafeFlags(["-strict-concurrency=minimal"]),
|
|
60
|
+
.enableUpcomingFeature("InternalImportsByDefault"),
|
|
61
|
+
// TODO: Nitrogen's Swift for a spec with only static members uses `margelo.nitro`
|
|
62
|
+
// without importing NitroModulesAppleCxx, which this feature rejects. Re-enable once fixed.
|
|
63
|
+
.interoperabilityMode(.Cxx),
|
|
64
|
+
.unsafeFlags(["-Xfrontend", "-clang-header-expose-decls=has-expose-attr-or-stdlib"]),
|
|
65
|
+
.unsafeFlags([
|
|
66
|
+
"-Xfrontend", "-clang-header-expose-module",
|
|
67
|
+
"-Xfrontend", "NitroModules=NitroModules-Swift.h",
|
|
68
|
+
]),
|
|
69
|
+
],
|
|
70
|
+
// The adapter is a static archive, and GMA finds its class by name at runtime. Nothing
|
|
71
|
+
// references the class, so -ObjC keeps the linker from stripping it.
|
|
72
|
+
linkerSettings: [.unsafeFlags(["-ObjC"])]
|
|
73
|
+
),
|
|
74
|
+
.target(
|
|
75
|
+
name: "\(name)SwiftBridge",
|
|
76
|
+
dependencies: [.target(name: name), .target(name: "\(name)AppleCxx")] + nitroDependencies,
|
|
77
|
+
path: "\(generated)/apple",
|
|
78
|
+
exclude: excludes(in: "\(generated)/apple", keeping: bridgeSources) + ["c++/include"],
|
|
79
|
+
sources: bridgeSources,
|
|
80
|
+
publicHeadersPath: "c++/include",
|
|
81
|
+
cxxSettings: cxxSettings + [
|
|
82
|
+
.unsafeFlags(["-I${GENERATED_MODULEMAP_DIR}", "-fno-modules"])
|
|
83
|
+
]
|
|
84
|
+
),
|
|
85
|
+
],
|
|
86
|
+
cxxLanguageStandard: .cxx20
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
func excludes(in path: String, keeping sources: [String]) -> [String] {
|
|
90
|
+
var parents: Set<String> = [""]
|
|
91
|
+
for source in sources {
|
|
92
|
+
var components = source.split(separator: "/").dropLast()
|
|
93
|
+
while !components.isEmpty {
|
|
94
|
+
parents.insert(components.joined(separator: "/"))
|
|
95
|
+
components = components.dropLast()
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
let root = URL(fileURLWithPath: Context.packageDirectory).appendingPathComponent(path)
|
|
99
|
+
return parents.sorted().flatMap { parent in
|
|
100
|
+
let entries =
|
|
101
|
+
(try? FileManager.default.contentsOfDirectory(
|
|
102
|
+
atPath: root.appendingPathComponent(parent).path)) ?? []
|
|
103
|
+
return entries.sorted().compactMap { entry in
|
|
104
|
+
let entryPath = parent.isEmpty ? entry : "\(parent)/\(entry)"
|
|
105
|
+
return entry.hasPrefix(".") || sources.contains(entryPath) || parents.contains(entryPath)
|
|
106
|
+
? nil : entryPath
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
package/README.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
-
#
|
|
1
|
+
# nitro-google-mobile-ads-pangle
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Optional Pangle mediation for [nitro-google-mobile-ads](https://github.com/kazutoyo/nitro-google-mobile-ads).
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
bun add nitro-google-mobile-ads-pangle
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Follow the [mediation guide](https://github.com/kazutoyo/nitro-google-mobile-ads/blob/main/packages/nitro-google-mobile-ads/MEDIATION.md) for native setup and AdMob configuration.
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import { PangleMediation } from 'nitro-google-mobile-ads-pangle'
|
|
13
|
+
|
|
14
|
+
console.log(PangleMediation.adapterVersion)
|
|
15
|
+
```
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
dependencies {
|
|
2
|
+
implementation("com.google.ads.mediation:pangle:8.4.0.5.0") {
|
|
3
|
+
// The Next-Gen SDK (from nitro-google-mobile-ads) contains the classes adapters need.
|
|
4
|
+
exclude group: "com.google.android.gms", module: "play-services-ads"
|
|
5
|
+
exclude group: "com.google.android.gms", module: "play-services-ads-lite"
|
|
6
|
+
}
|
|
7
|
+
}
|
package/android/src/main/java/com/margelo/nitro/googlemobileadspangle/HybridPangleMediation.kt
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
package com.margelo.nitro.googlemobileadspangle
|
|
2
|
+
|
|
3
|
+
import com.google.ads.mediation.pangle.PangleMediationAdapter
|
|
4
|
+
|
|
5
|
+
class HybridPangleMediation : HybridPangleMediationSpec() {
|
|
6
|
+
companion object : HybridPangleMediationSpec.Companion {
|
|
7
|
+
override val adapterVersion: String?
|
|
8
|
+
get() = PangleMediationAdapter().getVersionInfo().let { "${it.majorVersion}.${it.minorVersion}.${it.microVersion}" }
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
internal import Foundation
|
|
2
|
+
internal import GoogleMobileAds
|
|
3
|
+
|
|
4
|
+
final class HybridPangleMediation: HybridPangleMediationSpec {
|
|
5
|
+
static var adapterVersion: String? {
|
|
6
|
+
// The adapter's headers only forward-declare its class, so look it up the way GMA does.
|
|
7
|
+
guard let adapter = NSClassFromString("GADMediationAdapterPangle") as? any MediationAdapter.Type else {
|
|
8
|
+
return nil
|
|
9
|
+
}
|
|
10
|
+
let v = adapter.adapterVersion()
|
|
11
|
+
return "\(v.majorVersion).\(v.minorVersion).\(v.patchVersion)"
|
|
12
|
+
}
|
|
13
|
+
}
|
package/nitro.json
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://nitro.margelo.com/nitro.schema.json",
|
|
3
|
+
"environment": "bare",
|
|
4
|
+
"cxxNamespace": ["googlemobileadspangle"],
|
|
5
|
+
"apple": { "moduleName": "NitroGoogleMobileAdsPangle" },
|
|
6
|
+
"android": { "namespace": ["googlemobileadspangle"], "cxxLibName": "NitroGoogleMobileAdsPangle" },
|
|
7
|
+
"ignorePaths": ["**/node_modules", "**/.build", "**/.swiftpm"]
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
** linguist-generated=true
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
#
|
|
2
|
+
# NitroGoogleMobileAdsPangle+autolinking.cmake
|
|
3
|
+
# This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
# https://github.com/margelo/nitro
|
|
5
|
+
# Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
#
|
|
7
|
+
|
|
8
|
+
target_compile_features(NitroGoogleMobileAdsPangle PUBLIC cxx_std_20)
|
|
9
|
+
target_include_directories(NitroGoogleMobileAdsPangle PRIVATE
|
|
10
|
+
"${CMAKE_CURRENT_LIST_DIR}/../shared/c++/include"
|
|
11
|
+
"${CMAKE_CURRENT_LIST_DIR}/c++/include"
|
|
12
|
+
"${CMAKE_CURRENT_LIST_DIR}/include"
|
|
13
|
+
)
|
|
14
|
+
target_sources(NitroGoogleMobileAdsPangle PRIVATE
|
|
15
|
+
"${CMAKE_CURRENT_LIST_DIR}/NitroGoogleMobileAdsPangleOnLoad.cpp"
|
|
16
|
+
"${CMAKE_CURRENT_LIST_DIR}/../android/c++/JHybridPangleMediationSpec.cpp"
|
|
17
|
+
"${CMAKE_CURRENT_LIST_DIR}/../shared/c++/NitroGoogleMobileAdsPangleCxxModule.cpp"
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
find_package(fbjni REQUIRED CONFIG)
|
|
21
|
+
find_package(nitro-core REQUIRED CONFIG)
|
|
22
|
+
|
|
23
|
+
target_link_libraries(NitroGoogleMobileAdsPangle
|
|
24
|
+
fbjni::fbjni
|
|
25
|
+
nitro-core::NitroModules
|
|
26
|
+
|
|
27
|
+
)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroGoogleMobileAdsPangle+autolinking.gradle
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/margelo/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
// Resolve beside this script so custom Nitrogen output directories work too.
|
|
9
|
+
def nitrogenDirectory = buildscript.sourceFile.parentFile
|
|
10
|
+
android.sourceSets.main.java.srcDirs += [new File(nitrogenDirectory, 'kotlin')]
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroGoogleMobileAdsPangleOnLoad.cpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/margelo/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#include <NitroGoogleMobileAdsPangle/private/NitroGoogleMobileAdsPangleOnLoad.hpp>
|
|
9
|
+
#include <NitroModules/HybridClassRegistry.hpp>
|
|
10
|
+
#include <NitroGoogleMobileAdsPangle/private/JHybridPangleMediationSpec.hpp>
|
|
11
|
+
|
|
12
|
+
namespace margelo::nitro::googlemobileadspangle {
|
|
13
|
+
void registerAllNatives() {
|
|
14
|
+
margelo::nitro::googlemobileadspangle::JHybridPangleMediationSpec::CxxPart::registerNatives();
|
|
15
|
+
|
|
16
|
+
HybridClassRegistry::registerHybridClass("googlemobileadspangle.PangleMediation", JHybridPangleMediationSpec::Class::get());
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JHybridPangleMediationSpec.cpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/margelo/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#include <NitroGoogleMobileAdsPangle/private/JHybridPangleMediationSpec.hpp>
|
|
9
|
+
#include <NitroModules/JNIConverter+String.hpp>
|
|
10
|
+
#include <NitroModules/JSIConverter+JString.hpp>
|
|
11
|
+
#include <NitroModules/JNIConverter+Optional.hpp>
|
|
12
|
+
#include <NitroModules/JSIConverter+JOptional.hpp>
|
|
13
|
+
|
|
14
|
+
namespace margelo::nitro::googlemobileadspangle {
|
|
15
|
+
|
|
16
|
+
JHybridPangleMediationSpec::~JHybridPangleMediationSpec() = default;
|
|
17
|
+
|
|
18
|
+
jni::local_ref<JOptional<jni::JString>> JHybridPangleMediationSpec::getAdapterVersion() {
|
|
19
|
+
static const auto __method = JHybridPangleMediationSpec::JavaPart::javaClassStatic()->getStaticMethod<jni::local_ref<JOptional<jni::JString>>()>("getAdapterVersion_cxx");
|
|
20
|
+
auto __result = __method(JHybridPangleMediationSpec::JavaPart::javaClassStatic());
|
|
21
|
+
return __result;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const std::shared_ptr<const HybridClass>& JHybridPangleMediationSpec::Class::get() {
|
|
25
|
+
static const auto hybridClass = HybridClass::create<Class>([](HybridClass& clazz) {
|
|
26
|
+
clazz.registerStaticHybridProperty("adapterVersion", &JHybridPangleMediationSpec::getAdapterVersion);
|
|
27
|
+
});
|
|
28
|
+
return hybridClass;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
std::shared_ptr<JHybridPangleMediationSpec> JHybridPangleMediationSpecJavaPart::getJHybridPangleMediationSpec() {
|
|
32
|
+
auto hybridObject = JHybridObject::JavaPart::getJHybridObject();
|
|
33
|
+
auto castHybridObject = std::dynamic_pointer_cast<JHybridPangleMediationSpec>(hybridObject);
|
|
34
|
+
if (castHybridObject == nullptr) [[unlikely]] {
|
|
35
|
+
throw std::runtime_error("Failed to downcast JHybridObject to JHybridPangleMediationSpec!");
|
|
36
|
+
}
|
|
37
|
+
return castHybridObject;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
jni::local_ref<JHybridPangleMediationSpec::CxxPart::jhybriddata> JHybridPangleMediationSpec::CxxPart::initHybrid(jni::alias_ref<jhybridobject> jThis) {
|
|
41
|
+
return makeCxxInstance(jThis);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
jni::alias_ref<jni::JClass> JHybridPangleMediationSpec::CxxPart::getClass() {
|
|
45
|
+
static const auto __field = CxxPart::javaClassStatic()->getStaticField<jni::JClass>("implementationClass_cxx");
|
|
46
|
+
static const auto __class = jni::make_global(CxxPart::javaClassStatic()->getStaticFieldValue(__field));
|
|
47
|
+
return __class;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
std::shared_ptr<JHybridObject> JHybridPangleMediationSpec::CxxPart::createHybridObject(jni::alias_ref<JHybridObject::JavaPart> javaPart) {
|
|
51
|
+
auto castJavaPart = jni::dynamic_ref_cast<JHybridPangleMediationSpec::JavaPart>(javaPart);
|
|
52
|
+
if (castJavaPart == nullptr) [[unlikely]] {
|
|
53
|
+
throw std::runtime_error("Failed to cast JHybridObject::JavaPart to JHybridPangleMediationSpec::JavaPart!");
|
|
54
|
+
}
|
|
55
|
+
return std::make_shared<JHybridPangleMediationSpec>(castJavaPart);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
void JHybridPangleMediationSpec::CxxPart::registerNatives() {
|
|
59
|
+
registerHybrid({
|
|
60
|
+
makeNativeMethod("initHybrid", JHybridPangleMediationSpec::CxxPart::initHybrid),
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// Properties
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
// Methods
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
} // namespace margelo::nitro::googlemobileadspangle
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JHybridPangleMediationSpec.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/margelo/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <NitroModules/JHybridObject.hpp>
|
|
11
|
+
#include <NitroModules/HybridClass.hpp>
|
|
12
|
+
#include <fbjni/fbjni.h>
|
|
13
|
+
#include <stdexcept>
|
|
14
|
+
#include <NitroGoogleMobileAdsPangle/private/JHybridPangleMediationSpecJavaPart.hpp>
|
|
15
|
+
#include <NitroModules/JNIConverter+String.hpp>
|
|
16
|
+
#include <NitroModules/JSIConverter+JString.hpp>
|
|
17
|
+
#include <NitroModules/JNIConverter+Optional.hpp>
|
|
18
|
+
#include <NitroModules/JSIConverter+JOptional.hpp>
|
|
19
|
+
#include <NitroGoogleMobileAdsPangle/private/JHybridPangleMediationSpec.hpp>
|
|
20
|
+
|
|
21
|
+
namespace margelo::nitro::googlemobileadspangle {
|
|
22
|
+
|
|
23
|
+
namespace jni = facebook::jni;
|
|
24
|
+
|
|
25
|
+
class JHybridPangleMediationSpec final : public JHybridObject {
|
|
26
|
+
public:
|
|
27
|
+
struct Class {
|
|
28
|
+
using Base = JHybridObject::Class;
|
|
29
|
+
static constexpr const char* name = "PangleMediation";
|
|
30
|
+
static const std::shared_ptr<const HybridClass>& get();
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
public:
|
|
34
|
+
using JavaPart = JHybridPangleMediationSpecJavaPart;
|
|
35
|
+
struct CxxPart : public jni::HybridClass<CxxPart, JHybridObject::CxxPart> {
|
|
36
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/googlemobileadspangle/HybridPangleMediationSpec$CxxPart;";
|
|
37
|
+
static jni::local_ref<jhybriddata> initHybrid(jni::alias_ref<jhybridobject> jThis);
|
|
38
|
+
static void registerNatives();
|
|
39
|
+
static jni::alias_ref<jni::JClass> getClass();
|
|
40
|
+
using HybridBase::HybridBase;
|
|
41
|
+
protected:
|
|
42
|
+
std::shared_ptr<JHybridObject> createHybridObject(jni::alias_ref<JHybridObject::JavaPart> javaPart) override;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
public:
|
|
46
|
+
explicit JHybridPangleMediationSpec(jni::alias_ref<JHybridPangleMediationSpec::JavaPart> javaPart):
|
|
47
|
+
JHybridObject(javaPart),
|
|
48
|
+
_javaPart(jni::static_ref_cast<JavaPart>(JHybridObject::getJavaPart())) {
|
|
49
|
+
#ifdef NITRO_DEBUG
|
|
50
|
+
if (!jni::isSameObject(_javaPart->getClass(), CxxPart::getClass())) [[unlikely]] {
|
|
51
|
+
throw std::runtime_error("PangleMediation requires its configured implementation when inheritance and multiple implementations are disabled.");
|
|
52
|
+
}
|
|
53
|
+
#endif
|
|
54
|
+
}
|
|
55
|
+
// Defined in the owning library so RTTI has one identity across modules.
|
|
56
|
+
~JHybridPangleMediationSpec() override;
|
|
57
|
+
|
|
58
|
+
public:
|
|
59
|
+
inline jni::alias_ref<JHybridPangleMediationSpec::JavaPart> getJavaPart() const noexcept {
|
|
60
|
+
return _javaPart;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
public:
|
|
64
|
+
// Properties
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
public:
|
|
68
|
+
// Methods
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
public:
|
|
72
|
+
// Constructor and static members
|
|
73
|
+
static jni::local_ref<JOptional<jni::JString>> getAdapterVersion();
|
|
74
|
+
|
|
75
|
+
protected:
|
|
76
|
+
const std::shared_ptr<const HybridClass>& getHybridClass() override {
|
|
77
|
+
return Class::get();
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
private:
|
|
81
|
+
jni::alias_ref<JHybridPangleMediationSpec::JavaPart> _javaPart;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
} // namespace margelo::nitro::googlemobileadspangle
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JHybridPangleMediationSpecJavaPart.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/margelo/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <NitroModules/JHybridObject.hpp>
|
|
11
|
+
#include <fbjni/fbjni.h>
|
|
12
|
+
#include <memory>
|
|
13
|
+
|
|
14
|
+
namespace margelo::nitro::googlemobileadspangle {
|
|
15
|
+
|
|
16
|
+
namespace jni = facebook::jni;
|
|
17
|
+
|
|
18
|
+
class JHybridPangleMediationSpec;
|
|
19
|
+
|
|
20
|
+
struct JHybridPangleMediationSpecJavaPart : public jni::JavaClass<JHybridPangleMediationSpecJavaPart, JHybridObject::JavaPart> {
|
|
21
|
+
using HybridType = JHybridPangleMediationSpec;
|
|
22
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/googlemobileadspangle/HybridPangleMediationSpec;";
|
|
23
|
+
std::shared_ptr<JHybridPangleMediationSpec> getJHybridPangleMediationSpec();
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
} // namespace margelo::nitro::googlemobileadspangle
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroGoogleMobileAdsPangleOnLoad.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/margelo/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
namespace margelo::nitro::googlemobileadspangle {
|
|
11
|
+
// Call inside facebook::jni::initialize() from JNI_OnLoad.
|
|
12
|
+
void registerAllNatives();
|
|
13
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridPangleMediationSpec.kt
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/margelo/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
package com.margelo.nitro.googlemobileadspangle
|
|
9
|
+
|
|
10
|
+
import androidx.annotation.Keep
|
|
11
|
+
import com.facebook.jni.HybridData
|
|
12
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
13
|
+
import dalvik.annotation.optimization.FastNative
|
|
14
|
+
import com.margelo.nitro.googlemobileadspangle.HybridPangleMediation
|
|
15
|
+
import com.margelo.nitro.core.HybridObject
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* A Kotlin class representing the PangleMediation HybridObject.
|
|
19
|
+
* Implement this abstract class to create Kotlin-based instances of PangleMediation.
|
|
20
|
+
*/
|
|
21
|
+
@DoNotStrip
|
|
22
|
+
@Keep
|
|
23
|
+
@Suppress(
|
|
24
|
+
"KotlinJniMissingFunction", "unused",
|
|
25
|
+
"RedundantSuppression", "RedundantUnitReturnType", "SimpleRedundantLet",
|
|
26
|
+
"LocalVariableName", "PropertyName", "PrivatePropertyName", "FunctionName"
|
|
27
|
+
)
|
|
28
|
+
abstract class HybridPangleMediationSpec: HybridObject() {
|
|
29
|
+
// Properties
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
// Methods
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
// Default implementation of `HybridObject.toString()`
|
|
36
|
+
override fun toString(): String {
|
|
37
|
+
return "[HybridObject PangleMediation]"
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// C++ backing class
|
|
41
|
+
@DoNotStrip
|
|
42
|
+
@Keep
|
|
43
|
+
protected open class CxxPart(javaPart: HybridPangleMediationSpec): HybridObject.CxxPart(javaPart) {
|
|
44
|
+
// C++ JHybridPangleMediationSpec::CxxPart::initHybrid(...)
|
|
45
|
+
@FastNative
|
|
46
|
+
external override fun initHybrid(): HybridData
|
|
47
|
+
|
|
48
|
+
companion object {
|
|
49
|
+
@DoNotStrip
|
|
50
|
+
@Keep
|
|
51
|
+
@JvmField
|
|
52
|
+
val implementationClass_cxx: Class<out HybridPangleMediationSpec> = HybridPangleMediation::class.java
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
override fun createCxxPart(): CxxPart {
|
|
56
|
+
return CxxPart(this)
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
interface Companion {
|
|
60
|
+
// Static Properties
|
|
61
|
+
val adapterVersion: String?
|
|
62
|
+
|
|
63
|
+
// Static Methods
|
|
64
|
+
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
protected companion object Bridge {
|
|
68
|
+
protected const val TAG = "HybridPangleMediationSpec"
|
|
69
|
+
|
|
70
|
+
private val implementationCompanion: Companion
|
|
71
|
+
get() = HybridPangleMediation
|
|
72
|
+
|
|
73
|
+
// Static properties
|
|
74
|
+
@JvmStatic
|
|
75
|
+
@DoNotStrip
|
|
76
|
+
@Keep
|
|
77
|
+
private fun getAdapterVersion_cxx(): String? {
|
|
78
|
+
return HybridPangleMediation.adapterVersion
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroGoogleMobileAdsPangleOnLoad.kt
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/margelo/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
package com.margelo.nitro.googlemobileadspangle
|
|
9
|
+
|
|
10
|
+
internal class NitroGoogleMobileAdsPangleOnLoad {
|
|
11
|
+
companion object {
|
|
12
|
+
private var didLoad = false
|
|
13
|
+
|
|
14
|
+
@JvmStatic
|
|
15
|
+
@Synchronized
|
|
16
|
+
fun initializeNative() {
|
|
17
|
+
if (didLoad) return
|
|
18
|
+
System.loadLibrary("NitroGoogleMobileAdsPangle")
|
|
19
|
+
didLoad = true
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroGoogleMobileAdsPangle-Swift-Cxx-Bridge.cpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/margelo/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
#include <NitroGoogleMobileAdsPangle/private/NitroGoogleMobileAdsPangle-Swift-Cxx-Umbrella.hpp>
|
|
8
|
+
#include <NitroGoogleMobileAdsPangle/private/HybridPangleMediationSpecSwift.hpp>
|
|
9
|
+
|
|
10
|
+
namespace margelo::nitro::googlemobileadspangle::swift_bridge {
|
|
11
|
+
std__shared_ptr_margelo__nitro__googlemobileadspangle__HybridPangleMediationSpec_ create_std__shared_ptr_margelo__nitro__googlemobileadspangle__HybridPangleMediationSpec_(void* NON_NULL pointer) {
|
|
12
|
+
return std::make_shared<margelo::nitro::googlemobileadspangle::HybridPangleMediationSpecSwift>(::NitroGoogleMobileAdsPangle::HybridPangleMediationSpec_cxx::fromUnsafe(pointer));
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
void* NON_NULL get_std__shared_ptr_margelo__nitro__googlemobileadspangle__HybridPangleMediationSpec_(const std::shared_ptr<HybridObject>& value) {
|
|
16
|
+
auto wrapper = std::dynamic_pointer_cast<margelo::nitro::googlemobileadspangle::HybridPangleMediationSpecSwift>(value);
|
|
17
|
+
if (!wrapper) throw std::runtime_error("HybridPangleMediationSpec is not implemented in Swift");
|
|
18
|
+
return wrapper->getSwiftPart().toUnsafe();
|
|
19
|
+
}
|
|
20
|
+
} // namespace margelo::nitro::googlemobileadspangle::swift_bridge
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroGoogleMobileAdsPangleAppleCxx.cpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/margelo/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
// Swift packages require at least one source file per C++ target.
|
|
9
|
+
#include <NitroGoogleMobileAdsPangleAppleCxx/NitroGoogleMobileAdsPangleAppleCxx.h>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroGoogleMobileAdsPangleAppleCxx.h
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/margelo/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
// Forward declaration of `HybridPangleMediationSpec_cxx` to properly resolve imports.
|
|
11
|
+
namespace NitroGoogleMobileAdsPangle { class HybridPangleMediationSpec_cxx; }
|
|
12
|
+
namespace swift { class String; }
|
|
13
|
+
#ifndef SWIFT_SWIFT_H
|
|
14
|
+
namespace swift { template <class T> class Optional; }
|
|
15
|
+
#endif
|
|
16
|
+
#include <NitroModules/HybridObject.hpp>
|
|
17
|
+
// Forward declaration of `HybridPangleMediationSpecSwift` to properly resolve imports.
|
|
18
|
+
namespace margelo::nitro::googlemobileadspangle { class HybridPangleMediationSpecSwift; }
|
|
19
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
20
|
+
|
|
21
|
+
namespace margelo::nitro::googlemobileadspangle::swift_bridge {
|
|
22
|
+
using std__shared_ptr_margelo__nitro__googlemobileadspangle__HybridPangleMediationSpec_ = std::shared_ptr<margelo::nitro::googlemobileadspangle::HybridPangleMediationSpecSwift>;
|
|
23
|
+
using std__weak_ptr_margelo__nitro__googlemobileadspangle__HybridPangleMediationSpec_ = std::weak_ptr<margelo::nitro::googlemobileadspangle::HybridPangleMediationSpecSwift>;
|
|
24
|
+
inline std__weak_ptr_margelo__nitro__googlemobileadspangle__HybridPangleMediationSpec_ weakify_std__shared_ptr_margelo__nitro__googlemobileadspangle__HybridPangleMediationSpec_(const std__shared_ptr_margelo__nitro__googlemobileadspangle__HybridPangleMediationSpec_& value) {
|
|
25
|
+
return value;
|
|
26
|
+
}
|
|
27
|
+
std__shared_ptr_margelo__nitro__googlemobileadspangle__HybridPangleMediationSpec_ create_std__shared_ptr_margelo__nitro__googlemobileadspangle__HybridPangleMediationSpec_(void* NON_NULL pointer);
|
|
28
|
+
void* NON_NULL get_std__shared_ptr_margelo__nitro__googlemobileadspangle__HybridPangleMediationSpec_(const std::shared_ptr<HybridObject>& value);
|
|
29
|
+
} // namespace margelo::nitro::googlemobileadspangle::swift_bridge
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroGoogleMobileAdsPangleAutolinking.cpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/margelo/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#include <NitroGoogleMobileAdsPangle/NitroGoogleMobileAdsPangleAutolinking.hpp>
|
|
9
|
+
#include <NitroModules/HybridClassRegistry.hpp>
|
|
10
|
+
|
|
11
|
+
#include <NitroGoogleMobileAdsPangle/private/HybridPangleMediationSpecSwift.hpp>
|
|
12
|
+
|
|
13
|
+
namespace margelo::nitro::googlemobileadspangle {
|
|
14
|
+
void registerHybridClasses() {
|
|
15
|
+
using namespace margelo::nitro;
|
|
16
|
+
using namespace margelo::nitro::googlemobileadspangle;
|
|
17
|
+
|
|
18
|
+
HybridClassRegistry::registerHybridClass("googlemobileadspangle.PangleMediation", HybridPangleMediationSpecSwift::Class::get());
|
|
19
|
+
}
|
|
20
|
+
} // namespace margelo::nitro::googlemobileadspangle
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroGoogleMobileAdsPangleAutolinking.mm
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/margelo/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#import <Foundation/Foundation.h>
|
|
9
|
+
#include <NitroGoogleMobileAdsPangle/NitroGoogleMobileAdsPangleAutolinking.hpp>
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Registers all HybridObject classes of NitroGoogleMobileAdsPangle
|
|
13
|
+
* when the app loads, so JS can look them up by name.
|
|
14
|
+
*/
|
|
15
|
+
@interface NitroGoogleMobileAdsPangleAutolinking : NSObject
|
|
16
|
+
@end
|
|
17
|
+
|
|
18
|
+
@implementation NitroGoogleMobileAdsPangleAutolinking
|
|
19
|
+
|
|
20
|
+
+ (void)load {
|
|
21
|
+
margelo::nitro::googlemobileadspangle::registerHybridClasses();
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridPangleMediationSpecSwift.cpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/margelo/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#include <NitroGoogleMobileAdsPangle/private/HybridPangleMediationSpecSwift.hpp>
|
|
9
|
+
#include <NitroModules/SwiftConverter.hpp>
|
|
10
|
+
#include <NitroModules/SwiftResult.hpp>
|
|
11
|
+
#include <optional>
|
|
12
|
+
|
|
13
|
+
namespace margelo::nitro::googlemobileadspangle {
|
|
14
|
+
|
|
15
|
+
std::string HybridPangleMediationSpecSwift::toString() {
|
|
16
|
+
return SwiftConverter<std::string, swift::String>::fromSwift(_swiftPart.toString());
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// Properties
|
|
20
|
+
|
|
21
|
+
// Methods
|
|
22
|
+
|
|
23
|
+
// Static properties
|
|
24
|
+
|
|
25
|
+
swift::Optional<swift::String> HybridPangleMediationSpecSwift::getAdapterVersion() {
|
|
26
|
+
return ::NitroGoogleMobileAdsPangle::HybridPangleMediationSpec_cxx::getAdapterVersion_NitroGoogleMobileAdsPangle_PangleMediation();
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const std::shared_ptr<const HybridClass>& HybridPangleMediationSpecSwift::Class::get() {
|
|
30
|
+
static const auto hybridClass = HybridClass::create<Class>([](HybridClass& clazz) {
|
|
31
|
+
clazz.registerStaticHybridProperty("adapterVersion", &HybridPangleMediationSpecSwift::getAdapterVersion);
|
|
32
|
+
});
|
|
33
|
+
return hybridClass;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
} // namespace margelo::nitro::googlemobileadspangle
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridPangleMediationSpec_cxx-Swift.cpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/margelo/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#include <NitroGoogleMobileAdsPangle/private/HybridPangleMediationSpec_cxx-Swift.hpp>
|
|
9
|
+
#include <NitroGoogleMobileAdsPangle/private/NitroGoogleMobileAdsPangle-Swift-Cxx-Umbrella.hpp>
|
|
10
|
+
#include <NitroGoogleMobileAdsPangle/private/HybridPangleMediationSpecSwift.hpp>
|
|
11
|
+
|
|
12
|
+
namespace margelo::nitro {
|
|
13
|
+
|
|
14
|
+
::NitroGoogleMobileAdsPangle::HybridPangleMediationSpec_cxx JSIConverter<::NitroGoogleMobileAdsPangle::HybridPangleMediationSpec_cxx>::fromJSI(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
15
|
+
auto hybridSpec = JSIConverter<std::shared_ptr<margelo::nitro::googlemobileadspangle::HybridPangleMediationSpecSwift>>::fromJSI(runtime, value);
|
|
16
|
+
return ::NitroGoogleMobileAdsPangle::HybridPangleMediationSpec_cxx::fromUnsafe(margelo::nitro::googlemobileadspangle::swift_bridge::get_std__shared_ptr_margelo__nitro__googlemobileadspangle__HybridPangleMediationSpec_(hybridSpec));
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
jsi::Value JSIConverter<::NitroGoogleMobileAdsPangle::HybridPangleMediationSpec_cxx>::toJSI(jsi::Runtime& runtime, const ::NitroGoogleMobileAdsPangle::HybridPangleMediationSpec_cxx& value) {
|
|
20
|
+
auto hybridSpec = ::NitroGoogleMobileAdsPangle::HybridPangleMediationSpec_cxx::getCxxPart(value);
|
|
21
|
+
return JSIConverter<std::shared_ptr<margelo::nitro::googlemobileadspangle::HybridPangleMediationSpecSwift>>::toJSI(runtime, hybridSpec);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
bool JSIConverter<::NitroGoogleMobileAdsPangle::HybridPangleMediationSpec_cxx>::canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
25
|
+
return JSIConverter<std::shared_ptr<margelo::nitro::googlemobileadspangle::HybridPangleMediationSpecSwift>>::canConvert(runtime, value);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroGoogleMobileAdsPangleAutolinking.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/margelo/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
namespace margelo::nitro::googlemobileadspangle {
|
|
11
|
+
// Register all generated HybridObject classes
|
|
12
|
+
void registerHybridClasses();
|
|
13
|
+
} // namespace margelo::nitro::googlemobileadspangle
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridPangleMediationSpecSwift.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/margelo/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <NitroModules/HybridObject.hpp>
|
|
11
|
+
#include <NitroModules/HybridClass.hpp>
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
// This implementation header is consumed only by C++ translation units.
|
|
15
|
+
#include <NitroGoogleMobileAdsPangle/private/NitroGoogleMobileAdsPangle-Swift-Cxx-Umbrella.hpp>
|
|
16
|
+
|
|
17
|
+
namespace margelo::nitro::googlemobileadspangle {
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The C++ part of HybridPangleMediationSpec_cxx.swift.
|
|
21
|
+
*
|
|
22
|
+
* HybridPangleMediationSpecSwift accesses the concrete Swift wrapper and registers
|
|
23
|
+
* its Swift signatures for JS. C++ callers use a separate adapter when needed.
|
|
24
|
+
*/
|
|
25
|
+
class HybridPangleMediationSpecSwift final : public HybridObject {
|
|
26
|
+
public:
|
|
27
|
+
struct Class {
|
|
28
|
+
using Base = HybridObject::Class;
|
|
29
|
+
static constexpr const char* name = "PangleMediation";
|
|
30
|
+
static const std::shared_ptr<const HybridClass>& get();
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
public:
|
|
34
|
+
// Constructor from a Swift instance
|
|
35
|
+
explicit HybridPangleMediationSpecSwift(const ::NitroGoogleMobileAdsPangle::HybridPangleMediationSpec_cxx& swiftPart):
|
|
36
|
+
HybridObject(),
|
|
37
|
+
_swiftPart(swiftPart) { }
|
|
38
|
+
|
|
39
|
+
public:
|
|
40
|
+
// Get the Swift part
|
|
41
|
+
::NitroGoogleMobileAdsPangle::HybridPangleMediationSpec_cxx& getSwiftPart() noexcept {
|
|
42
|
+
return _swiftPart;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// HybridObject overrides
|
|
46
|
+
size_t getExternalMemorySize() noexcept override {
|
|
47
|
+
return _swiftPart.getMemorySize();
|
|
48
|
+
}
|
|
49
|
+
bool equals(const std::shared_ptr<HybridObject>& other) override {
|
|
50
|
+
auto value = std::dynamic_pointer_cast<HybridPangleMediationSpecSwift>(other);
|
|
51
|
+
return value && _swiftPart.equals(value->_swiftPart);
|
|
52
|
+
}
|
|
53
|
+
void dispose() override {
|
|
54
|
+
_swiftPart.dispose();
|
|
55
|
+
}
|
|
56
|
+
std::string toString() override;
|
|
57
|
+
|
|
58
|
+
// Properties
|
|
59
|
+
// Methods
|
|
60
|
+
// Static properties
|
|
61
|
+
static swift::Optional<swift::String> getAdapterVersion();
|
|
62
|
+
|
|
63
|
+
protected:
|
|
64
|
+
const std::shared_ptr<const HybridClass>& getHybridClass() override {
|
|
65
|
+
return Class::get();
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
private:
|
|
69
|
+
::NitroGoogleMobileAdsPangle::HybridPangleMediationSpec_cxx _swiftPart;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
} // namespace margelo::nitro::googlemobileadspangle
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridPangleMediationSpec_cxx-Swift.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/margelo/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
11
|
+
// Forward declaration of `HybridPangleMediationSpec_cxx` to properly resolve imports.
|
|
12
|
+
namespace NitroGoogleMobileAdsPangle { class HybridPangleMediationSpec_cxx; }
|
|
13
|
+
|
|
14
|
+
namespace margelo::nitro {
|
|
15
|
+
|
|
16
|
+
template <>
|
|
17
|
+
struct JSIConverter<::NitroGoogleMobileAdsPangle::HybridPangleMediationSpec_cxx> {
|
|
18
|
+
static ::NitroGoogleMobileAdsPangle::HybridPangleMediationSpec_cxx fromJSI(jsi::Runtime& runtime, const jsi::Value& value);
|
|
19
|
+
static jsi::Value toJSI(jsi::Runtime& runtime, const ::NitroGoogleMobileAdsPangle::HybridPangleMediationSpec_cxx& value);
|
|
20
|
+
static bool canConvert(jsi::Runtime& runtime, const jsi::Value& value);
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroGoogleMobileAdsPangle-Swift-Cxx-Umbrella.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/margelo/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
// Private C++ implementation includes. Never import this umbrella from Swift.
|
|
11
|
+
// Include Swift defined types. They define swift::Optional and swift::Array,
|
|
12
|
+
// which the C++ helpers below only forward-declare for Swift's importer.
|
|
13
|
+
#include <NitroModules/NitroModules-Swift-Cxx-Umbrella.hpp>
|
|
14
|
+
|
|
15
|
+
// C++ helpers for Swift
|
|
16
|
+
#include <NitroGoogleMobileAdsPangleAppleCxx/NitroGoogleMobileAdsPangleAppleCxx.h>
|
|
17
|
+
|
|
18
|
+
#if __has_include("NitroGoogleMobileAdsPangle-Swift.h")
|
|
19
|
+
// This header is generated by Xcode/Swift on every app build.
|
|
20
|
+
// If it cannot be found, make sure the Swift module's name (= podspec name) is actually "NitroGoogleMobileAdsPangle".
|
|
21
|
+
#include "NitroGoogleMobileAdsPangle-Swift.h"
|
|
22
|
+
// Same as above, but used when building with frameworks (`use_frameworks`)
|
|
23
|
+
#elif __has_include(<NitroGoogleMobileAdsPangle/NitroGoogleMobileAdsPangle-Swift.h>)
|
|
24
|
+
#include <NitroGoogleMobileAdsPangle/NitroGoogleMobileAdsPangle-Swift.h>
|
|
25
|
+
#else
|
|
26
|
+
#error NitroGoogleMobileAdsPangle's autogenerated Swift header cannot be found! Make sure the Swift module's name (= podspec name) is actually "NitroGoogleMobileAdsPangle", and try building the app first.
|
|
27
|
+
#endif
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
#include <NitroGoogleMobileAdsPangle/private/HybridPangleMediationSpec_cxx-Swift.hpp>
|
|
31
|
+
#include <NitroModules/NitroModules-Swift-Cxx-Umbrella.hpp>
|
|
32
|
+
#include <NitroModules/JSIConverter+SwiftString.hpp>
|
|
33
|
+
#include <NitroModules/JSIConverter+SwiftOptional.hpp>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// module.modulemap
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/margelo/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
// Headers used by Swift belong to the AppleCxx module.
|
|
9
|
+
// This implementation target must not claim them through an umbrella directory.
|
|
10
|
+
module NitroGoogleMobileAdsPangleSwiftBridge {
|
|
11
|
+
requires cplusplus
|
|
12
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridPangleMediationSpec.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/margelo/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
public import NitroModules
|
|
9
|
+
|
|
10
|
+
/// See ``HybridPangleMediationSpec``
|
|
11
|
+
public protocol HybridPangleMediationSpec_protocol: HybridPangleMediationSpec_base, HybridObject {
|
|
12
|
+
// Constructor
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
// Properties
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
// Methods
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
// Static Properties
|
|
22
|
+
static var adapterVersion: String? { get }
|
|
23
|
+
|
|
24
|
+
// Static Methods
|
|
25
|
+
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
public extension HybridPangleMediationSpec_protocol {
|
|
29
|
+
/// Default implementation of ``HybridObject.toString``
|
|
30
|
+
func toString() -> String {
|
|
31
|
+
return "[HybridObject PangleMediation]"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/// See ``HybridPangleMediationSpec``
|
|
36
|
+
open class HybridPangleMediationSpec_base {
|
|
37
|
+
private weak var cxxWrapper: HybridPangleMediationSpec_cxx? = nil
|
|
38
|
+
public init() throws {
|
|
39
|
+
}
|
|
40
|
+
public final func getCxxWrapper() -> HybridPangleMediationSpec_cxx {
|
|
41
|
+
#if DEBUG
|
|
42
|
+
guard self is any HybridPangleMediationSpec else {
|
|
43
|
+
fatalError("`self` is not a `HybridPangleMediationSpec`! Did you accidentally inherit from `HybridPangleMediationSpec_base` instead of `HybridPangleMediationSpec`?")
|
|
44
|
+
}
|
|
45
|
+
#endif
|
|
46
|
+
if let cxxWrapper = self.cxxWrapper {
|
|
47
|
+
return cxxWrapper
|
|
48
|
+
} else {
|
|
49
|
+
let cxxWrapper = HybridPangleMediationSpec_cxx(self as! any HybridPangleMediationSpec)
|
|
50
|
+
self.cxxWrapper = cxxWrapper
|
|
51
|
+
return cxxWrapper
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* A Swift base-protocol representing the PangleMediation HybridObject.
|
|
58
|
+
* Implement this protocol to create Swift-based instances of PangleMediation.
|
|
59
|
+
* ```swift
|
|
60
|
+
* class HybridPangleMediation : HybridPangleMediationSpec {
|
|
61
|
+
* // ...
|
|
62
|
+
* }
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
public typealias HybridPangleMediationSpec = HybridPangleMediationSpec_protocol & HybridPangleMediationSpec_base
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridPangleMediationSpec_cxx.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/margelo/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
internal import NitroModules
|
|
8
|
+
internal import CxxStdlib
|
|
9
|
+
internal import NitroGoogleMobileAdsPangleAppleCxx
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* A class implementation that bridges HybridPangleMediationSpec over to C++.
|
|
13
|
+
* In C++, we cannot use Swift protocols - so we need to wrap it in a class to make it strongly defined.
|
|
14
|
+
*/
|
|
15
|
+
@_expose(Cxx)
|
|
16
|
+
public final class HybridPangleMediationSpec_cxx {
|
|
17
|
+
/**
|
|
18
|
+
* The Swift <> C++ bridge's namespace (`margelo::nitro::googlemobileadspangle::swift_bridge`)
|
|
19
|
+
* from `NitroGoogleMobileAdsPangleAppleCxx/NitroGoogleMobileAdsPangleAppleCxx.h`.
|
|
20
|
+
* This contains specialized C++ templates, and C++ helper functions that can be accessed from Swift.
|
|
21
|
+
*/
|
|
22
|
+
public typealias bridge = margelo.nitro.googlemobileadspangle.swift_bridge
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Holds the Swift implementation of `HybridPangleMediationSpec`.
|
|
26
|
+
*/
|
|
27
|
+
private let __implementation: HybridPangleMediation
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Holds a weak pointer to the C++ class that wraps the Swift class.
|
|
31
|
+
*/
|
|
32
|
+
private var __cxxPart: bridge.std__weak_ptr_margelo__nitro__googlemobileadspangle__HybridPangleMediationSpec_ = .init()
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Create a new `HybridPangleMediationSpec_cxx` that wraps the given `HybridPangleMediationSpec`.
|
|
36
|
+
*/
|
|
37
|
+
public init(_ implementation: any HybridPangleMediationSpec) {
|
|
38
|
+
guard let implementation = implementation as? HybridPangleMediation else {
|
|
39
|
+
preconditionFailure("PangleMediation selects HybridPangleMediation as its Swift implementation. Every instance must inherit HybridPangleMediation.")
|
|
40
|
+
}
|
|
41
|
+
self.__implementation = implementation
|
|
42
|
+
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Get the actual `HybridPangleMediationSpec` instance this class wraps.
|
|
47
|
+
*/
|
|
48
|
+
@inline(__always)
|
|
49
|
+
public func getHybridPangleMediationSpec() -> any HybridPangleMediationSpec {
|
|
50
|
+
return __implementation
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Casts this instance to a retained unsafe raw pointer.
|
|
55
|
+
* This acquires one additional strong reference on the object!
|
|
56
|
+
*/
|
|
57
|
+
public func toUnsafe() -> UnsafeMutableRawPointer {
|
|
58
|
+
return Unmanaged.passRetained(self).toOpaque()
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Casts an unsafe pointer to a `HybridPangleMediationSpec_cxx`.
|
|
63
|
+
* The pointer has to be a retained opaque `Unmanaged<HybridPangleMediationSpec_cxx>`.
|
|
64
|
+
* This removes one strong reference from the object!
|
|
65
|
+
*/
|
|
66
|
+
public class func fromUnsafe(pointer: UnsafeMutableRawPointer) -> HybridPangleMediationSpec_cxx {
|
|
67
|
+
return Unmanaged<HybridPangleMediationSpec_cxx>.fromOpaque(pointer).takeRetainedValue()
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Gets (or creates) the C++ part of this Hybrid Object.
|
|
72
|
+
* This handle keeps the original native object alive.
|
|
73
|
+
*/
|
|
74
|
+
public func getCxxPart() -> bridge.std__shared_ptr_margelo__nitro__googlemobileadspangle__HybridPangleMediationSpec_ {
|
|
75
|
+
let cached = __cxxPart.lock()
|
|
76
|
+
if cached.use_count() > 0 {
|
|
77
|
+
return cached
|
|
78
|
+
}
|
|
79
|
+
let value = bridge.create_std__shared_ptr_margelo__nitro__googlemobileadspangle__HybridPangleMediationSpec_(self.toUnsafe())
|
|
80
|
+
__cxxPart = bridge.weakify_std__shared_ptr_margelo__nitro__googlemobileadspangle__HybridPangleMediationSpec_(value)
|
|
81
|
+
return value
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
// A static borrowing accessor lets C++ pass a const reference without copying it.
|
|
87
|
+
// TODO: Remove this adapter and call the instance method directly once
|
|
88
|
+
// https://github.com/swiftlang/swift/pull/92862 is merged and supported by our Swift toolchain.
|
|
89
|
+
@_spi(NitroCxx)
|
|
90
|
+
public static func getCxxPart(_ value: borrowing HybridPangleMediationSpec_cxx) -> bridge.std__shared_ptr_margelo__nitro__googlemobileadspangle__HybridPangleMediationSpec_ {
|
|
91
|
+
return value.getCxxPart()
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Get the memory size of the Swift class (plus size of any other allocations)
|
|
96
|
+
* so the JS VM can properly track it and garbage-collect the JS object if needed.
|
|
97
|
+
*/
|
|
98
|
+
@inline(__always)
|
|
99
|
+
public var memorySize: Int {
|
|
100
|
+
return MemoryHelper.getSizeOf(__implementation) + __implementation.memorySize
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Compares this object with the given [other] object for reference equality.
|
|
105
|
+
*/
|
|
106
|
+
@inline(__always)
|
|
107
|
+
public func equals(other: HybridPangleMediationSpec_cxx) -> Bool {
|
|
108
|
+
return __implementation === other.__implementation
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Call dispose() on the Swift class.
|
|
113
|
+
* This _may_ be called manually from JS.
|
|
114
|
+
*/
|
|
115
|
+
@inline(__always)
|
|
116
|
+
public func dispose() {
|
|
117
|
+
__implementation.dispose()
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Call toString() on the Swift class.
|
|
122
|
+
*/
|
|
123
|
+
@inline(__always)
|
|
124
|
+
public func toString() -> String {
|
|
125
|
+
return __implementation.toString()
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// Properties
|
|
129
|
+
|
|
130
|
+
// Methods
|
|
131
|
+
|
|
132
|
+
// Static properties
|
|
133
|
+
|
|
134
|
+
public class func getAdapterVersion_NitroGoogleMobileAdsPangle_PangleMediation() -> String? {
|
|
135
|
+
let value = HybridPangleMediation.adapterVersion
|
|
136
|
+
return value
|
|
137
|
+
}
|
|
138
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 2,
|
|
3
|
+
"classes": {
|
|
4
|
+
"PangleMediation": {
|
|
5
|
+
"android": {
|
|
6
|
+
"implementation": {
|
|
7
|
+
"className": "HybridPangleMediation"
|
|
8
|
+
},
|
|
9
|
+
"language": "kotlin"
|
|
10
|
+
},
|
|
11
|
+
"apple": {
|
|
12
|
+
"implementation": {
|
|
13
|
+
"className": "HybridPangleMediation"
|
|
14
|
+
},
|
|
15
|
+
"language": "swift"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// PangleMediation.cjs
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/margelo/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
const { NitroModules } = require('nitro-core')
|
|
9
|
+
|
|
10
|
+
let hybridClass
|
|
11
|
+
|
|
12
|
+
module.exports = {
|
|
13
|
+
get PangleMediation() {
|
|
14
|
+
if (hybridClass === undefined) {
|
|
15
|
+
hybridClass = NitroModules.getHybridClass('googlemobileadspangle.PangleMediation')
|
|
16
|
+
}
|
|
17
|
+
return hybridClass
|
|
18
|
+
},
|
|
19
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// PangleMediation.d.cts
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/margelo/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
// The spec's `export declare class PangleMediation` types this runtime export.
|
|
9
|
+
export {}
|
package/package.json
CHANGED
|
@@ -1,6 +1,44 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nitro-google-mobile-ads-pangle",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Pangle mediation adapter for nitro-google-mobile-ads",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": "./src/index.ts",
|
|
9
|
+
"./package.json": "./package.json"
|
|
10
|
+
},
|
|
11
|
+
"imports": {
|
|
12
|
+
"#nitro/*": "./nitrogen/generated/shared/javascript/*.cjs"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"src",
|
|
16
|
+
"Package.swift",
|
|
17
|
+
"ios",
|
|
18
|
+
"android",
|
|
19
|
+
"nitrogen/generated",
|
|
20
|
+
"nitro.json"
|
|
21
|
+
],
|
|
22
|
+
"scripts": {
|
|
23
|
+
"typecheck": "tsc --noEmit",
|
|
24
|
+
"specs": "bun run --bun nitrogen",
|
|
25
|
+
"prepack": "bun run specs"
|
|
26
|
+
},
|
|
27
|
+
"peerDependencies": {
|
|
28
|
+
"nitro-core": ">=1.0.0-alpha.nightly.137.gd4793c40b8b8",
|
|
29
|
+
"nitro-google-mobile-ads": "^0.1.0 || ^0.2.0"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"nitro-core": "1.0.0-alpha.nightly.137.gd4793c40b8b8",
|
|
33
|
+
"nitrogen": "1.0.0-alpha.nightly.137.gd4793c40b8b8",
|
|
34
|
+
"typescript": "7.0.2"
|
|
35
|
+
},
|
|
36
|
+
"repository": {
|
|
37
|
+
"type": "git",
|
|
38
|
+
"url": "git+https://github.com/kazutoyo/nitro-google-mobile-ads.git",
|
|
39
|
+
"directory": "packages/nitro-google-mobile-ads-pangle"
|
|
40
|
+
},
|
|
41
|
+
"publishConfig": {
|
|
42
|
+
"access": "public"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Android, iOS, type HybridObject } from 'nitro-core'
|
|
2
|
+
|
|
3
|
+
export * from '#nitro/PangleMediation'
|
|
4
|
+
|
|
5
|
+
/** The Pangle mediation adapter linked into the app. */
|
|
6
|
+
@iOS({ language: 'swift', implementation: { className: 'HybridPangleMediation' } })
|
|
7
|
+
@Android({ language: 'kotlin', implementation: { className: 'HybridPangleMediation' } })
|
|
8
|
+
export declare class PangleMediation extends HybridObject {
|
|
9
|
+
/** The adapter version, as reported by the native SDK, or `undefined` if the adapter is not linked. */
|
|
10
|
+
static readonly adapterVersion: string | undefined
|
|
11
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PangleMediation } from './PangleMediation.nitro'
|