-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from tenjin/release-1.0.0
Release 1.0.0
- Loading branch information
Showing
40 changed files
with
7,506 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# node files | ||
dist | ||
node_modules | ||
|
||
# iOS files | ||
Pods | ||
Podfile.lock | ||
Build | ||
xcuserdata | ||
|
||
# macOS files | ||
.DS_Store | ||
|
||
|
||
|
||
# Based on Android gitignore template: https://github.com/github/gitignore/blob/HEAD/Android.gitignore | ||
|
||
# Built application files | ||
*.apk | ||
*.ap_ | ||
|
||
# Files for the ART/Dalvik VM | ||
*.dex | ||
|
||
# Java class files | ||
*.class | ||
|
||
# Generated files | ||
bin | ||
gen | ||
out | ||
|
||
# Gradle files | ||
.gradle | ||
build | ||
|
||
# Local configuration file (sdk path, etc) | ||
local.properties | ||
|
||
# Proguard folder generated by Eclipse | ||
proguard | ||
|
||
# Log Files | ||
*.log | ||
|
||
# Android Studio Navigation editor temp files | ||
.navigation | ||
|
||
# Android Studio captures folder | ||
captures | ||
|
||
# IntelliJ | ||
*.iml | ||
.idea | ||
|
||
# Keystore files | ||
# Uncomment the following line if you do not want to check your keystore files in. | ||
#*.jks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
require 'json' | ||
|
||
package = JSON.parse(File.read(File.join(__dir__, 'package.json'))) | ||
|
||
Pod::Spec.new do |s| | ||
s.name = 'IonicCapacitorTenjin' | ||
s.version = package['version'] | ||
s.summary = package['description'] | ||
s.license = package['license'] | ||
s.homepage = package['repository']['url'] | ||
s.author = package['author'] | ||
s.source = { :git => package['repository']['url'], :tag => s.version.to_s } | ||
s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' | ||
s.static_framework = true | ||
s.ios.deployment_target = '13.0' | ||
s.dependency 'Capacitor' | ||
s.dependency 'TenjinSDK', '1.12.21' | ||
s.swift_version = '5.1' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
# Tenjin Ionic Capacitor Plugin | ||
|
||
# Summary | ||
|
||
Tenjin's SDK allows users to track events and installs in their iOS apps. To learn more about Tenjin and our product offering, please visit https://www.tenjin.com. | ||
|
||
### Notes: | ||
|
||
On iOS: | ||
For AppTrackingTransparency, be sure to update your project `.plist` file and add `NSUserTrackingUsageDescription` along with the text message you want to display to users. This library is only available in iOS 14.0+. For further information on this, you can check our [iOS documentation](https://github.com/tenjin/tenjin-ios-sdk#-skadnetwork-and-ios-15-advertiser-postbacks) | ||
|
||
On Android: | ||
You will need to add [Google's Install Referrer Library](https://developer.android.com/google/play/installreferrer/library.html) to your gradle dependencies. If you haven’t already installed the [Google Play Services](https://developers.google.com/android/guides/setup) you also need to add it | ||
```gradle | ||
dependencies { | ||
classpath("com.android.installreferrer:installreferrer:1.1.2") | ||
classpath("com.google.android.gms:play-services-analytics:17.0.0") | ||
} | ||
``` | ||
|
||
# Plugin Integration | ||
|
||
## Install | ||
|
||
```bash | ||
npm install ionic-capacitor-tenjin | ||
npx cap sync | ||
``` | ||
|
||
### Import | ||
```javascript | ||
import Tenjin from 'ionic-capacitor-tenjin'; | ||
``` | ||
|
||
## Available methods | ||
|
||
### Initialize | ||
You need to initialize the plugin before doing calling any of the other methods available, for this, you would need the api key provided on Tenjin's dashboard: | ||
```javascript | ||
Tenjin.initialize(sdkKey: string) | ||
``` | ||
|
||
### Connect | ||
```typescript | ||
Tenjin.connect() | ||
``` | ||
|
||
### OptIn | ||
```typescript | ||
Tenjin.optIn() | ||
``` | ||
|
||
### OptOut | ||
```typescript | ||
Tenjin.optOut() | ||
``` | ||
|
||
### OptIn with parameters | ||
```typescript | ||
Tenjin.optIn(params: string[]) | ||
``` | ||
|
||
### OptOut with parameters | ||
```typescript | ||
Tenjin.optOut(params: string[]) | ||
``` | ||
|
||
### Register transaction | ||
```typescript | ||
transaction(productName: string, currencyCode: string, quantity: number, unitPrice: number) | ||
``` | ||
|
||
### Send event with name | ||
```typescript | ||
Tenjin.eventWithName(name: string) | ||
``` | ||
|
||
### Send event with name and value | ||
```typescript | ||
Tenjin.eventWithNameAndValue(name: string, value: string) | ||
``` | ||
|
||
### Get attribution info | ||
```typescript | ||
Tenjin.getAttributionInfo() | ||
``` | ||
Returns: `JSON` | ||
|
||
### Append app subversion | ||
```typescript | ||
Tenjin.appendAppSubversion(subversion: number) | ||
``` | ||
|
||
### Send AdMob impression (ILRD) | ||
```javascript | ||
Tenjin.eventAdImpressionAdMob(json) | ||
``` | ||
Parameters: | ||
- `json`: JSON | ||
|
||
### Send AppLovin impression (ILRD) | ||
```javascript | ||
Tenjin.eventAdImpressionAppLovin(json) | ||
``` | ||
Parameters: | ||
- `json`: JSON | ||
|
||
### Send HyperBid impression (ILRD) | ||
```javascript | ||
Tenjin.eventAdImpressionHyperBid(json) | ||
``` | ||
Parameters: | ||
- `json`: JSON | ||
|
||
### Send IronSource impression (ILRD) | ||
```javascript | ||
Tenjin.eventAdImpressionIronSource(json) | ||
``` | ||
Parameters: | ||
- `json`: JSON | ||
|
||
### Send TopOn impression (ILRD) | ||
```javascript | ||
Tenjin.eventAdImpressionTopOn(json) | ||
``` | ||
Parameters: | ||
- `json`: JSON | ||
|
||
## Support | ||
If you have any issues with the plugin integration or usage, please contact us to [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
ext { | ||
junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2' | ||
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.4.2' | ||
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.3' | ||
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.4.0' | ||
} | ||
|
||
buildscript { | ||
repositories { | ||
google() | ||
mavenCentral() | ||
} | ||
dependencies { | ||
classpath 'com.android.tools.build:gradle:7.2.1' | ||
} | ||
} | ||
|
||
apply plugin: 'com.android.library' | ||
|
||
android { | ||
compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 32 | ||
defaultConfig { | ||
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 22 | ||
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 32 | ||
versionCode 1 | ||
versionName "1.0" | ||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | ||
} | ||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
lintOptions { | ||
abortOnError false | ||
} | ||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_11 | ||
targetCompatibility JavaVersion.VERSION_11 | ||
} | ||
} | ||
|
||
repositories { | ||
google() | ||
mavenCentral() | ||
} | ||
|
||
|
||
dependencies { | ||
implementation fileTree(dir: 'libs', include: ['*.jar']) | ||
implementation project(':capacitor-android') | ||
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion" | ||
implementation 'com.tenjin:android-sdk:1.12.19' | ||
testImplementation "junit:junit:$junitVersion" | ||
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion" | ||
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Project-wide Gradle settings. | ||
|
||
# IDE (e.g. Android Studio) users: | ||
# Gradle settings configured through the IDE *will override* | ||
# any settings specified in this file. | ||
|
||
# For more details on how to configure your build environment visit | ||
# http://www.gradle.org/docs/current/userguide/build_environment.html | ||
|
||
# Specifies the JVM arguments used for the daemon process. | ||
# The setting is particularly useful for tweaking memory settings. | ||
org.gradle.jvmargs=-Xmx1536m | ||
|
||
# When configured, Gradle will run in incubating parallel mode. | ||
# This option should only be used with decoupled projects. More details, visit | ||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects | ||
# org.gradle.parallel=true | ||
|
||
# AndroidX package structure to make it clearer which packages are bundled with the | ||
# Android operating system, and which are packaged with your app's APK | ||
# https://developer.android.com/topic/libraries/support-library/androidx-rn | ||
android.useAndroidX=true | ||
# Automatically convert third-party libraries to use AndroidX | ||
android.enableJetifier=true |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Oops, something went wrong.