Skip to content

Commit c2a7329

Browse files
authored
Merge pull request #38 from 4cc3ssX/main
feat: example react native version upgrade to 0.76.1 + iOS build issue
2 parents 11061b1 + c672240 commit c2a7329

20 files changed

+4633
-1638
lines changed

README.md

+16-9
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,10 @@ Thanks go to these wonderful people:
199199
<tbody>
200200
<tr>
201201
<td align="center">
202-
<a href="https://github.com/tuanngocptn">
203-
<img src="https://avatars.githubusercontent.com/u/22292704?v=4" width="100;" alt="tuanngocptn"/>
202+
<a href="https://github.com/4cc3ssX">
203+
<img src="https://avatars.githubusercontent.com/u/57473799?v=4" width="100;" alt="4cc3ssX"/>
204204
<br />
205-
<sub><b>Nick - Ngoc Pham</b></sub>
205+
<sub><b>Ryam</b></sub>
206206
</a>
207207
</td>
208208
<td align="center">
@@ -213,17 +213,24 @@ Thanks go to these wonderful people:
213213
</a>
214214
</td>
215215
<td align="center">
216-
<a href="https://github.com/4cc3ssX">
217-
<img src="https://avatars.githubusercontent.com/u/57473799?v=4" width="100;" alt="4cc3ssX"/>
216+
<a href="https://github.com/Acetyld">
217+
<img src="https://avatars.githubusercontent.com/u/55088242?v=4" width="100;" alt="Acetyld"/>
218218
<br />
219-
<sub><b>Ryam</b></sub>
219+
<sub><b>Dion Grendelman</b></sub>
220220
</a>
221221
</td>
222222
<td align="center">
223-
<a href="https://github.com/Acetyld">
224-
<img src="https://avatars.githubusercontent.com/u/55088242?v=4" width="100;" alt="Acetyld"/>
223+
<a href="https://github.com/jeongshin">
224+
<img src="https://avatars.githubusercontent.com/u/64301935?v=4" width="100;" alt="jeongshin"/>
225225
<br />
226-
<sub><b>Dion Grendelman</b></sub>
226+
<sub><b>Huckleberry</b></sub>
227+
</a>
228+
</td>
229+
<td align="center">
230+
<a href="https://github.com/tuanngocptn">
231+
<img src="https://avatars.githubusercontent.com/u/22292704?v=4" width="100;" alt="tuanngocptn"/>
232+
<br />
233+
<sub><b>Nick - Ngoc Pham</b></sub>
227234
</a>
228235
</td>
229236
</tr>

android/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ dependencies {
8888
//noinspection GradleDynamicVersion
8989
implementation "com.facebook.react:react-native:+"
9090
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
91-
implementation 'com.github.getActivity:EasyWindow:10.0'
91+
implementation 'com.github.getActivity:EasyWindow:10.62'
9292
}
9393

9494
if (isNewArchitectureEnabled()) {

android/src/main/java/com/ting/TingModule.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ class TingModule internal constructor(context: ReactApplicationContext) : TingSp
162162
}
163163

164164
private fun getDuration(options: ReadableMap): Int {
165-
return if (options.hasKey("duration")) (options.getInt("duration") * 1000) else 3000
165+
return if (options.hasKey("duration")) (options.getDouble("duration") * 1000).toInt() else 3000
166166
}
167167

