Skip to content

Commit d98af6a

Browse files
committed
Publish version 2.1.2
0 parents  commit d98af6a

11 files changed

+846
-0
lines changed

.gitattributes

Whitespace-only changes.

.gitignore

+399
Large diffs are not rendered by default.

CHANGELOG.md

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Changelog
2+
3+
## 2.1.2 (7 Jun, 2021)
4+
#### Android
5+
- Update native dependency to `2.1.2`
6+
7+
## 2.1.1 (22 May, 2021)
8+
- Add **Standard banner** feature.
9+
- Use static class for `TapsellPlus`
10+
- Helps for completion and guides when using it's APIs
11+
- You can use `import {TapsellPlus}` or `import TapsellPlus`
12+
- Add **native banner**
13+
- Refactor all methods due to new android changes
14+
15+
16+
```js
17+
import { TapsellPlus } from 'react-native-tapsell-plus';
18+
19+
TapsellPlus.initialize(key);
20+
```
21+
22+
#### Android
23+
- Update native functionality to `2.1.1`
24+
25+
## 1.2.7 (27 Apr, 2021)
26+
#### Android
27+
- Update native library to 1.2.5
28+
29+
## 1.2.4-alpha01 (26 Apr, 2021)
30+
#### Android
31+
- Update native library to 1.2.2

README.md

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# TapsellPlusSDK-ReactNativePlugin [![npm version](https://img.shields.io/npm/v/react-native-tapsell-plus?color=green&label=react-native-tapsell-plus&logo=react)](https://www.npmjs.com/package/react-native-tapsell-plus)
2+
3+
# react-native-tapsell-plus
4+
5+
## Getting started
6+
7+
`$ npm install react-native-tapsell-plus --save`
8+
9+
10+
> If your react-native version is below `0.60`, you need to link it as well:
11+
>
12+
> ```
13+
> $ react-native link react-native-tapsell-plus
14+
> ```
15+
16+
17+
<details>
18+
<summary>Manual installation (Older react native versions)</summary>
19+
20+
#### Android
21+
22+
1. Open up `android/app/src/main/java/[...]/MainActivity.java`
23+
- Add `import com.reactlibrary.RNTapsellPlusPackage;` to the imports at the top of the file
24+
- Add `new RNTapsellPlusPackage()` to the list returned by the `getPackages()` method
25+
2. Append the following lines to `android/settings.gradle`:
26+
```
27+
include ':react-native-tapsell-plus'
28+
project(':react-native-tapsell-plus').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-tapsell-plus/android')
29+
```
30+
3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:
31+
```
32+
compile project(':react-native-tapsell-plus')
33+
```
34+
35+
</details>
36+
37+
38+
39+
## Usage
40+
```javascript
41+
import RNTapsellPlus from 'react-native-tapsell-plus';
42+
43+
// TODO: What to do with the module?
44+
RNTapsellPlus;
45+
```
46+

android/build.gradle

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
2+
buildscript {
3+
repositories {
4+
jcenter()
5+
}
6+
7+
dependencies {
8+
classpath 'com.android.tools.build:gradle:1.3.1'
9+
}
10+
}
11+
12+
apply plugin: 'com.android.library'
13+
14+
android {
15+
compileSdkVersion 29
16+
buildToolsVersion "29.0.2"
17+
18+
defaultConfig {
19+
minSdkVersion 16
20+
targetSdkVersion 29
21+
versionCode 1
22+
versionName "1.0"
23+
}
24+
lintOptions {
25+
abortOnError false
26+
}
27+
}
28+
29+
rootProject.allprojects {
30+
repositories {
31+
mavenCentral()
32+
}
33+
}
34+
35+
dependencies {
36+
//noinspection GradleDynamicVersion
37+
implementation 'com.facebook.react:react-native:+'
38+
implementation 'ir.tapsell.plus:tapsell-plus-sdk-reactnative:2.1.2'
39+
}
40+

android/src/main/AndroidManifest.xml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="ir.tapsell.plus">
4+
5+
</manifest>
6+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
2+
package ir.tapsell.plus;
3+
4+
import java.util.Arrays;
5+
import java.util.Collections;
6+
import java.util.List;
7+
8+
import com.facebook.react.ReactPackage;
9+
import com.facebook.react.bridge.NativeModule;
10+
import com.facebook.react.bridge.ReactApplicationContext;
11+
import com.facebook.react.uimanager.ViewManager;
12+
import com.facebook.react.bridge.JavaScriptModule;
13+
14+
public class RNTapsellPlusPackage implements ReactPackage, NoProguard {
15+
@Override
16+
public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
17+
return Arrays.<NativeModule>asList(new RNTapsellPlusModule(reactContext));
18+
}
19+
20+
// Deprecated from RN 0.47
21+
public List<Class<? extends JavaScriptModule>> createJSModules() {
22+
return Collections.emptyList();
23+
}
24+
25+
@Override
26+
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
27+
return Collections.emptyList();
28+
}
29+
}

0 commit comments

Comments
 (0)