Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
with:
targetPlatform: iOS
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: Build
path: build
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:
# After
echo "Disk space after:"
df -h
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
if: always()
with:
name: Test results for ${{ matrix.testMode }}
Expand Down
2 changes: 1 addition & 1 deletion Assets/AppsFlyer/AppsFlyer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace AppsFlyerSDK
{
public class AppsFlyer : MonoBehaviour
{
public static readonly string kAppsFlyerPluginVersion = "6.15.3";
public static readonly string kAppsFlyerPluginVersion = "6.16.0";
public static string CallBackObjectName = null;
private static EventHandler onRequestResponse;
private static EventHandler onInAppResponse;
Expand Down
6 changes: 3 additions & 3 deletions Assets/AppsFlyer/Editor/AppsFlyerDependencies.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
<dependencies>

<androidPackages>
<androidPackage spec="com.appsflyer:af-android-sdk:6.15.0">
<androidPackage spec="com.appsflyer:af-android-sdk:6.16.0">
</androidPackage>
<androidPackage spec="com.appsflyer:unity-wrapper:6.15.3">
<androidPackage spec="com.appsflyer:unity-wrapper:6.16.0">
</androidPackage>
<androidPackage spec="com.android.installreferrer:installreferrer:2.1">
</androidPackage>
</androidPackages>

<iosPods>
<iosPod name="AppsFlyerFramework" version="6.15.2" minTargetSdk="12.0">
<iosPod name="AppsFlyerFramework" version="6.16.0" minTargetSdk="12.0">
</iosPod>
</iosPods>

Expand Down
2 changes: 1 addition & 1 deletion Assets/AppsFlyer/Plugins/iOS/AppsFlyeriOSWrapper.mm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ static void unityCallBack(NSString* objectName, const char* method, const char*

const void _startSDK(bool shouldCallback, const char* objectName) {
[[AppsFlyerLib shared] setPluginInfoWith: AFSDKPluginUnity
pluginVersion:@"6.15.3"
pluginVersion:@"6.16.0"
additionalParams:nil];
startRequestObjectName = stringFromChar(objectName);
AppsFlyeriOSWarpper.didCallStart = YES;
Expand Down
2 changes: 1 addition & 1 deletion Assets/AppsFlyer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "appsflyer-unity-plugin",
"displayName": "AppsFlyer",
"description": "AppsFlyer Unity plugin",
"version": "6.15.2",
"version": "6.15.3",
"unity": "2019.4",
"license": "MIT"
}
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Versions
## v6.15.3
* Fix logAdRevenue - revenue value will not be rounded

## v6.15.2
* Update iOS SDK version - 6.15.2

Expand Down
5 changes: 3 additions & 2 deletions android-unity-wrapper/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 29
namespace 'com.appsflyer.unitywrapper'
compileSdkVersion 33


defaultConfig {
applicationId "com.appsflyer.unitywrapper"
minSdkVersion 16
targetSdkVersion 29
targetSdkVersion 32
versionCode 1
versionName "1.0"

Expand Down
3 changes: 1 addition & 2 deletions android-unity-wrapper/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.appsflyer.unity">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application
android:allowBackup="true"
Expand Down
3 changes: 2 additions & 1 deletion android-unity-wrapper/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ buildscript {
agp_version1 = '7.4.2'
agp_version2 = '7.1.0'
agp_version3 = '3.6.1'
agp_version4 = '8.1.0'
}
repositories {
google()
mavenCentral()

}
dependencies {
classpath "com.android.tools.build:gradle:$agp_version3"
classpath "com.android.tools.build:gradle:$agp_version4"
classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.21.2"

// NOTE: Do not place your application dependencies here; they belong
Expand Down
4 changes: 2 additions & 2 deletions android-unity-wrapper/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ android.enableJetifier=true

GROUP=com.appsflyer

VERSION_CODE=45
VERSION_NAME=6.15.3
VERSION_CODE=46
VERSION_NAME=6.16.0

POM_ARTIFACT_ID=unity-wrapper
POM_PACKAGING=aar
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sun Jul 14 11:38:33 IDT 2024
#Tue Jan 21 12:53:02 IST 2025
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
6 changes: 3 additions & 3 deletions android-unity-wrapper/unitywrapper/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
apply plugin: 'com.android.library'

android {
namespace "com.appsflyer.unitywrapper"
compileSdkVersion 33


defaultConfig {
minSdkVersion 16
targetSdkVersion 33
targetSdkVersion 34
versionCode 1
versionName "1.0"

Expand All @@ -31,7 +31,7 @@ repositories {
dependencies {
compileOnly fileTree(dir: 'libs', include: ['*.jar'])
compileOnly 'androidx.appcompat:appcompat:1.1.0'
compileOnly 'com.appsflyer:af-android-sdk:6.15.0'
compileOnly 'com.appsflyer:af-android-sdk:6.16.0'

}

Expand Down
142 changes: 93 additions & 49 deletions android-unity-wrapper/unitywrapper/publish.gradle
Original file line number Diff line number Diff line change
@@ -1,70 +1,114 @@
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'signing'

def isReleaseBuild() {
return !VERSION_NAME.contains("SNAPSHOT")
return !VERSION_NAME.contains("-SNAPSHOT")
}

afterEvaluate { project ->
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
pom.groupId = GROUP
pom.artifactId = POM_ARTIFACT_ID
pom.version = VERSION_NAME
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
pom.project {
name POM_NAME
packaging POM_PACKAGING
description POM_DESCRIPTION
url POM_URL
scm {
url POM_SCM_URL
connection POM_SCM_CONNECTION
developerConnection POM_SCM_DEV_CONNECTION
}
def getReleaseRepositoryUrl() {
return hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL
: "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
}

def getSnapshotRepositoryUrl() {
return hasProperty('SNAPSHOT_REPOSITORY_URL') ? SNAPSHOT_REPOSITORY_URL
: "https://oss.sonatype.org/content/repositories/snapshots/"
}

android {
publishing {
singleVariant("release") {
// if you don't want sources/javadoc, remove these lines
withJavadocJar()
}
}
}

afterEvaluate {
publishing {
publications {
release(MavenPublication) {
// The coordinates of the library
groupId = GROUP
artifactId = POM_ARTIFACT_ID
version = VERSION_NAME

// Artifacts to publish
artifact("$buildDir/outputs/aar/${project.name}-release.aar")

// Configure POM metadata
pom {
name.set(POM_NAME)
description.set(POM_DESCRIPTION)
url.set(POM_URL)

licenses {
license {
name POM_LICENCE_NAME
url POM_LICENCE_URL
distribution POM_LICENCE_DIST
name.set(POM_LICENCE_NAME)
url.set(POM_LICENCE_URL)
distribution.set(POM_LICENCE_DIST)
}
}

developers {
developer {
id POM_DEVELOPER_ID
name POM_DEVELOPER_NAME
id.set(POM_DEVELOPER_ID)
name.set(POM_DEVELOPER_NAME)
}
}

scm {
connection.set(POM_SCM_CONNECTION)
developerConnection.set(POM_SCM_DEV_CONNECTION)
url.set(POM_SCM_URL)
}
}

// Add dependencies to the POM
pom.withXml {
def dependenciesNode = asNode().appendNode('dependencies')
configurations.implementation.allDependencies.each { dependency ->
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', dependency.group ?: '')
dependencyNode.appendNode('artifactId', dependency.name)
dependencyNode.appendNode('version', dependency.version ?: '')
}
}
}
}
}
signing {
required { isReleaseBuild() && gradle.taskGraph.hasTask("uploadArchives") }
sign configurations.archives
}
task androidJavadocs(type: Javadoc) {
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
if (JavaVersion.current().isJava8Compatible()) {
allprojects {
tasks.withType(Javadoc) { options.addStringOption('Xdoclint:none', '-quiet') }

repositories {
maven {
name = "sonatype"
url = isReleaseBuild() ? getReleaseRepositoryUrl() : getSnapshotRepositoryUrl()

credentials {
username = ossrhUsername
password = ossrhPassword
}
}
}
}
task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) {
archiveClassifier = 'javadoc'
from androidJavadocs.destinationDir
}
task androidSourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.sourceFiles

signing {
required { isReleaseBuild() && gradle.taskGraph.hasTask("publish") }
sign publishing.publications.release
}
artifacts { archives androidJavadocsJar }
// task androidJavadocs(type: Javadoc) {
// classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
// if (JavaVersion.current().isJava8Compatible()) {
// allprojects {
// tasks.withType(Javadoc) { options.addStringOption('Xdoclint:none', '-quiet') }
// }
// }
// }
// task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) {
// archiveClassifier = 'javadoc'
// from androidJavadocs.destinationDir
// }
// task androidSourcesJar(type: Jar) {
// classifier = 'sources'
// from android.sourceSets.main.java.sourceFiles
// }
// artifacts { archives androidJavadocsJar }
}
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.appsflyer.unity" />
<manifest xmlns:android="http://schemas.android.com/apk/res/android"/>
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public class AppsFlyerAndroidWrapper {
private static final String ON_DEEPLINKING = "onDeepLinking";
private static final String START_REQUEST_CALLBACK = "requestResponseReceived";
private static final String IN_APP_RESPONSE_CALLBACK = "inAppResponseReceived";
private static final String PLUGIN_VERSION = "6.15.3";
private static final String PLUGIN_VERSION = "6.16.0";
private static final long DDL_TIMEOUT_DEFAULT = 3000;
private static AppsFlyerConversionListener conversionListener;
private static String devkey = "";
Expand Down
Binary file removed appsflyer-unity-plugin-6.15.2.unitypackage
Binary file not shown.
Binary file added appsflyer-unity-plugin-6.15.3.unitypackage
Binary file not shown.
4 changes: 2 additions & 2 deletions deploy/build_unity_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ echo "Start Build for appsflyer-unity-plugin.unitypackage"

DEPLOY_PATH=outputs
UNITY_PATH="/Applications/Unity/Unity.app/Contents/MacOS/Unity"
PACKAGE_NAME="appsflyer-unity-plugin-6.15.2.unitypackage"
PACKAGE_NAME="appsflyer-unity-plugin-6.15.3.unitypackage"
mkdir -p $DEPLOY_PATH

#move external dependency manager
Expand All @@ -23,7 +23,7 @@ mv external-dependency-manager-1.2.177.unitypackage ..
Assets \
$PWD/$DEPLOY_PATH/$PACKAGE_NAME \
-quit \
&& echo "package exported successfully to outputs/appsflyer-unity-plugin-6.15.2.unitypackage" \
&& echo "package exported successfully to outputs/appsflyer-unity-plugin-6.15.3.unitypackage" \
|| echo "Failed to export package. See create_unity_core.log for more info."


Expand Down
4 changes: 2 additions & 2 deletions deploy/strict_mode_build_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ echo "Start Build for appsflyer-unity-plugin.unitypackage. Strict Mode."

DEPLOY_PATH=outputs
UNITY_PATH="/Applications/Unity/Unity.app/Contents/MacOS/Unity"
PACKAGE_NAME="appsflyer-unity-plugin-strict-mode-6.15.2.unitypackage"
PACKAGE_NAME="appsflyer-unity-plugin-strict-mode-6.15.3.unitypackage"
mkdir -p $DEPLOY_PATH

#move external dependency manager
Expand Down Expand Up @@ -37,7 +37,7 @@ echo "Commenting out functions. Done."
Assets \
$PWD/$DEPLOY_PATH/$PACKAGE_NAME \
-quit \
&& echo "package exported successfully to outputs/appsflyer-unity-plugin-strict-mode-6.15.2.unitypackage" \
&& echo "package exported successfully to outputs/appsflyer-unity-plugin-strict-mode-6.15.3.unitypackage" \
|| echo "Failed to export package. See create_unity_core.log for more info."


Expand Down
4 changes: 4 additions & 0 deletions docs/InAppEvents.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ AppsFlyer.sendEvent(AFInAppEvents.PURCHASE, eventValues);

## Logging revenue

> 📘 Note
>
> For events with **revenue**, including in-app purchases, subscriptions, and ad revenue events, AppsFlyer customers with an ROI360 subscription should avoid using the `AFInAppEvents.REVENUE`(`af_revenue`) parameter in their in-app events. Doing so can result in duplicate revenue being reported. Instead, they should utilize the [purchase connector](https://dev.appsflyer.com/hc/docs/purchaseconnectorunity) and the [ad revenue SDK API](https://dev.appsflyer.com/hc/docs/ad-revenue-unity).

You can send revenue with any in-app event. Use the `AFInAppEvents.REVENUE` event parameter to include revenue in the in-app event. You can populate it with any numeric value, positive or negative.

The revenue value should not contain comma separators, currency signs, or text. A revenue event should be similar to 1234.56, for example.
Expand Down
2 changes: 1 addition & 1 deletion docs/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Add this line for the latest version of the regular mode

2. Download and add the required Android dependencies to the Assets/Plugins/Android folder:
1. [AppsFlyer Android SDK](https://repo1.maven.org/maven2/com/appsflyer/af-android-sdk/6.15.0/af-android-sdk-6.15.0.aar)
2. [AppsFlyer Unity Wrapper](https://repo1.maven.org/maven2/com/appsflyer/unity-wrapper/6.15.2/unity-wrapper-6.15.2.aar)
2. [AppsFlyer Unity Wrapper](https://repo1.maven.org/maven2/com/appsflyer/unity-wrapper/6.15.3/unity-wrapper-6.15.3.aar)
3. [Google Installreferrer library](https://mvnrepository.com/artifact/com.android.installreferrer/installreferrer/2.1)
3. Download and add the required iOS dependencies to the Assets/Plugins/iOS/AppsFlyer folder:
1. [Download](https://github.com/AppsFlyerSDK/AppsFlyerFramework/releases/tag/6.14.4) the iOS SDK as a static library `AppsFlyerLib.xcframework.zip`
Expand Down
Loading