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
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ dependencies {
//noinspection GradleDynamicVersion
implementation "com.facebook.react:react-native:+"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation "com.github.LottieFiles:dotlottie-android:0.4.0"
implementation "com.github.LottieFiles:dotlottie-android:0.12.2"
implementation 'androidx.compose.ui:ui:1.5.0'
implementation 'androidx.compose.material:material:1.5.0'
implementation 'androidx.compose.ui:ui-tooling-preview:1.5.0'
Expand Down
4 changes: 2 additions & 2 deletions android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
DotlottieReactNative_kotlinVersion=1.7.0
DotlottieReactNative_minSdkVersion=24
DotlottieReactNative_targetSdkVersion=34
DotlottieReactNative_compileSdkVersion=34
DotlottieReactNative_targetSdkVersion=35
DotlottieReactNative_compileSdkVersion=35
DotlottieReactNative_ndkversion=21.4.7075529
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class DotlottieReactNativeView(context: ThemedReactContext) : FrameLayout(contex
}
}

LaunchedEffect(UInt) { dotLottieController.addStateMachineEventListener(stateListener) }
LaunchedEffect(UInt) { dotLottieController.stateMachineAddEventListener(stateListener) }

animationUrl?.let { url ->
DotLottieAnimation(
Expand Down Expand Up @@ -170,7 +170,7 @@ class DotlottieReactNativeView(context: ThemedReactContext) : FrameLayout(contex
}

fun postEvent(event: String) {
dotLottieController.postEvent(Event.String(event))
// dotLottieController.stateMachinePostEvent(Event.String(event))
}

fun resize(width: UInt, height: UInt) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,19 +101,19 @@ class DotlottieReactNativeViewManager : SimpleViewManager<DotlottieReactNativeVi

if (commandId == COMMAND_START_STATE_MACHINE_ID) {
val stateMachineId = args?.getString(0) ?: ""
val result = view.dotLottieController.loadStateMachine(stateMachineId)
val result = view.dotLottieController.stateMachineLoad(stateMachineId)
if (result) {
view.dotLottieController.startStateMachine()
view.dotLottieController.stateMachineStart()
}
}

if (commandId == COMMAND_STOP_STATE_MACHINE_ID) {
view.dotLottieController.stopStateMachine()
view.dotLottieController.stateMachineStop()
}

if (commandId == COMMAND_LOAD_STATE_MACHINE_ID) {
val stateMachineId = args?.getString(0) ?: ""
view.dotLottieController.loadStateMachine(stateMachineId)
view.dotLottieController.stateMachineLoad(stateMachineId)
}

if (commandId == COMMAND_POST_EVENT_ID) {
Expand Down Expand Up @@ -142,7 +142,7 @@ class DotlottieReactNativeViewManager : SimpleViewManager<DotlottieReactNativeVi

if (commandId == COMMAND_LOAD_THEME_ID) {
val themeId = args?.getString(0) ?: ""
view.dotLottieController.loadTheme(themeId)
view.dotLottieController.setTheme(themeId)
}

if (commandId == COMMAND_LOAD_ANIMATION_ID) {
Expand Down
2 changes: 1 addition & 1 deletion dotlottie-react-native.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Pod::Spec.new do |s|

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

s.dependency 'dotLottie-iOS'
s.dependency 'LottieFiles-dotLottie-iOS', '~> 0.9'

s.swift_version = '5.0'
s.ios.deployment_target = "15.4"
Expand Down
4 changes: 2 additions & 2 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ buildscript {
ext {
buildToolsVersion = "34.0.0"
minSdkVersion = 24
compileSdkVersion = 34
targetSdkVersion = 34
compileSdkVersion = 35
targetSdkVersion = 35
ndkVersion = "26.1.10909125"
kotlinVersion = "1.9.22"
}
Expand Down
12 changes: 8 additions & 4 deletions example/ios/.xcode.env
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@
# To customize your local environment, you can create an `.xcode.env.local`
# file that is not versioned.

# Load nvm and use the version specified in .nvmrc
export NVM_DIR="$HOME/.nvm"
if [ -s "$NVM_DIR/nvm.sh" ]; then
. "$NVM_DIR/nvm.sh" --no-use
nvm use 2> /dev/null || nvm use default
fi

# NODE_BINARY variable contains the PATH to the node executable.
#
# Customize the NODE_BINARY variable here.
# For example, to use nvm with brew, add the following line
# . "$(brew --prefix nvm)/nvm.sh" --no-use
# Set it after nvm is loaded
export NODE_BINARY=$(command -v node)
Loading
Loading