168168
private fun getContainerView(

example/Gemfile

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ source 'https://rubygems.org'
33
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
44
ruby ">= 2.6.10"
55

6-
# Cocoapods 1.15 introduced a bug which break the build. We will remove the upper
7-
# bound in the template on Cocoapods with next React Native release.
8-
gem 'cocoapods', '>= 1.13', '< 1.15'
9-
gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'
6+
# Exclude problematic versions of cocoapods and activesupport that causes build failures.
7+
gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
8+
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
9+
gem 'xcodeproj', '< 1.26.0'

example/android/app/build.gradle

+11-10
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ apply plugin: "com.facebook.react"
88
*/
99
react {
1010
/* Folders */
11-
// The root of your project, i.e. where "package.json" lives. Default is '..'
12-
// root = file("../")
13-
// The folder where the react-native NPM package is. Default is ../node_modules/react-native
14-
// reactNativeDir = file("../node_modules/react-native")
15-
// The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen
16-
// codegenDir = file("../node_modules/@react-native/codegen")
17-
// The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
18-
// cliFile = file("../node_modules/react-native/cli.js")
11+
// The root of your project, i.e. where "package.json" lives. Default is '../..'
12+
// root = file("../../")
13+
// The folder where the react-native NPM package is. Default is ../../node_modules/react-native
14+
// reactNativeDir = file("../../node_modules/react-native")
15+
// The folder where the react-native Codegen package is. Default is ../../node_modules/@react-native/codegen
16+
// codegenDir = file("../../node_modules/@react-native/codegen")
17+
// The cli.js file which is the React Native CLI entrypoint. Default is ../../node_modules/react-native/cli.js
18+
// cliFile = file("../../node_modules/react-native/cli.js")
1919

2020
/* Variants */
2121
// The list of variants to that are debuggable. For those we're going to
@@ -49,6 +49,9 @@ react {
4949
//
5050
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
5151
// hermesFlags = ["-O", "-output-source-map"]
52+
53+
/* Autolinking */
54+
autolinkLibrariesWithApp()
5255
}
5356

5457
/**
@@ -115,5 +118,3 @@ dependencies {
115118
implementation jscFlavor
116119
}
117120
}
118-
119-
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)

example/android/app/src/main/AndroidManifest.xml

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
android:icon="@mipmap/ic_launcher"
99
android:roundIcon="@mipmap/ic_launcher_round"
1010
android:allowBackup="false"
11-
android:theme="@style/AppTheme">
11+
android:theme="@style/AppTheme"
12+
android:supportsRtl="true">
1213
<activity
1314
android:name=".MainActivity"
1415
android:label="@string/app_name"

example/android/app/src/main/java/com/tingexample/MainApplication.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import com.facebook.react.ReactPackage
99
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
1010
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
1111
import com.facebook.react.defaults.DefaultReactNativeHost
12+
import com.facebook.react.soloader.OpenSourceMergedSoMapping
1213
import com.facebook.soloader.SoLoader
1314

1415
class MainApplication : Application(), ReactApplication {
@@ -34,7 +35,7 @@ class MainApplication : Application(), ReactApplication {
3435

3536
override fun onCreate() {
3637
super.onCreate()
37-
SoLoader.init(this, false)
38+
SoLoader.init(this, OpenSourceMergedSoMapping)
3839
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
3940
// If you opted-in for the New Architecture, we load the native entry point for this app.
4041
load()

example/android/build.gradle

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
buildscript {
44
ext {
5-
buildToolsVersion = "34.0.0"
6-
minSdkVersion = 23
7-
compileSdkVersion = 34
5+
buildToolsVersion = "35.0.0"
6+
minSdkVersion = 24
7+
compileSdkVersion = 35
88
targetSdkVersion = 34
99
ndkVersion = "26.1.10909125"
10-
kotlinVersion = "1.9.22"
10+
kotlinVersion = "1.9.24"
1111
}
1212
repositories {
1313
google()

example/android/gradle.properties

-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m
2121
# Android operating system, and which are packaged with your app's APK
2222
# https://developer.android.com/topic/libraries/support-library/androidx-rn
2323
android.useAndroidX=true
24-
# Automatically convert third-party libraries to use AndroidX
25-
android.enableJetifier=true
2624

2725
# Use this property to specify which architecture you want to build.
2826
# You can also override it from the CLI using

example/android/gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

example/android/gradlew

+5-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717
#
18+
# SPDX-License-Identifier: Apache-2.0
19+
#
1820

1921
##############################################################################
2022
#
@@ -55,7 +57,7 @@
5557
# Darwin, MinGW, and NonStop.
5658
#
5759
# (3) This script is generated from the Groovy template
58-
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
60+
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
5961
# within the Gradle project.
6062
#
6163
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -84,7 +86,8 @@ done
8486
# shellcheck disable=SC2034
8587
APP_BASE_NAME=${0##*/}
8688
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
87-
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
89+
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
90+
' "$PWD" ) || exit
8891

8992
# Use the maximum available, or set MAX_FD != -1 to use that value.
9093
MAX_FD=maximum

example/android/gradlew.bat

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
@rem See the License for the specific language governing permissions and
1414
@rem limitations under the License.
1515
@rem
16+
@rem SPDX-License-Identifier: Apache-2.0
17+
@rem
1618

1719
@if "%DEBUG%"=="" @echo off
1820
@rem ##########################################################################

example/android/settings.gradle

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
pluginManagement { includeBuild("../node_modules/@react-native/gradle-plugin") }
2+
plugins { id("com.facebook.react.settings") }
3+
extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() }
14
rootProject.name = 'TingExample'
25
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
36
include ':app'

example/ios/.xcode.env.local

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
export NODE_BINARY=/var/folders/5b/12krnnqn6r15z6w6s2bhzfbm0000gp/T/yarn--1719745575076-0.9778405261640197/node
1+
export NODE_BINARY=$(command -v node)
22

0 commit comments

Comments
 (0)