@rafaykhan021/mas-capacitor 1.0.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/Package.swift ADDED
@@ -0,0 +1,28 @@
1
+ // swift-tools-version: 5.9
2
+ import PackageDescription
3
+
4
+ let package = Package(
5
+ name: "Yodo1MasCapacitor",
6
+ platforms: [.iOS(.v15)],
7
+ products: [
8
+ .library(
9
+ name: "Yodo1MasCapacitor",
10
+ targets: ["Yodo1MasPlugin"])
11
+ ],
12
+ dependencies: [
13
+ .package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "8.0.0")
14
+ ],
15
+ targets: [
16
+ .target(
17
+ name: "Yodo1MasPlugin",
18
+ dependencies: [
19
+ .product(name: "Capacitor", package: "capacitor-swift-pm"),
20
+ .product(name: "Cordova", package: "capacitor-swift-pm")
21
+ ],
22
+ path: "ios/Sources/Yodo1MasPlugin"),
23
+ .testTarget(
24
+ name: "Yodo1MasPluginTests",
25
+ dependencies: ["Yodo1MasPlugin"],
26
+ path: "ios/Tests/Yodo1MasPluginTests")
27
+ ]
28
+ )
package/README.md ADDED
@@ -0,0 +1,158 @@
1
+ # @yodo1/mas-capacitor
2
+
3
+ A Capacitor Plugin for Yodo1 MAS
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install @yodo1/mas-capacitor
9
+ npx cap sync
10
+ ```
11
+
12
+ ## API
13
+
14
+ <docgen-index>
15
+
16
+ * [`initialize(...)`](#initialize)
17
+ * [`loadAd(...)`](#loadad)
18
+ * [`showAd(...)`](#showad)
19
+ * [`isAdLoaded(...)`](#isadloaded)
20
+ * [Interfaces](#interfaces)
21
+ * [Type Aliases](#type-aliases)
22
+
23
+ </docgen-index>
24
+
25
+ <docgen-api>
26
+ <!--Update the source file JSDoc comments and rerun docgen to update the docs below-->
27
+
28
+ ### initialize(...)
29
+
30
+ ```typescript
31
+ initialize(options: InitializeOptions) => Promise<InitializeResult>
32
+ ```
33
+
34
+ | Param | Type |
35
+ | ------------- | --------------------------------------------------------------- |
36
+ | **`options`** | <code><a href="#initializeoptions">InitializeOptions</a></code> |
37
+
38
+ **Returns:** <code>Promise&lt;<a href="#initializeresult">InitializeResult</a>&gt;</code>
39
+
40
+ --------------------
41
+
42
+
43
+ ### loadAd(...)
44
+
45
+ ```typescript
46
+ loadAd(options: LoadAdOptions) => Promise<ActionResult>
47
+ ```
48
+
49
+ | Param | Type |
50
+ | ------------- | ------------------------------------------------------- |
51
+ | **`options`** | <code><a href="#loadadoptions">LoadAdOptions</a></code> |
52
+
53
+ **Returns:** <code>Promise&lt;<a href="#actionresult">ActionResult</a>&gt;</code>
54
+
55
+ --------------------
56
+
57
+
58
+ ### showAd(...)
59
+
60
+ ```typescript
61
+ showAd(options: ShowAdOptions) => Promise<ActionResult>
62
+ ```
63
+
64
+ | Param | Type |
65
+ | ------------- | ------------------------------------------------------- |
66
+ | **`options`** | <code><a href="#showadoptions">ShowAdOptions</a></code> |
67
+
68
+ **Returns:** <code>Promise&lt;<a href="#actionresult">ActionResult</a>&gt;</code>
69
+
70
+ --------------------
71
+
72
+
73
+ ### isAdLoaded(...)
74
+
75
+ ```typescript
76
+ isAdLoaded(options: IsAdLoadedOptions) => Promise<IsAdLoadedResult>
77
+ ```
78
+
79
+ | Param | Type |
80
+ | ------------- | --------------------------------------------------------------- |
81
+ | **`options`** | <code><a href="#isadloadedoptions">IsAdLoadedOptions</a></code> |
82
+
83
+ **Returns:** <code>Promise&lt;<a href="#isadloadedresult">IsAdLoadedResult</a>&gt;</code>
84
+
85
+ --------------------
86
+
87
+
88
+ ### Interfaces
89
+
90
+
91
+ #### InitializeResult
92
+
93
+ | Prop | Type |
94
+ | ----------------- | -------------------- |
95
+ | **`initialized`** | <code>boolean</code> |
96
+ | **`errorCode`** | <code>string</code> |
97
+ | **`message`** | <code>string</code> |
98
+
99
+
100
+ #### InitializeOptions
101
+
102
+ | Prop | Type |
103
+ | ------------------------- | -------------------- |
104
+ | **`appKey`** | <code>string</code> |
105
+ | **`coppa`** | <code>boolean</code> |
106
+ | **`gdpr`** | <code>boolean</code> |
107
+ | **`ccpa`** | <code>boolean</code> |
108
+ | **`autoDelayIfLoadFail`** | <code>boolean</code> |
109
+
110
+
111
+ #### ActionResult
112
+
113
+ | Prop | Type |
114
+ | ----------------- | ----------------------------------------- |
115
+ | **`ok`** | <code>boolean</code> |
116
+ | **`action`** | <code>'loadAd' \| 'showAd'</code> |
117
+ | **`adType`** | <code><a href="#adtype">AdType</a></code> |
118
+ | **`placementId`** | <code>string</code> |
119
+
120
+
121
+ #### LoadAdOptions
122
+
123
+ | Prop | Type |
124
+ | ------------ | ----------------------------------------- |
125
+ | **`adType`** | <code><a href="#adtype">AdType</a></code> |
126
+
127
+
128
+ #### ShowAdOptions
129
+
130
+ | Prop | Type |
131
+ | ----------------- | ----------------------------------------- |
132
+ | **`adType`** | <code><a href="#adtype">AdType</a></code> |
133
+ | **`placementId`** | <code>string</code> |
134
+
135
+
136
+ #### IsAdLoadedResult
137
+
138
+ | Prop | Type |
139
+ | -------------- | ----------------------------------------- |
140
+ | **`isLoaded`** | <code>boolean</code> |
141
+ | **`adType`** | <code><a href="#adtype">AdType</a></code> |
142
+
143
+
144
+ #### IsAdLoadedOptions
145
+
146
+ | Prop | Type |
147
+ | ------------ | ----------------------------------------- |
148
+ | **`adType`** | <code><a href="#adtype">AdType</a></code> |
149
+
150
+
151
+ ### Type Aliases
152
+
153
+
154
+ #### AdType
155
+
156
+ <code>'appopen' | 'interstitial' | 'rewarded'</code>
157
+
158
+ </docgen-api>
@@ -0,0 +1,21 @@
1
+ require 'json'
2
+
3
+ package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
4
+
5
+ Pod::Spec.new do |s|
6
+ s.name = 'Yodo1MasCapacitor'
7
+ s.version = package['version']
8
+ s.summary = package['description']
9
+ s.license = package['license']
10
+ s.homepage = package['repository']['url']
11
+ s.author = package['author']
12
+ s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
13
+
14
+ s.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}'
15
+ s.ios.deployment_target = '15.0'
16
+ s.swift_version = '5.1'
17
+
18
+ s.dependency 'Capacitor'
19
+ s.dependency 'CapacitorCordova'
20
+ s.dependency 'Yodo1MasFull', '4.17.1'
21
+ end
@@ -0,0 +1,66 @@
1
+ ext {
2
+ junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
3
+ androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.1'
4
+ androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.3.0'
5
+ androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.7.0'
6
+ }
7
+
8
+ buildscript {
9
+ repositories {
10
+ google()
11
+ mavenCentral()
12
+ }
13
+ dependencies {
14
+ classpath 'com.android.tools.build:gradle:8.13.0'
15
+ }
16
+ }
17
+
18
+ apply plugin: 'com.android.library'
19
+
20
+ android {
21
+ namespace = "com.yodo1.mas.capacitor"
22
+ compileSdk = project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 36
23
+ defaultConfig {
24
+ minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 24
25
+ targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 36
26
+ versionCode 1
27
+ versionName "1.0"
28
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
29
+ }
30
+ buildTypes {
31
+ release {
32
+ minifyEnabled false
33
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
34
+ }
35
+ }
36
+ lintOptions {
37
+ abortOnError = false
38
+ }
39
+ compileOptions {
40
+ sourceCompatibility JavaVersion.VERSION_21
41
+ targetCompatibility JavaVersion.VERSION_21
42
+ }
43
+ }
44
+
45
+ repositories {
46
+ google()
47
+ mavenCentral()
48
+ maven { url "https://artifact.bytedance.com/repository/pangle" }
49
+ maven { url "https://android-sdk.is.com" }
50
+ maven { url "https://dl-maven-android.mintegral.com/repository/mbridge_android_sdk_oversea" }
51
+ maven { url "https://artifactory.bidmachine.io/bidmachine" }
52
+ maven { url "https://ysonetwork.s3.eu-west-3.amazonaws.com/sdk/android" }
53
+ maven { url "https://repo.pubmatic.com/artifactory/public-repos" }
54
+ maven { url "https://cboost.jfrog.io/artifactory/chartboost-ads/" }
55
+ }
56
+
57
+
58
+ dependencies {
59
+ implementation fileTree(dir: 'libs', include: ['*.jar'])
60
+ implementation project(':capacitor-android')
61
+ implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
62
+ testImplementation "junit:junit:$junitVersion"
63
+ androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
64
+ androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
65
+ implementation 'com.yodo1.mas:full:4.17.1'
66
+ }
@@ -0,0 +1,2 @@
1
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android">
2
+ </manifest>
@@ -0,0 +1,11 @@
1
+ package com.yodo1.mas.capacitor;
2
+
3
+ import com.getcapacitor.Logger;
4
+
5
+ public class Yodo1Mas {
6
+
7
+ public String echo(String value) {
8
+ Logger.info("Echo", value);
9
+ return value;
10
+ }
11
+ }