Skip to content

Commit 0d2a5f5

Browse files
committed
apply patches
1 parent f51fedc commit 0d2a5f5

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

android/build.gradle

+6-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ buildscript {
99
}
1010

1111
dependencies {
12-
classpath 'com.android.tools.build:gradle:4.1.0'
12+
classpath 'com.android.tools.build:gradle:7.4.1'
1313
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1414
}
1515
}
@@ -33,7 +33,7 @@ apply plugin: 'com.android.library'
3333
apply plugin: 'kotlin-android'
3434

3535
android {
36-
compileSdkVersion 29
36+
compileSdkVersion 33
3737

3838
// backwards compatible for old gradle versions without namespace
3939
if (project.android.hasProperty("namespace")) {
@@ -54,6 +54,10 @@ android {
5454
sourceCompatibility 1.8
5555
targetCompatibility 1.8
5656
}
57+
58+
kotlinOptions {
59+
jvmTarget = '1.8'
60+
}
5761
}
5862

5963
def lifecycle_version = '2.4.1'

android/src/main/kotlin/com/xraph/plugin/flutter_unity_widget/FlutterUnityWidgetController.kt

+5-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,11 @@ class FlutterUnityWidgetController(
6868

6969
if(UnityPlayerUtils.unityPlayer == null) {
7070
createPlayer()
71-
refocusUnity()
71+
// Commented out to:
72+
// - Fix possible 4 second delay caused by pausing Unity while in the Android splash screen.
73+
// This could also be seen in logcat as "Timeout while trying to pause the Unity Engine."
74+
// - Fix ANR caused by interacting with app during splash screen while Unity is waiting to pause itself
75+
// refocusUnity()
7276
} else if(!UnityPlayerUtils.unityLoaded) {
7377
createPlayer()
7478
attachToView()

ios/flutter_unity_widget.podspec

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ A new Flutter plugin.
2525

2626
s.xcconfig = {
2727
'FRAMEWORK_SEARCH_PATHS' => '"${PODS_ROOT}/../UnityLibrary" "${PODS_ROOT}/../.symlinks/flutter/ios-release" "${PODS_CONFIGURATION_BUILD_DIR}"',
28-
'OTHER_LDFLAGS' => '$(inherited) -framework UnityFramework ${PODS_LIBRARIES}'
28+
'OTHER_LDFLAGS' => '$(inherited) -framework UnityFramework ${PODS_LIBRARIES}',
29+
'ENABLE_BITCODE' => 'NO'
2930
}
3031

3132
s.resource_bundles = {'flutter_unity_widget_privacy' => ['Resources/PrivacyInfo.xcprivacy']}

0 commit comments

Comments
 (0)