@thealteroffice/react-native-adgeist 0.0.1 → 0.0.3
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/Adgeist.podspec +6 -5
- package/README.md +12 -2
- package/android/build.gradle +21 -8
- package/android/src/main/java/com/adgeist/AdgeistPackage.kt +5 -4
- package/android/src/main/java/com/adgeist/{AdgeistModule.kt → implementation/AdgeistModuleImpl.kt} +8 -18
- package/android/src/newarch/java/com/AdgeistModule.kt +22 -0
- package/android/src/oldarch/java/com/AdgeistModule.kt +26 -0
- package/app.plugin.js +1 -0
- package/ios/Adgeist.h +1 -3
- package/ios/Adgeist.mm +24 -19
- package/ios/adgeist-Bridging-Header.h +1 -2
- package/lib/module/NativeAdgeist.js +5 -0
- package/lib/module/NativeAdgeist.js.map +1 -0
- package/lib/module/components/BannerAd.js +1 -1
- package/lib/module/components/BannerAd.js.map +1 -1
- package/lib/module/components/BottomBannerAd.js +1 -1
- package/lib/module/components/BottomBannerAd.js.map +1 -1
- package/lib/typescript/plugin/src/android/withRNAdgeistMainApplication.d.ts +4 -0
- package/lib/typescript/plugin/src/android/withRNAdgeistMainApplication.d.ts.map +1 -0
- package/lib/typescript/plugin/src/index.d.ts +4 -0
- package/lib/typescript/plugin/src/index.d.ts.map +1 -0
- package/lib/typescript/plugin/src/ios/withRNAdgeistAppDelegate.d.ts +5 -0
- package/lib/typescript/plugin/src/ios/withRNAdgeistAppDelegate.d.ts.map +1 -0
- package/package.json +21 -20
- package/plugin/build/android/withRNAdgeistMainApplication.d.ts +3 -0
- package/plugin/build/android/withRNAdgeistMainApplication.js +65 -0
- package/plugin/build/index.d.ts +3 -0
- package/plugin/build/index.js +25 -0
- package/plugin/build/ios/withRNAdgeistAppDelegate.d.ts +4 -0
- package/plugin/build/ios/withRNAdgeistAppDelegate.js +66 -0
- package/plugin/tsconfig.json +9 -0
- package/react-native.config.js +1 -1
- package/android/generated/java/com/adgeist/NativeAdgeistSpec.java +0 -42
- package/android/generated/jni/CMakeLists.txt +0 -36
- package/android/generated/jni/RNAdgeistSpec-generated.cpp +0 -38
- package/android/generated/jni/RNAdgeistSpec.h +0 -31
- package/android/generated/jni/react/renderer/components/RNAdgeistSpec/RNAdgeistSpecJSI-generated.cpp +0 -38
- package/android/generated/jni/react/renderer/components/RNAdgeistSpec/RNAdgeistSpecJSI.h +0 -80
- package/ios/generated/RNAdgeistSpec/RNAdgeistSpec-generated.mm +0 -46
- package/ios/generated/RNAdgeistSpec/RNAdgeistSpec.h +0 -71
- package/ios/generated/RNAdgeistSpecJSI-generated.cpp +0 -38
- package/ios/generated/RNAdgeistSpecJSI.h +0 -80
- package/lib/module/NativeAdgeist.ts +0 -14
package/Adgeist.podspec
CHANGED
|
@@ -18,11 +18,12 @@ Pod::Spec.new do |s|
|
|
|
18
18
|
|
|
19
19
|
s.dependency "AdgeistKit", '= 0.0.1'
|
|
20
20
|
|
|
21
|
-
# Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
|
|
22
|
-
# See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
|
|
23
|
-
if respond_to?(:install_modules_dependencies, true)
|
|
24
|
-
|
|
25
|
-
else
|
|
21
|
+
# Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
|
|
22
|
+
# See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
|
|
23
|
+
if respond_to?(:install_modules_dependencies, true)
|
|
24
|
+
install_modules_dependencies(s)
|
|
25
|
+
else
|
|
26
26
|
s.dependency "React-Core"
|
|
27
|
+
|
|
27
28
|
end
|
|
28
29
|
end
|
package/README.md
CHANGED
|
@@ -45,7 +45,11 @@ Simply add the library plugin to your `app.json` file:
|
|
|
45
45
|
}
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
This way, Expo will handle the native setup for you during `prebuild`.
|
|
48
|
+
This way, Expo will handle the native setup for you during `prebuild`. You can prebuild using
|
|
49
|
+
|
|
50
|
+
```sh
|
|
51
|
+
npx expo prebuild --clean
|
|
52
|
+
```
|
|
49
53
|
|
|
50
54
|
> Note: only SDK 50 and above are supported, the plugin is configured to handle only the kotlin template.
|
|
51
55
|
|
|
@@ -53,6 +57,7 @@ This way, Expo will handle the native setup for you during `prebuild`.
|
|
|
53
57
|
|
|
54
58
|
```js
|
|
55
59
|
import { BannerAd } from '@thealteroffice/react-native-adgeist';
|
|
60
|
+
import { BottomBannerAd } from '@thealteroffice/react-native-adgeist';
|
|
56
61
|
|
|
57
62
|
// ...
|
|
58
63
|
|
|
@@ -61,5 +66,10 @@ import { BannerAd } from '@thealteroffice/react-native-adgeist';
|
|
|
61
66
|
dataAdSlot={ADSPACE_ID}
|
|
62
67
|
width={400}
|
|
63
68
|
height={300}
|
|
64
|
-
|
|
69
|
+
/>
|
|
70
|
+
|
|
71
|
+
<BottomBannerAd
|
|
72
|
+
dataPublisherId={PUBLISHER_ID}
|
|
73
|
+
dataAdSlot={ADSPACE_ID}
|
|
74
|
+
/>
|
|
65
75
|
```
|
package/android/build.gradle
CHANGED
|
@@ -15,6 +15,9 @@ buildscript {
|
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
def isNewArchitectureEnabled() {
|
|
19
|
+
return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true"
|
|
20
|
+
}
|
|
18
21
|
|
|
19
22
|
apply plugin: "com.android.library"
|
|
20
23
|
apply plugin: "kotlin-android"
|
|
@@ -50,6 +53,7 @@ android {
|
|
|
50
53
|
defaultConfig {
|
|
51
54
|
minSdkVersion getExtOrIntegerDefault("minSdkVersion")
|
|
52
55
|
targetSdkVersion getExtOrIntegerDefault("targetSdkVersion")
|
|
56
|
+
buildConfigField("boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString())
|
|
53
57
|
}
|
|
54
58
|
|
|
55
59
|
buildFeatures {
|
|
@@ -73,10 +77,17 @@ android {
|
|
|
73
77
|
|
|
74
78
|
sourceSets {
|
|
75
79
|
main {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
+
if(isNewArchitectureEnabled()){
|
|
81
|
+
java.srcDirs += [
|
|
82
|
+
"src/newarch",
|
|
83
|
+
|
|
84
|
+
// This is needed to build Kotlin project with NewArch enabled
|
|
85
|
+
"${project.buildDir}/generated/source/codegen/java",
|
|
86
|
+
"${project.buildDir}/generated/source/codegen/jni"
|
|
87
|
+
]
|
|
88
|
+
}else{
|
|
89
|
+
java.srcDirs += ["src/oldarch"]
|
|
90
|
+
}
|
|
80
91
|
}
|
|
81
92
|
}
|
|
82
93
|
}
|
|
@@ -94,8 +105,10 @@ dependencies {
|
|
|
94
105
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
95
106
|
}
|
|
96
107
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
108
|
+
if (isNewArchitectureEnabled()) {
|
|
109
|
+
react {
|
|
110
|
+
jsRootDir = file("../src/")
|
|
111
|
+
libraryName = "Adgeist"
|
|
112
|
+
codegenJavaPackageName = "com.adgeist"
|
|
113
|
+
}
|
|
101
114
|
}
|
|
@@ -5,11 +5,12 @@ import com.facebook.react.bridge.NativeModule
|
|
|
5
5
|
import com.facebook.react.bridge.ReactApplicationContext
|
|
6
6
|
import com.facebook.react.module.model.ReactModuleInfo
|
|
7
7
|
import com.facebook.react.module.model.ReactModuleInfoProvider
|
|
8
|
+
import com.adgeist.implementation.AdgeistModuleImpl
|
|
8
9
|
import java.util.HashMap
|
|
9
10
|
|
|
10
11
|
class AdgeistPackage : BaseReactPackage() {
|
|
11
12
|
override fun getModule(name: String, reactContext: ReactApplicationContext): NativeModule? {
|
|
12
|
-
return if (name ==
|
|
13
|
+
return if (name == AdgeistModuleImpl.NAME) {
|
|
13
14
|
AdgeistModule(reactContext)
|
|
14
15
|
} else {
|
|
15
16
|
null
|
|
@@ -19,9 +20,9 @@ class AdgeistPackage : BaseReactPackage() {
|
|
|
19
20
|
override fun getReactModuleInfoProvider(): ReactModuleInfoProvider {
|
|
20
21
|
return ReactModuleInfoProvider {
|
|
21
22
|
val moduleInfos: MutableMap<String, ReactModuleInfo> = HashMap()
|
|
22
|
-
moduleInfos[
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
moduleInfos[AdgeistModuleImpl.NAME] = ReactModuleInfo(
|
|
24
|
+
AdgeistModuleImpl.NAME,
|
|
25
|
+
AdgeistModuleImpl.NAME,
|
|
25
26
|
false, // canOverrideExistingModule
|
|
26
27
|
false, // needsEagerInit
|
|
27
28
|
false, // isCxxModule
|
package/android/src/main/java/com/adgeist/{AdgeistModule.kt → implementation/AdgeistModuleImpl.kt}
RENAMED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
package com.adgeist
|
|
1
|
+
package com.adgeist.implementation
|
|
2
2
|
|
|
3
|
-
import com.facebook.react.bridge.ReactApplicationContext
|
|
4
|
-
import com.facebook.react.module.annotations.ReactModule
|
|
5
|
-
import com.facebook.react.turbomodule.core.interfaces.TurboModule
|
|
6
3
|
import com.facebook.react.bridge.Promise
|
|
7
|
-
import
|
|
4
|
+
import com.facebook.react.bridge.ReactApplicationContext
|
|
8
5
|
import com.facebook.react.bridge.Arguments
|
|
9
6
|
import com.facebook.react.bridge.WritableMap
|
|
10
7
|
import com.adgeistkit.AdgeistCore
|
|
@@ -13,20 +10,13 @@ import com.adgeistkit.Campaign
|
|
|
13
10
|
import com.adgeistkit.Creative
|
|
14
11
|
import com.adgeistkit.BudgetSettings
|
|
15
12
|
|
|
16
|
-
|
|
17
|
-
class AdgeistModule(reactContext: ReactApplicationContext) :
|
|
18
|
-
NativeAdgeistSpec(reactContext), TurboModule {
|
|
13
|
+
class AdgeistModuleImpl internal constructor(private val context: ReactApplicationContext) {
|
|
19
14
|
|
|
20
|
-
private val adgeistInstanceFromLibrary = AdgeistCore.initialize(
|
|
15
|
+
private val adgeistInstanceFromLibrary = AdgeistCore.initialize(context.applicationContext)
|
|
21
16
|
private val getAd = adgeistInstanceFromLibrary.getCreative()
|
|
22
17
|
private val postCreativeAnalytic = adgeistInstanceFromLibrary.postCreativeAnalytics()
|
|
23
18
|
|
|
24
|
-
|
|
25
|
-
override fun getName(): String {
|
|
26
|
-
return NAME
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
override fun fetchCreative(adSpaceId: String, publisherId: String, promise: Promise) {
|
|
19
|
+
fun fetchCreative(adSpaceId: String, publisherId: String, promise: Promise) {
|
|
30
20
|
getAd.fetchCreative(adSpaceId, publisherId) { adData ->
|
|
31
21
|
if (adData != null) {
|
|
32
22
|
promise.resolve(adData.toWritableMap())
|
|
@@ -36,10 +26,9 @@ class AdgeistModule(reactContext: ReactApplicationContext) :
|
|
|
36
26
|
}
|
|
37
27
|
}
|
|
38
28
|
|
|
39
|
-
|
|
29
|
+
fun sendCreativeAnalytic(campaignId: String, adSpaceId: String, publisherId: String, eventType: String, promise: Promise) {
|
|
40
30
|
postCreativeAnalytic.sendTrackingData(campaignId, adSpaceId, publisherId, eventType) { adData ->
|
|
41
31
|
if (adData != null) {
|
|
42
|
-
Log.d("MyActivity of app module", adData)
|
|
43
32
|
promise.resolve(adData)
|
|
44
33
|
} else {
|
|
45
34
|
promise.reject("NO_AD", "Couldn't find the campaign to update analytics")
|
|
@@ -49,6 +38,7 @@ class AdgeistModule(reactContext: ReactApplicationContext) :
|
|
|
49
38
|
|
|
50
39
|
companion object {
|
|
51
40
|
const val NAME = "Adgeist"
|
|
41
|
+
|
|
52
42
|
}
|
|
53
43
|
}
|
|
54
44
|
|
|
@@ -86,4 +76,4 @@ fun CreativeDataModel.toWritableMap(): WritableMap {
|
|
|
86
76
|
|
|
87
77
|
map.putMap("data", dataMap)
|
|
88
78
|
return map
|
|
89
|
-
}
|
|
79
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
package com.adgeist
|
|
2
|
+
|
|
3
|
+
import com.facebook.react.bridge.Promise
|
|
4
|
+
import com.facebook.react.bridge.ReactApplicationContext
|
|
5
|
+
import com.adgeist.implementation.AdgeistModuleImpl
|
|
6
|
+
|
|
7
|
+
class AdgeistModule internal constructor(reactContext: ReactApplicationContext) :
|
|
8
|
+
NativeAdgeistSpec(reactContext) {
|
|
9
|
+
|
|
10
|
+
private var implementation: AdgeistModuleImpl = AdgeistModuleImpl(reactContext)
|
|
11
|
+
|
|
12
|
+
override fun getName(): String = AdgeistModuleImpl.NAME
|
|
13
|
+
|
|
14
|
+
override fun fetchCreative(adSpaceId: String, publisherId: String, promise: Promise) {
|
|
15
|
+
implementation.fetchCreative(adSpaceId, publisherId, promise)
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
override fun sendCreativeAnalytic(campaignId: String, adSpaceId: String, publisherId: String, eventType: String, promise: Promise) {
|
|
19
|
+
implementation.sendCreativeAnalytic(campaignId, adSpaceId, publisherId, eventType, promise)
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
package com.adgeist
|
|
2
|
+
|
|
3
|
+
import com.facebook.react.bridge.Promise
|
|
4
|
+
import com.facebook.react.bridge.ReactApplicationContext
|
|
5
|
+
import com.facebook.react.bridge.ReactContextBaseJavaModule
|
|
6
|
+
import com.facebook.react.bridge.ReactMethod
|
|
7
|
+
import com.adgeist.implementation.AdgeistModuleImpl
|
|
8
|
+
|
|
9
|
+
class AdgeistModule internal constructor(reactContext: ReactApplicationContext) :
|
|
10
|
+
ReactContextBaseJavaModule(reactContext) {
|
|
11
|
+
|
|
12
|
+
private var implementation: AdgeistModuleImpl = AdgeistModuleImpl(reactContext)
|
|
13
|
+
|
|
14
|
+
override fun getName(): String = AdgeistModuleImpl.NAME
|
|
15
|
+
|
|
16
|
+
@ReactMethod
|
|
17
|
+
fun fetchCreative(adSpaceId: String, publisherId: String, promise: Promise) {
|
|
18
|
+
implementation.fetchCreative(adSpaceId, publisherId, promise)
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@ReactMethod
|
|
22
|
+
fun sendCreativeAnalytic(campaignId: String, adSpaceId: String, publisherId: String, eventType: String, promise: Promise) {
|
|
23
|
+
implementation.sendCreativeAnalytic(campaignId, adSpaceId, publisherId, eventType, promise)
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
}
|
package/app.plugin.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./plugin/build');
|
package/ios/Adgeist.h
CHANGED
package/ios/Adgeist.mm
CHANGED
|
@@ -10,43 +10,48 @@
|
|
|
10
10
|
AdgeistImpl *adgeist;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
// Export the module for both old and new architectures
|
|
14
|
+
RCT_EXPORT_MODULE(Adgeist)
|
|
15
|
+
|
|
16
|
+
- (instancetype)init {
|
|
14
17
|
if (self = [super init]) {
|
|
15
18
|
adgeist = [AdgeistImpl new];
|
|
16
19
|
}
|
|
17
20
|
return self;
|
|
18
21
|
}
|
|
19
22
|
|
|
20
|
-
+ (NSString *)moduleName {
|
|
21
|
-
return @"Adgeist";
|
|
22
|
-
}
|
|
23
|
-
|
|
24
23
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
// Exported methods for JS
|
|
25
|
+
RCT_EXPORT_METHOD(fetchCreative:(NSString *)adSpaceId
|
|
26
|
+
publisherId:(NSString *)publisherId
|
|
27
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
28
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
29
|
+
{
|
|
30
|
+
[adgeist fetchCreativeWithAdSpaceId:adSpaceId publisherId:publisherId resolver:resolve rejecter:reject];
|
|
30
31
|
}
|
|
31
32
|
|
|
32
|
-
|
|
33
|
+
RCT_EXPORT_METHOD(sendCreativeAnalytic:(NSString *)campaignId
|
|
33
34
|
adSpaceId:(NSString *)adSpaceId
|
|
34
35
|
publisherId:(NSString *)publisherId
|
|
35
36
|
eventType:(NSString *)eventType
|
|
36
37
|
resolve:(RCTPromiseResolveBlock)resolve
|
|
37
|
-
reject:(RCTPromiseRejectBlock)reject
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
39
|
+
{
|
|
40
|
+
[adgeist sendCreativeAnalyticWithCampaignId:campaignId
|
|
41
|
+
adSpaceId:adSpaceId
|
|
42
|
+
publisherId:publisherId
|
|
43
|
+
eventType:eventType
|
|
44
|
+
resolver:resolve
|
|
45
|
+
rejecter:reject];
|
|
44
46
|
}
|
|
45
47
|
|
|
48
|
+
// TurboModule support for the new architecture
|
|
49
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
46
50
|
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
|
|
47
51
|
(const facebook::react::ObjCTurboModule::InitParams &)params
|
|
48
52
|
{
|
|
49
53
|
return std::make_shared<facebook::react::NativeAdgeistSpecJSI>(params);
|
|
50
54
|
}
|
|
55
|
+
#endif
|
|
51
56
|
|
|
52
|
-
@end
|
|
57
|
+
@end
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
#import "React/RCTBridgeModule.h"
|
|
2
|
-
#import "React/RCTEventEmitter.h"
|
|
1
|
+
#import "React/RCTBridgeModule.h"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../src","sources":["NativeAdgeist.ts"],"mappings":";;AACA,SAASA,mBAAmB,QAAQ,cAAc;AAYlD,eAAeA,mBAAmB,CAACC,YAAY,CAAO,SAAS,CAAC","ignoreList":[]}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import React, { useEffect, useState } from 'react';
|
|
4
4
|
import { Dimensions, Image, Linking, StyleSheet, Text, View, TouchableWithoutFeedback } from 'react-native';
|
|
5
|
-
import Adgeist from
|
|
5
|
+
import Adgeist from "../NativeAdgeist.js";
|
|
6
6
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
7
|
export const BannerAd = ({
|
|
8
8
|
dataPublisherId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useEffect","useState","Dimensions","Image","Linking","StyleSheet","Text","View","TouchableWithoutFeedback","Adgeist","jsx","_jsx","jsxs","_jsxs","BannerAd","dataPublisherId","dataAdSlot","width","height","adData","setAdData","response","fetchCreative","creative","data","sendCreativeAnalytic","_id","error","console","handleClick","ctaUrl","openURL","catch","err","fileUrl","accessible","accessibilityLabel","children","style","styles","container","source","uri","options","option","adContent","logo","textContainer","titleRow","adBadge","title","numberOfLines","ellipsizeMode","description","onPress","button","buttonText","create","backgroundColor","borderRadius","resizeMode","borderTopLeftRadius","borderTopRightRadius","flexDirection","gap","position","top","left","color","textAlign","justifyContent","paddingHorizontal","paddingVertical","alignItems","borderBottomLeftRadius","borderBottomRightRadius","borderTopColor","borderTopWidth","get","borderWidth","borderColor"],"sourceRoot":"../../../src","sources":["components/BannerAd.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAClD,SACEC,UAAU,EACVC,KAAK,EACLC,OAAO,EACPC,UAAU,EACVC,IAAI,EACJC,IAAI,EACJC,wBAAwB,QACnB,cAAc;AACrB,OAAOC,OAAO,MAAM,
|
|
1
|
+
{"version":3,"names":["React","useEffect","useState","Dimensions","Image","Linking","StyleSheet","Text","View","TouchableWithoutFeedback","Adgeist","jsx","_jsx","jsxs","_jsxs","BannerAd","dataPublisherId","dataAdSlot","width","height","adData","setAdData","response","fetchCreative","creative","data","sendCreativeAnalytic","_id","error","console","handleClick","ctaUrl","openURL","catch","err","fileUrl","accessible","accessibilityLabel","children","style","styles","container","source","uri","options","option","adContent","logo","textContainer","titleRow","adBadge","title","numberOfLines","ellipsizeMode","description","onPress","button","buttonText","create","backgroundColor","borderRadius","resizeMode","borderTopLeftRadius","borderTopRightRadius","flexDirection","gap","position","top","left","color","textAlign","justifyContent","paddingHorizontal","paddingVertical","alignItems","borderBottomLeftRadius","borderBottomRightRadius","borderTopColor","borderTopWidth","get","borderWidth","borderColor"],"sourceRoot":"../../../src","sources":["components/BannerAd.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAClD,SACEC,UAAU,EACVC,KAAK,EACLC,OAAO,EACPC,UAAU,EACVC,IAAI,EACJC,IAAI,EACJC,wBAAwB,QACnB,cAAc;AACrB,OAAOC,OAAO,MAAM,qBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAqBvC,OAAO,MAAMC,QAAiC,GAAGA,CAAC;EAChDC,eAAe;EACfC,UAAU;EACVC,KAAK;EACLC;AACF,CAAC,KAAK;EACJ,MAAM,CAACC,MAAM,EAAEC,SAAS,CAAC,GAAGnB,QAAQ,CAAgB,IAAI,CAAC;EAEzDD,SAAS,CAAC,MAAM;IACd,CAAC,YAAY;MACX,IAAI;QACF,MAAMqB,QAAgB,GAAG,MAAMZ,OAAO,CAACa,aAAa,CAClDN,UAAU,EACVD,eACF,CAAC;QACD,MAAMQ,QAA0B,GAAGF,QAA4B;QAC/DD,SAAS,CAACG,QAAQ,CAACC,IAAI,CAAC;QAExB,MAAMf,OAAO,CAACgB,oBAAoB,CAChCF,QAAQ,CAACC,IAAI,CAACE,GAAG,EACjBV,UAAU,EACVD,eAAe,EACf,YACF,CAAC;MACH,CAAC,CAAC,OAAOY,KAAK,EAAE;QACdC,OAAO,CAACD,KAAK,CAAC,iBAAiB,EAAEA,KAAK,CAAC;MACzC;IACF,CAAC,EAAE,CAAC;EACN,CAAC,EAAE,CAACZ,eAAe,EAAEC,UAAU,CAAC,CAAC;EAEjC,MAAMa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ACDgC,OAAO,EAAE;IACPmB,KAAK,EAAE,OAAO;IACdV,eAAe,EAAE,OAAO;IACxBzC,KAAK,EAAE,EAAE;IACT0C,YAAY,EAAE,CAAC;IACfU,SAAS,EAAE;EACb,CAAC;EACDnB,KAAK,EAAE;IACLkB,KAAK,EAAE;EACT,CAAC;EACDf,WAAW,EAAE;IACXe,KAAK,EAAE;EACT,CAAC;EACDb,MAAM,EAAE;IACNgB,iBAAiB,EAAE,EAAE;IACrBC,eAAe,EAAE,CAAC;IAClBO,WAAW,EAAE,CAAC;IACdC,WAAW,EAAE,OAAO;IACpBrB,YAAY,EAAE,CAAC;IACfc,UAAU,EAAE,QAAQ;IACpBH,cAAc,EAAE,QAAQ;IACxBpD,MAAM,EAAE;EACV,CAAC;EACDsC,UAAU,EAAE;IACVY,KAAK,EAAE;EACT;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import React, { useEffect, useState } from 'react';
|
|
4
4
|
import { Dimensions, Image, Linking, StyleSheet, Text, View, TouchableOpacity, TouchableWithoutFeedback } from 'react-native';
|
|
5
|
-
import Adgeist from
|
|
5
|
+
import Adgeist from "../NativeAdgeist.js";
|
|
6
6
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
7
|
export const BottomBannerAd = ({
|
|
8
8
|
dataPublisherId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useEffect","useState","Dimensions","Image","Linking","StyleSheet","Text","View","TouchableOpacity","TouchableWithoutFeedback","Adgeist","jsx","_jsx","jsxs","_jsxs","BottomBannerAd","dataPublisherId","dataAdSlot","adData","setAdData","response","fetchCreative","creative","data","sendCreativeAnalytic","_id","error","console","handleClick","ctaUrl","openURL","catch","err","fileUrl","style","styles","container","onPress","accessible","accessibilityLabel","children","adContent","logo","source","uri","textContainer","titleRow","adBadge","title","numberOfLines","ellipsizeMode","description","button","buttonText","create","backgroundColor","borderRadius","resizeMode","borderTopLeftRadius","borderTopRightRadius","options","flexDirection","gap","position","top","left","option","color","width","height","textAlign","justifyContent","paddingHorizontal","paddingVertical","alignItems","get","borderWidth","borderColor"],"sourceRoot":"../../../src","sources":["components/BottomBannerAd.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAClD,SACEC,UAAU,EACVC,KAAK,EACLC,OAAO,EACPC,UAAU,EACVC,IAAI,EACJC,IAAI,EACJC,gBAAgB,EAChBC,wBAAwB,QACnB,cAAc;AACrB,OAAOC,OAAO,MAAM,
|
|
1
|
+
{"version":3,"names":["React","useEffect","useState","Dimensions","Image","Linking","StyleSheet","Text","View","TouchableOpacity","TouchableWithoutFeedback","Adgeist","jsx","_jsx","jsxs","_jsxs","BottomBannerAd","dataPublisherId","dataAdSlot","adData","setAdData","response","fetchCreative","creative","data","sendCreativeAnalytic","_id","error","console","handleClick","ctaUrl","openURL","catch","err","fileUrl","style","styles","container","onPress","accessible","accessibilityLabel","children","adContent","logo","source","uri","textContainer","titleRow","adBadge","title","numberOfLines","ellipsizeMode","description","button","buttonText","create","backgroundColor","borderRadius","resizeMode","borderTopLeftRadius","borderTopRightRadius","options","flexDirection","gap","position","top","left","option","color","width","height","textAlign","justifyContent","paddingHorizontal","paddingVertical","alignItems","get","borderWidth","borderColor"],"sourceRoot":"../../../src","sources":["components/BottomBannerAd.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAClD,SACEC,UAAU,EACVC,KAAK,EACLC,OAAO,EACPC,UAAU,EACVC,IAAI,EACJC,IAAI,EACJC,gBAAgB,EAChBC,wBAAwB,QACnB,cAAc;AACrB,OAAOC,OAAO,MAAM,qBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAmBvC,OAAO,MAAMC,cAAuC,GAAGA,CAAC;EACtDC,eAAe;EACfC;AACF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,SAAS,EAAE;EACb,CAAC;EACDtB,KAAK,EAAE;IACLmB,KAAK,EAAE;EACT,CAAC;EACDhB,WAAW,EAAE;IACXgB,KAAK,EAAE;EACT,CAAC;EACDf,MAAM,EAAE;IACNoB,iBAAiB,EAAE,EAAE;IACrBC,eAAe,EAAE,CAAC;IAClBG,WAAW,EAAE,CAAC;IACdC,WAAW,EAAE,OAAO;IACpBrB,YAAY,EAAE,CAAC;IACfkB,UAAU,EAAE,QAAQ;IACpBH,cAAc,EAAE,QAAQ;IACxBF,MAAM,EAAE;EACV,CAAC;EACDhB,UAAU,EAAE;IACVc,KAAK,EAAE;EACT;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withRNAdgeistMainApplication.d.ts","sourceRoot":"","sources":["../../../../../plugin/src/android/withRNAdgeistMainApplication.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EAIlB,MAAM,sBAAsB,CAAC;AAO9B,eAAO,MAAM,4BAA4B,EAAE,YAK1C,CAAC;AA2CF,wBAAgB,aAAa,CAAC,gBAAgB,EAAE,MAAM,GAAG,MAAM,CAqC9D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../plugin/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EAGlB,MAAM,sBAAsB,CAAC;;AA0B9B,wBAAyE"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type ConfigPlugin } from '@expo/config-plugins';
|
|
2
|
+
export declare const withRNAdgeistAppDelegate: ConfigPlugin;
|
|
3
|
+
export declare function swiftFileUpdater(originalContents: string): string;
|
|
4
|
+
export declare function objCFileUpdater(originalContents: string): string;
|
|
5
|
+
//# sourceMappingURL=withRNAdgeistAppDelegate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withRNAdgeistAppDelegate.d.ts","sourceRoot":"","sources":["../../../../../plugin/src/ios/withRNAdgeistAppDelegate.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EAGlB,MAAM,sBAAsB,CAAC;AAI9B,eAAO,MAAM,wBAAwB,EAAE,YAEtC,CAAC;AA8BF,wBAAgB,gBAAgB,CAAC,gBAAgB,EAAE,MAAM,GAAG,MAAM,CAiBjE;AAED,wBAAgB,eAAe,CAAC,gBAAgB,EAAE,MAAM,GAAG,MAAM,CA0BhE"}
|
package/package.json
CHANGED
|
@@ -1,23 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thealteroffice/react-native-adgeist",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "Publishers can integrate our SDK to connect their ad spaces to the AdGeist marketplace.",
|
|
5
|
-
"source": "./src/index.tsx",
|
|
6
5
|
"main": "./lib/module/index.js",
|
|
6
|
+
"module": "./lib/module/index.js",
|
|
7
7
|
"types": "./lib/typescript/src/index.d.ts",
|
|
8
|
-
"exports": {
|
|
9
|
-
".": {
|
|
10
|
-
"types": "./lib/typescript/src/index.d.ts",
|
|
11
|
-
"default": "./lib/module/index.js"
|
|
12
|
-
},
|
|
13
|
-
"./package.json": "./package.json"
|
|
14
|
-
},
|
|
15
8
|
"files": [
|
|
16
9
|
"src",
|
|
17
10
|
"lib",
|
|
18
11
|
"android",
|
|
19
12
|
"ios",
|
|
20
13
|
"cpp",
|
|
14
|
+
"plugin/build",
|
|
15
|
+
"plugin/tsconfig.json",
|
|
16
|
+
"app.plugin.js",
|
|
21
17
|
"*.podspec",
|
|
22
18
|
"react-native.config.js",
|
|
23
19
|
"!ios/build",
|
|
@@ -33,9 +29,10 @@
|
|
|
33
29
|
],
|
|
34
30
|
"scripts": {
|
|
35
31
|
"example": "yarn workspace react-native-adgeist-example",
|
|
32
|
+
"expo-plugin": "yarn workspace react-native-adgeist-expo-plugin",
|
|
36
33
|
"test": "jest",
|
|
37
34
|
"typecheck": "tsc",
|
|
38
|
-
"lint": "eslint \"
|
|
35
|
+
"lint": "eslint \"src/**/*.{js,ts,tsx}\" \"example/**/*.{js,ts,tsx}\"",
|
|
39
36
|
"clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
|
|
40
37
|
"prepare": "bob build",
|
|
41
38
|
"release": "release-it"
|
|
@@ -70,26 +67,36 @@
|
|
|
70
67
|
"@release-it/conventional-changelog": "^9.0.2",
|
|
71
68
|
"@types/jest": "^29.5.5",
|
|
72
69
|
"@types/react": "^19.0.0",
|
|
70
|
+
"@typescript-eslint/eslint-plugin": "^8.33.0",
|
|
73
71
|
"commitlint": "^19.6.1",
|
|
74
72
|
"del-cli": "^5.1.0",
|
|
75
73
|
"eslint": "^9.22.0",
|
|
76
74
|
"eslint-config-prettier": "^10.1.1",
|
|
75
|
+
"eslint-plugin-jest": "latest",
|
|
77
76
|
"eslint-plugin-prettier": "^5.2.3",
|
|
77
|
+
"expo": "^52.0.35",
|
|
78
78
|
"jest": "^29.7.0",
|
|
79
79
|
"prettier": "^3.0.3",
|
|
80
80
|
"react": "19.0.0",
|
|
81
|
-
"react-native": "0.
|
|
82
|
-
"react-native-builder-bob": "^0.40.
|
|
81
|
+
"react-native": "0.79.2",
|
|
82
|
+
"react-native-builder-bob": "^0.40.10",
|
|
83
83
|
"release-it": "^17.10.0",
|
|
84
84
|
"turbo": "^1.10.7",
|
|
85
85
|
"typescript": "^5.2.2"
|
|
86
86
|
},
|
|
87
87
|
"peerDependencies": {
|
|
88
|
+
"expo": ">=47.0.0",
|
|
88
89
|
"react": "*",
|
|
89
90
|
"react-native": "*"
|
|
90
91
|
},
|
|
92
|
+
"peerDependenciesMeta": {
|
|
93
|
+
"expo": {
|
|
94
|
+
"optional": true
|
|
95
|
+
}
|
|
96
|
+
},
|
|
91
97
|
"workspaces": [
|
|
92
|
-
"example"
|
|
98
|
+
"example",
|
|
99
|
+
"plugin"
|
|
93
100
|
],
|
|
94
101
|
"packageManager": "yarn@3.6.1",
|
|
95
102
|
"jest": {
|
|
@@ -134,7 +141,6 @@
|
|
|
134
141
|
"source": "src",
|
|
135
142
|
"output": "lib",
|
|
136
143
|
"targets": [
|
|
137
|
-
"codegen",
|
|
138
144
|
[
|
|
139
145
|
"module",
|
|
140
146
|
{
|
|
@@ -153,14 +159,9 @@
|
|
|
153
159
|
"name": "RNAdgeistSpec",
|
|
154
160
|
"type": "modules",
|
|
155
161
|
"jsSrcsDir": "src",
|
|
156
|
-
"outputDir": {
|
|
157
|
-
"ios": "ios/generated",
|
|
158
|
-
"android": "android/generated"
|
|
159
|
-
},
|
|
160
162
|
"android": {
|
|
161
163
|
"javaPackageName": "com.adgeist"
|
|
162
|
-
}
|
|
163
|
-
"includesGeneratedCode": true
|
|
164
|
+
}
|
|
164
165
|
},
|
|
165
166
|
"create-react-native-library": {
|
|
166
167
|
"type": "turbo-module",
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.withRNAdgeistMainApplication = void 0;
|
|
4
|
+
exports.ktFileUpdater = ktFileUpdater;
|
|
5
|
+
const config_plugins_1 = require("@expo/config-plugins");
|
|
6
|
+
const generateCode_1 = require("@expo/config-plugins/build/utils/generateCode");
|
|
7
|
+
const withRNAdgeistMainApplication = (config) => {
|
|
8
|
+
return (0, config_plugins_1.withAppBuildGradle)((0, config_plugins_1.withMainApplication)(config, readMainApplicationFileAndUpdateContents), readBuildGradleFileAndUpdateContents);
|
|
9
|
+
};
|
|
10
|
+
exports.withRNAdgeistMainApplication = withRNAdgeistMainApplication;
|
|
11
|
+
// 1. MainActivity Modifications
|
|
12
|
+
async function readMainApplicationFileAndUpdateContents(config) {
|
|
13
|
+
const { modResults: mainApplicationFile } = config;
|
|
14
|
+
const worker = getCompatibleFileUpdater(mainApplicationFile.language);
|
|
15
|
+
mainApplicationFile.contents = worker(mainApplicationFile.contents);
|
|
16
|
+
return config;
|
|
17
|
+
}
|
|
18
|
+
function readBuildGradleFileAndUpdateContents(config) {
|
|
19
|
+
const { modResults } = config;
|
|
20
|
+
if (!modResults.contents.includes('implementation "ai.adgeist:adgeistkit:')) {
|
|
21
|
+
modResults.contents = modResults.contents.replace(/dependencies\s*{/, `dependencies {
|
|
22
|
+
implementation "ai.adgeist:adgeistkit:0.0.1" // AdgeistKit Dependency`);
|
|
23
|
+
}
|
|
24
|
+
return config;
|
|
25
|
+
}
|
|
26
|
+
function getCompatibleFileUpdater(language) {
|
|
27
|
+
switch (language) {
|
|
28
|
+
case 'kt':
|
|
29
|
+
return ktFileUpdater;
|
|
30
|
+
default:
|
|
31
|
+
throw new Error(`Cannot add React Native Orientation Director code to MainActivity of language "${language}"`);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
function ktFileUpdater(originalContents) {
|
|
35
|
+
// Safer anchor detection
|
|
36
|
+
const anchors = [
|
|
37
|
+
/super\.onCreate\(/,
|
|
38
|
+
/@Override\s+fun onCreate\(/,
|
|
39
|
+
/class \w+ : ReactActivity/,
|
|
40
|
+
].find((anchor) => anchor.test(originalContents));
|
|
41
|
+
if (!anchors) {
|
|
42
|
+
throw new Error('Could not find suitable insertion point in MainActivity');
|
|
43
|
+
}
|
|
44
|
+
const packageImportCodeBlock = 'import com.adgeist.AdgeistPackage';
|
|
45
|
+
const rightBeforeClassDeclaration = /import com.facebook.react.ReactPackage/;
|
|
46
|
+
const importMergeResults = (0, generateCode_1.mergeContents)({
|
|
47
|
+
tag: '@react-native-adgeist/package-import',
|
|
48
|
+
src: originalContents,
|
|
49
|
+
newSrc: packageImportCodeBlock,
|
|
50
|
+
anchor: rightBeforeClassDeclaration,
|
|
51
|
+
offset: 0,
|
|
52
|
+
comment: '// React Native Adgeist',
|
|
53
|
+
});
|
|
54
|
+
const onConfigurationChangedCodeBlock = `packages.add(AdgeistPackage())`;
|
|
55
|
+
const rightBeforeOnReturnStatement = /return packages/;
|
|
56
|
+
const implementationMergeResults = (0, generateCode_1.mergeContents)({
|
|
57
|
+
tag: '@react-native-adgeist/package-initialization',
|
|
58
|
+
src: importMergeResults.contents,
|
|
59
|
+
newSrc: onConfigurationChangedCodeBlock,
|
|
60
|
+
anchor: rightBeforeOnReturnStatement,
|
|
61
|
+
offset: 0,
|
|
62
|
+
comment: '// Package Initialization',
|
|
63
|
+
});
|
|
64
|
+
return implementationMergeResults.contents;
|
|
65
|
+
}
|