Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
b255459
Merge branch 'master' into develop
Jun 4, 2024
09cabd0
Merge branch 'develop' of https://github.com/apptentive/apptentive-re…
Jun 4, 2024
4ff1715
merge from master
Aug 12, 2024
f4dae44
Make it harder to accidentally check in credentials
frankus Apr 29, 2025
f26a9b8
Allow app to pass API base URL (for testing on staging)
frankus Apr 29, 2025
68ba580
Merge pull request #266 from apptentive/PBI-7996
frankus May 6, 2025
617e18d
Merge pull request #265 from apptentive/PBI-7391
frankus May 6, 2025
55174ff
[PBI-8474] Android35-compatibility (#268)
PoornimaApptentive Feb 25, 2026
5f1fb56
get the context through reactApplicationContext (#269)
PoornimaApptentive Feb 25, 2026
29492d6
Update for 7.0.0 (#272)
github-actions[bot] Feb 25, 2026
c5d3361
7.0 support through RattlesnakeFax
Mar 5, 2026
e10b635
region support
Mar 6, 2026
b9c9450
upgraded to 0.77.0
Mar 6, 2026
d52248d
Update ApptentiveModule.kt
PoornimaApptentive Mar 13, 2026
ebfb0bb
[PBI-9044] RN - region and v7 support (#273)
PoornimaApptentive Mar 13, 2026
074109c
upgrade RN to 0.77.0 and other dependencies to support v7.0
Mar 13, 2026
a683dc9
Merge branch 'PBI-9044-RN-0.73-7.0-supported' into PBI-9241-example-u…
Mar 13, 2026
41da58d
Merge branch 'develop' into PBI-9241-example-upgrade
PoornimaApptentive Mar 13, 2026
bf69a79
Update example app to work for iOS
frankus Mar 14, 2026
0b7a402
Update RN module to work with V7
frankus Mar 14, 2026
84426ca
Add privacy manifest
frankus Mar 14, 2026
e1a3448
[PBI-9241] Example app upgrade (#274)
PoornimaApptentive Mar 16, 2026
404da20
Bump flatted from 3.2.7 to 3.4.2 in /example
dependabot[bot] Mar 19, 2026
93d52ec
Bump picomatch from 2.3.1 to 2.3.2 in /example
dependabot[bot] Mar 25, 2026
567f864
Bump picomatch from 2.3.1 to 2.3.2
dependabot[bot] Mar 25, 2026
b85eb96
Bump handlebars from 4.7.7 to 4.7.9
dependabot[bot] Mar 27, 2026
52a86ae
Bump brace-expansion from 1.1.11 to 1.1.13 in /example
dependabot[bot] Mar 28, 2026
18dc086
Merge pull request #275 from apptentive/PBI-9241-example-upgrade-ios
frankus Mar 30, 2026
4cb7220
update CN to CA (#282)
PoornimaApptentive Apr 24, 2026
7e83dcc
Merge origin/develop into PBI-9241-example-upgrade, resolve conflicts
Copilot Apr 24, 2026
a4ece6b
Merge pull request #283 from apptentive/PBI-9241-example-upgrade
frankus Apr 24, 2026
e9243df
Merge origin/develop into dependabot/npm_and_yarn/example/brace-expan…
Copilot Apr 24, 2026
f59dbb8
Merge origin/develop into dependabot/npm_and_yarn/handlebars-4.7.9, r…
Copilot Apr 24, 2026
bbffac8
Merge pull request #281 from apptentive/dependabot/npm_and_yarn/examp…
frankus Apr 24, 2026
e109d41
Resolve merge conflicts with develop branch, update picomatch to 2.3.2
Copilot Apr 24, 2026
e681e14
Merge pull request #280 from apptentive/dependabot/npm_and_yarn/handl…
frankus Apr 24, 2026
9351eeb
Resolve merge conflicts with latest develop branch, update picomatch …
Copilot Apr 24, 2026
f5872e9
Merge branch 'develop' into dependabot/npm_and_yarn/example/picomatch…
frankus Apr 24, 2026
eddd749
Merge pull request #277 from apptentive/dependabot/npm_and_yarn/examp…
frankus Apr 24, 2026
9fad820
Merge branch 'develop' into dependabot/npm_and_yarn/example/flatted-3…
frankus Apr 24, 2026
58496f2
Fix merge conflict SNAFU
frankus Apr 24, 2026
8cb6405
Merge pull request #276 from apptentive/dependabot/npm_and_yarn/examp…
frankus Apr 24, 2026
84b722b
Merge origin/develop, resolve conflicts keeping picomatch 2.3.2
Copilot Apr 24, 2026
d58e189
Merge pull request #278 from apptentive/dependabot/npm_and_yarn/picom…
frankus Apr 24, 2026
91791ff
Update for 7.1.0 (#285)
github-actions[bot] Apr 24, 2026
7cc8487
Normalize case of region string before looking it up
frankus Apr 27, 2026
1eb062f
ignore case for region constants (#286)
PoornimaApptentive Apr 27, 2026
3b8055c
Merge pull request #287 from apptentive/fix/case-insensitive-region
frankus Apr 27, 2026
9a80326
updated change log for 7.1 (#289)
PoornimaApptentive May 7, 2026
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: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
node_modules/
npm-debug.log
yarn-error.log
credentials.js

# Xcode
#
Expand Down Expand Up @@ -49,3 +49,5 @@ buck-out/
Pods

.vscode
package-lock.json
lib/
4 changes: 2 additions & 2 deletions .scripts/changes.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
- Apptentive Android SDK: 6.8.0
- Apptentive iOS SDK: 6.8.1
- Apptentive Android SDK: 7.1.0
- Apptentive iOS SDK: 7.1.0
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@ This document lets you know what has changed in the React Native module. For cha
- [Android Changelog](https://github.com/apptentive/apptentive-kit-android/blob/master/CHANGELOG.md)
- [iOS Changelog](https://github.com/apptentive/apptentive-kit-ios/blob/main/CHANGELOG.md)

# 2026-05-07 - v7.1.0

- Apptentive Android SDK: 7.1.0
- Apptentive iOS SDK: 7.1.0

#### New & Improved

- Allows routing traffic to region‑specific endpoints, reducing latency and comply with regional data‑handling requirements. Now supporting EU along with US

# 2026-02-11 - v7.0.0

- Apptentive Android SDK: 7.0.0
- Apptentive iOS SDK: 7.0.0

# 2024-06-26 - v6.8.0

- Apptentive Android SDK: 6.8.0
Expand Down
8 changes: 5 additions & 3 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ buildscript {
}

dependencies {
classpath "com.android.tools.build:gradle:7.1.3"
classpath 'com.android.tools.build:gradle:8.4.2'
// noinspection DifferentKotlinGradleVersion
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
Expand All @@ -35,6 +35,7 @@ def getExtOrIntegerDefault(name) {

android {
compileSdkVersion getExtOrIntegerDefault("compileSdkVersion")
namespace 'com.apptentive.android.sdk.reactlibrary'

defaultConfig {
minSdkVersion getExtOrIntegerDefault("minSdkVersion")
Expand All @@ -56,6 +57,7 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
android.buildFeatures.buildConfig true
}

repositories {
Expand All @@ -69,11 +71,11 @@ dependencies {
// For < 0.71, this will be from the local maven repo
// For > 0.71, this will be replaced by `com.facebook.react:react-android:$version` by react gradle plugin
//noinspection GradleDynamicVersion
implementation "com.facebook.react:react-native:+"
implementation "com.facebook.react:react-android:0.73.3"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"

// Apptentive
implementation 'com.apptentive:apptentive-kit-android:6.8.0'
implementation 'com.apptentive:apptentive-kit-android:7.1.0'
}

if (isNewArchitectureEnabled()) {
Expand Down
6 changes: 3 additions & 3 deletions android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Apptentive_kotlinVersion=1.7.20
Apptentive_minSdkVersion=21
Apptentive_compileSdkVersion=31
Apptentive_targetSdkVersion=31
Apptentive_minSdkVersion=24
Apptentive_compileSdkVersion=35
Apptentive_targetSdkVersion=35

android.useAndroidX=true
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
3 changes: 1 addition & 2 deletions android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.apptentive.android.sdk.reactlibrary">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import androidx.appcompat.app.AppCompatActivity
import apptentive.com.android.feedback.Apptentive
import apptentive.com.android.feedback.ApptentiveActivityInfo
import apptentive.com.android.feedback.ApptentiveConfiguration
import apptentive.com.android.feedback.ApptentiveRegion
import apptentive.com.android.feedback.EngagementResult
import apptentive.com.android.feedback.RegisterResult
import apptentive.com.android.feedback.model.MessageCenterNotification
Expand Down Expand Up @@ -281,7 +282,7 @@ class ApptentiveModule(private val reactContext: ReactApplicationContext) :

// Set ApptentiveLogger log level
private fun parseLogLevel(logLevel: String): LogLevel {
android.util.Log.d("Apptentive", "[REACT NATIVE] Parsing log level: $logLevel")
android.util.Log.d("Apptentive", "[REACT NATIVE] Parsing log level:: $logLevel")

return when (logLevel) {
"verbose" -> LogLevel.Verbose
Expand All @@ -296,6 +297,18 @@ class ApptentiveModule(private val reactContext: ReactApplicationContext) :
}
}

// Set region
private fun parseRegion(region: String): ApptentiveRegion {
val normalized = region.lowercase()
return when (normalized) {
"us" -> ApptentiveRegion.US
"eu" -> ApptentiveRegion.EU
"au" -> ApptentiveRegion.AU
"ca" -> ApptentiveRegion.CA
else -> ApptentiveRegion.Custom(region)
}
}

// Unpack dictionary to create and return ApptentiveConfiguration object
private fun unpackCredentials(credentials: ReadableMap): ApptentiveConfiguration {
// Key/Sig
Expand All @@ -311,6 +324,16 @@ class ApptentiveModule(private val reactContext: ReactApplicationContext) :
parseLogLevel(credentials.getString("logLevel") ?: "info")
}

val customURL = credentials.getString("overrideBaseURL")
if (!customURL.isNullOrBlank()) {
apptentiveConfiguration.region = parseRegion(customURL)
android.util.Log.d("Apptentive", "[REACT NATIVE] setting custom baseURL: $customURL")
} else {
val region = credentials.getString("region") ?: "US"
android.util.Log.d("Apptentive", "[REACT NATIVE] Setting region: $region")
apptentiveConfiguration.region = parseRegion(region)
}

// Set distribution name and version
if (credentials.hasKey("distributionName")) {
apptentiveConfiguration.distributionName = credentials.getString("distributionName") ?: "React Native"
Expand Down Expand Up @@ -349,11 +372,11 @@ class ApptentiveModule(private val reactContext: ReactApplicationContext) :
}

private fun getApplicationContext(): Application? {
return currentActivity?.applicationContext as Application?
return reactApplicationContext.currentActivity?.applicationContext as Application?
}

override fun getApptentiveActivityInfo(): Activity? {
return currentActivity
return reactApplicationContext.currentActivity
}

override fun getConstants(): MutableMap<String, Any> {
Expand Down
2 changes: 1 addition & 1 deletion apptentive-react-native.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ Pod::Spec.new do |s|

s.source_files = "ios/**/*.{h,m,mm,swift}"

s.dependency 'ApptentiveKit', '~> 6.8.1'
s.dependency 'ApptentiveKit', '~> 7.1.0'
s.dependency "React-Core"
end
14 changes: 8 additions & 6 deletions example/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,21 @@ import {
ApptentiveConfiguration
} from 'apptentive-react-native'

import { APPTENTIVE_CREDENTIALS } from './credentials';

type SectionProps = PropsWithChildren<{
title: string;
}>;

// Set your Apptentive Dashboard Credentials
const credentials = Platform.select({
android: {
apptentiveKey: "___YOUR_ANDROID_APPTENTIVE_KEY___",
apptentiveSignature: "___YOUR_ANDROID_APPTENTIVE_SIGNATURE___",
apptentiveKey: APPTENTIVE_CREDENTIALS.androidKey,
apptentiveSignature: APPTENTIVE_CREDENTIALS.androidSignature,
},
ios: {
apptentiveKey: "___YOUR_IOS_APPTENTIVE_KEY___",
apptentiveSignature: "___YOUR_IOS_APPTENTIVE_SIGNATURE___",
apptentiveKey: APPTENTIVE_CREDENTIALS.iOSKey,
apptentiveSignature: APPTENTIVE_CREDENTIALS.iOSSignature,
},
});

Expand All @@ -68,11 +70,11 @@ export class App extends React.Component<{}, State> {

componentDidMount() {
// Check for key and signature
if (!credentials.apptentiveKey || credentials.apptentiveKey === "___YOUR_IOS_APPTENTIVE_KEY___" || credentials.apptentiveKey === "___YOUR_ANDROID_APPTENTIVE_KEY___") {
if (!credentials.apptentiveKey || credentials.apptentiveKey === "<YOUR_IOS_APPTENTIVE_KEY>" || credentials.apptentiveKey === "<YOUR_ANDROID_APPTENTIVE_KEY>") {
console.log("APPTENTIVE ERROR: Please provide Apptentive Key");
return;
}
if (!credentials.apptentiveSignature || credentials.apptentiveSignature === "___YOUR_IOS_APPTENTIVE_SIGNATURE___" || credentials.apptentiveSignature === "___YOUR_ANDROID_APPTENTIVE_SIGNATURE___") {
if (!credentials.apptentiveSignature || credentials.apptentiveSignature === "<YOUR_IOS_APPTENTIVE_SIGNATURE>" || credentials.apptentiveSignature === "<YOUR_ANDROID_APPTENTIVE_SIGNATURE>") {
console.log("APPTENTIVE ERROR: Please provide Apptentive Signature");
return;
}
Expand Down
2 changes: 1 addition & 1 deletion example/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ source 'https://rubygems.org'
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
ruby File.read(File.join(__dir__, '.ruby-version')).strip

gem 'cocoapods', '~> 1.11', '>= 1.11.3'
gem 'cocoapods', '~> 1.15'
90 changes: 10 additions & 80 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
apply plugin: "com.android.application"
apply plugin: "org.jetbrains.kotlin.android"
apply plugin: "com.facebook.react"

import com.android.build.OutputFile

/**
* This is the configuration block to customize your React Native Android app.
* By default you don't need to apply any configuration, just uncomment the lines you need.
Expand All @@ -13,8 +12,8 @@ react {
// root = file("../")
// The folder where the react-native NPM package is. Default is ../node_modules/react-native
// reactNativeDir = file("../node_modules/react-native")
// The folder where the react-native Codegen package is. Default is ../node_modules/react-native-codegen
// codegenDir = file("../node_modules/react-native-codegen")
// The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen
// codegenDir = file("../node_modules/@react-native/codegen")
// The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
// cliFile = file("../node_modules/react-native/cli.js")

Expand Down Expand Up @@ -52,64 +51,24 @@ react {
// hermesFlags = ["-O", "-output-source-map"]
}

/**
* Set this to true to create four separate APKs instead of one,
* one for each native architecture. This is useful if you don't
* use App Bundles (https://developer.android.com/guide/app-bundle/)
* and want to have separate APKs to upload to the Play Store.
*/
def enableSeparateBuildPerCPUArchitecture = false

/**
* Set this to true to Run Proguard on Release builds to minify the Java bytecode.
*/
def enableProguardInReleaseBuilds = false

/**
* The preferred build flavor of JavaScriptCore (JSC)
*
* For example, to use the international variant, you can use:
* `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
*
* The international variant includes ICU i18n library and necessary data
* allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
* give correct results when using with locales other than en-US. Note that
* this variant is about 6MiB larger per architecture than default.
*/
def jscFlavor = 'org.webkit:android-jsc:+'

/**
* Private function to get the list of Native Architectures you want to build.
* This reads the value from reactNativeArchitectures in your gradle.properties
* file and works together with the --active-arch-only flag of react-native run-android.
*/
def reactNativeArchitectures() {
def value = project.getProperties().get("reactNativeArchitectures")
return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
}

android {
ndkVersion rootProject.ext.ndkVersion

compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
compileSdk rootProject.ext.compileSdkVersion

namespace "com.apptentiveexample"
defaultConfig {
applicationId "com.apptentiveexample"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
minSdk rootProject.ext.minSdkVersion
targetSdk rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
}

splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
include (*reactNativeArchitectures())
}
}
signingConfigs {
debug {
storeFile file('debug.keystore')
Expand All @@ -130,41 +89,12 @@ android {
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}

// applicationVariants are e.g. debug, release
applicationVariants.all { variant ->
variant.outputs.each { output ->
// For each separate APK per architecture, set a unique version code as described here:
// https://developer.android.com/studio/build/configure-apk-splits.html
// Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc.
def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) { // null for the universal-debug, universal-release variants
output.versionCodeOverride =
defaultConfig.versionCode * 1000 + versionCodes.get(abi)
}

}
}
}

dependencies {
// The version of react-native is set by the React Native Gradle Plugin
implementation("com.facebook.react:react-android")

implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.0.0")

debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}")
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
exclude group:'com.squareup.okhttp3', module:'okhttp'
}

debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}")
if (hermesEnabled.toBoolean()) {
implementation("com.facebook.react:hermes-android")
} else {
implementation jscFlavor
}
implementation("com.facebook.react:hermes-android")
implementation("com.google.android.material:material:1.12.0")
implementation(project(":apptentive-react-native"))
}

apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
Loading
Loading