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
1 change: 1 addition & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ dependencies {
api "com.github.klaviyo.klaviyo-android-sdk:analytics:$klaviyoAndroidSdkVersion"
api "com.github.klaviyo.klaviyo-android-sdk:push-fcm:$klaviyoAndroidSdkVersion"
api "com.github.klaviyo.klaviyo-android-sdk:forms:$klaviyoAndroidSdkVersion"
api "com.github.klaviyo.klaviyo-android-sdk:location:$klaviyoAndroidSdkVersion"
implementation "com.github.klaviyo.klaviyo-android-sdk:core:$klaviyoAndroidSdkVersion"

// We used reflection to enumerate keywords in the Klaviyo Android SDK dynamically
Expand Down
2 changes: 1 addition & 1 deletion android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryErro
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
#Tue Dec 19 15:08:27 EST 2023
KlaviyoReactNativeSdk_klaviyoAndroidSdkVersion=4.1.0
KlaviyoReactNativeSdk_klaviyoAndroidSdkVersion=68d7123
KlaviyoReactNativeSdk_kotlinVersion=1.8.0
KlaviyoReactNativeSdk_minSdkVersion=23
KlaviyoReactNativeSdk_targetSdkVersion=36
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ import com.klaviyo.core.utils.AdvancedAPI
import com.klaviyo.forms.InAppFormsConfig
import com.klaviyo.forms.registerForInAppForms
import com.klaviyo.forms.unregisterFromInAppForms
import com.klaviyo.location.registerGeofencing
import com.klaviyo.location.unregisterGeofencing
import java.io.Serializable
import kotlin.reflect.KVisibility
import kotlin.time.Duration.Companion.seconds
Expand Down Expand Up @@ -87,6 +89,16 @@ class KlaviyoReactNativeSdkModule(
}
}

@ReactMethod
fun registerGeofencing() {
Klaviyo.registerGeofencing()
}

@ReactMethod
fun unregisterGeofencing() {
Klaviyo.unregisterGeofencing()
}

@ReactMethod
fun setProfile(profile: ReadableMap) {
val parsedProfile = Profile()
Expand Down
3 changes: 2 additions & 1 deletion configure-sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,15 @@ function configure_podfile() {
sed -i '' "/pod 'KlaviyoCore'/d" "$podfile"
sed -i '' "/pod 'KlaviyoSwift'/d" "$podfile"
sed -i '' "/pod 'KlaviyoForms'/d" "$podfile"
sed -i '' "/pod 'KlaviyoLocation'/d" "$podfile"

if [[ -z "$swift_sdk_version" || "$swift_sdk_version" == "podspec" ]]; then
echo "Skipping Swift SDK version update."
return
fi

# List of dependencies
dependencies=("KlaviyoCore" "KlaviyoSwift" "KlaviyoForms")
dependencies=("KlaviyoCore" "KlaviyoSwift" "KlaviyoForms" "KlaviyoLocation")

# Find the line number of the target block
target_line=$(grep -n "# Insert override klaviyo-swift-sdk pods below this line when needed" "$podfile" | cut -d: -f1)
Expand Down
Loading