Skip to content

Commit af4e5dd

Browse files
committed
chore(example): update to react-native 0.83
1 parent 3cdac68 commit af4e5dd

12 files changed

Lines changed: 1124 additions & 1310 deletions

File tree

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

Lines changed: 0 additions & 9 deletions
This file was deleted.

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
android:roundIcon="@mipmap/ic_launcher_round"
1010
android:allowBackup="false"
1111
android:theme="@style/AppTheme"
12+
android:usesCleartextTraffic="${usesCleartextTraffic}"
1213
android:supportsRtl="true">
1314
<activity
1415
android:name=".MainActivity"

example/android/app/src/main/java/pdflight/example/MainApplication.kt

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,20 @@ import com.facebook.react.PackageList
55
import com.facebook.react.ReactApplication
66
import com.facebook.react.ReactHost
77
import com.facebook.react.ReactNativeApplicationEntryPoint.loadReactNative
8-
import com.facebook.react.ReactNativeHost
9-
import com.facebook.react.ReactPackage
108
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
11-
import com.facebook.react.defaults.DefaultReactNativeHost
129

1310
class MainApplication : Application(), ReactApplication {
1411

15-
override val reactNativeHost: ReactNativeHost =
16-
object : DefaultReactNativeHost(this) {
17-
override fun getPackages(): List<ReactPackage> =
18-
PackageList(this).packages.apply {
19-
// Packages that cannot be autolinked yet can be added manually here, for example:
20-
// add(MyReactNativePackage())
21-
}
22-
23-
override fun getJSMainModuleName(): String = "index"
24-
25-
override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG
26-
27-
override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
28-
override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
29-
}
30-
31-
override val reactHost: ReactHost
32-
get() = getDefaultReactHost(applicationContext, reactNativeHost)
12+
override val reactHost: ReactHost by lazy {
13+
getDefaultReactHost(
14+
context = applicationContext,
15+
packageList =
16+
PackageList(this).packages.apply {
17+
// Packages that cannot be autolinked yet can be added manually here, for example:
18+
// add(MyReactNativePackage())
19+
},
20+
)
21+
}
3322

3423
override fun onCreate() {
3524
super.onCreate()
1.65 KB
Binary file not shown.

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

Lines changed: 1 addition & 1 deletion
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.14.3-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

example/ios/PdfLightExample.xcodeproj/project.pbxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,7 @@
376376
);
377377
MTL_ENABLE_DEBUG_INFO = YES;
378378
ONLY_ACTIVE_ARCH = YES;
379+
OTHER_CFLAGS = "$(inherited)";
379380
OTHER_CPLUSPLUSFLAGS = (
380381
"$(OTHER_CFLAGS)",
381382
"-DFOLLY_NO_CONFIG",
@@ -444,6 +445,7 @@
444445
"\"$(inherited)\"",
445446
);
446447
MTL_ENABLE_DEBUG_INFO = NO;
448+
OTHER_CFLAGS = "$(inherited)";
447449
OTHER_CPLUSPLUSFLAGS = (
448450
"$(OTHER_CFLAGS)",
449451
"-DFOLLY_NO_CONFIG",

example/ios/PdfLightExample/Info.plist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5+
<key>CADisableMinimumFrameDurationOnPhone</key>
6+
<true/>
57
<key>CFBundleDevelopmentRegion</key>
68
<string>en</string>
79
<key>CFBundleDisplayName</key>

example/ios/Podfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ target 'PdfLightExample' do
2626
)
2727

2828
post_install do |installer|
29-
# https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
3029
react_native_post_install(
3130
installer,
3231
config[:reactNativePath],

example/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
"build:ios": "react-native build-ios --mode Debug"
1111
},
1212
"dependencies": {
13-
"react": "19.1.0",
14-
"react-native": "0.81.1",
15-
"react-native-file-access": "^3.2.0",
13+
"react": "19.2.0",
14+
"react-native": "0.83.9",
15+
"react-native-file-access": "^4.0.3",
1616
"react-native-safe-area-context": "^5.7.0"
1717
},
1818
"devDependencies": {
@@ -22,10 +22,10 @@
2222
"@react-native-community/cli": "20.0.0",
2323
"@react-native-community/cli-platform-android": "20.0.0",
2424
"@react-native-community/cli-platform-ios": "20.0.0",
25-
"@react-native/babel-preset": "0.81.1",
26-
"@react-native/metro-config": "0.81.1",
27-
"@react-native/typescript-config": "0.81.1",
28-
"@types/react": "^19.1.0",
25+
"@react-native/babel-preset": "0.83.9",
26+
"@react-native/metro-config": "0.83.9",
27+
"@react-native/typescript-config": "0.83.9",
28+
"@types/react": "^19.2.0",
2929
"react-native-builder-bob": "^0.40.16",
3030
"react-native-monorepo-config": "^0.1.9"
3131
},

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,12 @@
7070
"@eslint/eslintrc": "^3.3.1",
7171
"@eslint/js": "^9.35.0",
7272
"@react-native-community/cli": "20.0.1",
73-
"@react-native/babel-preset": "0.81.1",
74-
"@react-native/eslint-config": "^0.81.1",
73+
"@react-native/babel-preset": "0.83.9",
74+
"@react-native/eslint-config": "^0.83.9",
7575
"@release-it/conventional-changelog": "^10.0.1",
7676
"@testing-library/react-native": "^13.3.3",
7777
"@types/jest": "^29.5.14",
78-
"@types/react": "^19.1.0",
78+
"@types/react": "^19.2.0",
7979
"commitlint": "^19.8.1",
8080
"del-cli": "^6.0.0",
8181
"eslint": "^9.35.0",
@@ -84,10 +84,10 @@
8484
"jest": "^29.7.0",
8585
"lefthook": "^2.0.3",
8686
"prettier": "^2.8.8",
87-
"react": "19.1.0",
88-
"react-native": "0.81.1",
87+
"react": "19.2.0",
88+
"react-native": "0.83.9",
8989
"react-native-builder-bob": "^0.40.16",
90-
"react-test-renderer": "19.1.0",
90+
"react-test-renderer": "19.2.0",
9191
"release-it": "^19.0.4",
9292
"turbo": "^2.5.6",
9393
"typescript": "^5.9.2"

0 commit comments

Comments
 (0)