Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
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 .scripts/changes.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
- Apptentive Android SDK: 6.9.3
- Apptentive iOS SDK: 6.9.2
- Apptentive Android SDK: 7.1.1
- Apptentive iOS SDK: 7.1.0
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# 2026-05-20 - v7.1.0

- Apptentive Android SDK: 7.1.1
- 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

# 2025-11-17 - v6.9.4

- Apptentive Android SDK: 6.9.3
Expand Down
6 changes: 3 additions & 3 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ sourceSets {
}

android {
compileSdkVersion 34
compileSdkVersion 35
namespace 'com.apptentive.apptentive_flutter'
defaultConfig {
minSdkVersion 21
minSdkVersion 24
}
}

dependencies {
implementation 'com.apptentive:apptentive-kit-android:6.9.3'
implementation 'com.apptentive:apptentive-kit-android:7.1.1'
testImplementation 'junit:junit:4.13.2'
}
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-all.zip
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,16 @@ class ApptentiveFlutterPlugin : FlutterPlugin, MethodCallHandler, ActivityAware
}
}

private fun parseRegion(regionStr: String): ApptentiveRegion {
return when {
regionStr.contains("us") -> ApptentiveRegion.US
regionStr.contains("eu") -> ApptentiveRegion.EU
regionStr.contains("ca") -> ApptentiveRegion.CA
regionStr.contains("au") -> ApptentiveRegion.AU
else -> ApptentiveRegion.US
}
}

// Turn a Map into an Apptentive Configuration
@Suppress("UNCHECKED_CAST")
private fun unpackConfiguration(configurationMap: Map<String, Any>): ApptentiveConfiguration {
Expand All @@ -498,6 +508,8 @@ class ApptentiveFlutterPlugin : FlutterPlugin, MethodCallHandler, ActivityAware
val customAppStoreURL = configurationMap["custom_app_store_url"] as String?
val distributionName = configurationMap["distribution_name"] as String
val distributionVersion = configurationMap["distribution_version"] as String
val customURL = configurationMap["override_base_url"] as String?
val region = parseRegion(configurationMap["region"] as String)

val configuration = ApptentiveConfiguration(key,signature)

Expand All @@ -509,7 +521,12 @@ class ApptentiveFlutterPlugin : FlutterPlugin, MethodCallHandler, ActivityAware
configuration.customAppStoreURL = customAppStoreURL
configuration.distributionName = distributionName
configuration.distributionVersion = distributionVersion

if (customURL != null) {
Log.w(LogTag("Flutter"), "overrideBaseUrl is provided. setting custom base url")
configuration.region = ApptentiveRegion.Custom(customURL)
} else {
configuration.region = region
}
return configuration
}

Expand Down
16 changes: 13 additions & 3 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 34
compileSdkVersion 35

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.apptentive.apptentive_flutter_example"
minSdkVersion 21
targetSdkVersion 33
minSdkVersion 24
targetSdkVersion 35
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true
Expand All @@ -45,6 +45,16 @@ android {
signingConfig signingConfigs.debug
}
}
namespace 'com.apptentive.apptentive_flutter_example'
}

configurations.all {
resolutionStrategy {
force 'androidx.lifecycle:lifecycle-runtime:2.7.0'
force 'androidx.lifecycle:lifecycle-common:2.7.0'
force 'androidx.lifecycle:lifecycle-livedata:2.7.0'
force 'androidx.lifecycle:lifecycle-viewmodel:2.7.0'
}
}

dependencies {
Expand Down
3 changes: 1 addition & 2 deletions example/android/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.apptentive.apptentive_flutter_example">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application
android:label="apptentive_flutter_example"
android:icon="@mipmap/ic_launcher">
Expand Down
2 changes: 1 addition & 1 deletion example/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:7.1.2'
classpath 'com.android.tools.build:gradle:8.2.1'
classpath 'com.google.gms:google-services:4.3.10'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
Expand Down
2 changes: 1 addition & 1 deletion example/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-all.zip
2 changes: 1 addition & 1 deletion example/ios/Flutter/AppFrameworkInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>13.0</string>
<string>15.0</string>
</dict>
</plist>
4 changes: 2 additions & 2 deletions example/ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
platform :ios, '13.0'
platform :ios, '15.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down Expand Up @@ -37,7 +37,7 @@ post_install do |installer|
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13'
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '15'
config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = ''
end
end
Expand Down
8 changes: 4 additions & 4 deletions example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build\n";
};
/* End PBXShellScriptBuildPhase section */

Expand Down Expand Up @@ -364,7 +364,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand Down Expand Up @@ -444,7 +444,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -494,7 +494,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand Down
2 changes: 1 addition & 1 deletion example/ios/Runner/AppDelegate.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#import <Flutter/Flutter.h>
#import <UIKit/UIKit.h>

@interface AppDelegate : FlutterAppDelegate
@interface AppDelegate : FlutterAppDelegate <FlutterImplicitEngineDelegate>

@end
5 changes: 4 additions & 1 deletion example/ios/Runner/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ @implementation AppDelegate

- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[GeneratedPluginRegistrant registerWithRegistry:self];
// Override point for customization after application launch.
return [super application:application didFinishLaunchingWithOptions:launchOptions];
}

- (void)didInitializeImplicitFlutterEngine:(NSObject<FlutterImplicitEngineBridge>*)engineBridge {
[GeneratedPluginRegistrant registerWithRegistry:engineBridge.pluginRegistry];
}

@end
29 changes: 25 additions & 4 deletions example/ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
Expand All @@ -22,6 +24,29 @@
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<false/>
<key>UISceneConfigurations</key>
<dict>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneClassName</key>
<string>UIWindowScene</string>
<key>UISceneConfigurationName</key>
<string>flutter</string>
<key>UISceneDelegateClassName</key>
<string>FlutterSceneDelegate</string>
<key>UISceneStoryboardFile</key>
<string>Main</string>
</dict>
</array>
</dict>
</dict>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
Expand All @@ -41,9 +66,5 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
</dict>
</plist>
3 changes: 3 additions & 0 deletions example/lib/credentials-template.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import 'package:apptentive_flutter/apptentive_flutter.dart';

class ApptentiveCredentials {
static const String iOSKey = "<YOUR_IOS_KEY>";
static const String iOSSignature = "<YOUR_IOS_SIGNATURE>";
static const String androidKey = "<YOUR_ANDROID_KEY>";
static const String androidSignature = "<YOUR_ANDROID_SIGNATURE>";
static const Region region = Region.us;
}
1 change: 1 addition & 0 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ class _MyAppState extends State<MyApp> {
logLevel: LogLevel.verbose,
shouldEncryptStorage: false,
shouldSanitizeLogMessages: false,
region: ApptentiveCredentials.region
);
ApptentiveFlutter.surveyFinishedCallback = (bool completed) {
print("Survey Finished?: $completed");
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ dependencies:
cupertino_icons: ^1.0.2
firebase_messaging: ^15.2.5
firebase_core: ^3.13.0
fluttertoast: ^8.0.8
fluttertoast: ^8.2.4

dev_dependencies:
flutter_test:
Expand Down
Loading
Loading