原生项目升级助手
查看你需要对原生项目进行的所有更改的逐个文件差异,以将其升级到下一个 Expo SDK 版本。
如果你管理你的原生项目(以前称为裸工作流),到 升级到最新的 Expo SDK,你必须对你的原生项目进行更改。查找哪些原生文件发生更改以及要更新哪个文件中的内容可能是一个复杂的过程。
¥If you manage your native projects (previously known as bare workflow), to upgrade to the latest Expo SDK, you have to make changes to your native projects. It can be a complex process to find which native file changes and what to update in which file.
以下指南提供了比较项目当前 SDK 版本和要升级的目标 SDK 版本之间的原生项目文件的差异。你可以使用它们根据你的项目使用的 expo
软件包版本对你的项目进行更改。此页面上的工具与 React Native 升级助手 类似。然而,它们面向使用 Expo 模块和相关工具的项目。
¥The following guide provides diffs to compare native project files between your project's current SDK version and the target SDK version you want to upgrade. You can use them to make changes to your project depending on the expo
package version your project uses. The tools on this page are similar to React Native Upgrade Helper. However, they are oriented around projects that use Expo modules and related tooling.
有兴趣完全避免升级原生代码吗?请参阅 持续的原生生成 (CNG) 了解 Expo Prebuild 如何在构建之前生成你的原生项目。
¥Interested in avoiding upgrading native code altogether? See Continuous Native Generation (CNG) to learn how Expo Prebuild can generate your native projects before a build.
升级原生项目文件
¥Upgrade native project files
一旦你拥有 升级你的 Expo SDK 版本和相关依赖,请使用下面的 diff 工具来了解你需要对原生项目进行的更改,并将其更新为当前的 Expo SDK 版本。
¥Once you have upgraded your Expo SDK version and related dependencies, use the diff tool below to learn about changes you need to make to your native project and bring them up to date with the current Expo SDK version.
选择你的 SDK 版本和 SDK 版本以查看生成的差异。然后,通过复制和粘贴或手动更改项目文件,将这些更改应用到你的原生项目。
¥Choose your from SDK version and to SDK version to see the generated diff. Then, apply those changes to your native projects by copying and pasting or manually making changes to the project files.
From SDK version:
To SDK version:
Native code changes from SDK 52 to 53
14 | 14 | hermesCommand = new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim()).getParentFile().getAbsolutePath() + "/sdks/hermesc/%OS-BIN%/hermesc" |
15 | 15 | codegenDir = new File(["node", "--print", "require.resolve('@react-native/codegen/package.json', { paths: [require.resolve('react-native/package.json')] })"].execute(null, rootDir).text.trim()).getParentFile().getAbsoluteFile() |
16 | 16 | |
17 | enableBundleCompression = (findProperty('android.enableBundleCompression') ?: false).toBoolean() | |
17 | 18 | // Use Expo CLI to bundle the app, this ensures the Metro config |
18 | 19 | // works correctly with Expo projects. |
19 | 20 | cliFile = new File(["node", "--print", "require.resolve('@expo/cli', { paths: [require.resolve('expo/package.json')] })"].execute(null, rootDir).text.trim()) |
78 | 79 | * give correct results when using with locales other than en-US. Note that |
79 | 80 | * this variant is about 6MiB larger per architecture than default. |
80 | 81 | */ |
81 | def jscFlavor = 'org.webkit:android-jsc:+' | |
82 | def jscFlavor = 'io.github.react-native-community:jsc-android:2026004.+' | |
82 | 83 | |
83 | 84 | android { |
84 | 85 | ndkVersion rootProject.ext.ndkVersion |
156 | 157 | |
157 | 158 | if (isGifEnabled) { |
158 | 159 | // For animated gif support |
159 | implementation("com.facebook.fresco:animated-gif:${reactAndroidLibs.versions.fresco.get()}") | |
160 | implementation("com.facebook.fresco:animated-gif:${expoLibs.versions.fresco.get()}") | |
160 | 161 | } |
161 | 162 | |
162 | 163 | if (isWebpEnabled) { |
163 | 164 | // For webp support |
164 | implementation("com.facebook.fresco:webpsupport:${reactAndroidLibs.versions.fresco.get()}") | |
165 | implementation("com.facebook.fresco:webpsupport:${expoLibs.versions.fresco.get()}") | |
165 | 166 | if (isWebpAnimatedEnabled) { |
166 | 167 | // Animated webp support |
167 | implementation("com.facebook.fresco:animated-webp:${reactAndroidLibs.versions.fresco.get()}") | |
168 | implementation("com.facebook.fresco:animated-webp:${expoLibs.versions.fresco.get()}") | |
168 | 169 | } |
169 | 170 | } |
170 | 171 |
1 | 1 | <resources> |
2 | <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> | |
3 | <item name="android:textColor">@android:color/black</item> | |
4 | <item name="android:editTextStyle">@style/ResetEditText</item> | |
2 | <style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar"> | |
5 | 3 | <item name="android:editTextBackground">@drawable/rn_edit_text_material</item> |
6 | 4 | </style> |
7 | <style name="ResetEditText" parent="@android:style/Widget.EditText"> | |
8 | <item name="android:padding">0dp</item> | |
9 | <item name="android:textColorHint">#c8c8c8</item> | |
10 | <item name="android:textColor">@android:color/black</item> | |
11 | </style> | |
12 | 5 | <style name="Theme.App.SplashScreen" parent="AppTheme"> |
13 | 6 | <item name="android:windowBackground">@drawable/splashscreen_logo</item> |
14 | 7 | </style> |
1 | 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. |
2 | 2 | |
3 | 3 | buildscript { |
4 | ext { | |
5 | buildToolsVersion = findProperty('android.buildToolsVersion') ?: '35.0.0' | |
6 | minSdkVersion = Integer.parseInt(findProperty('android.minSdkVersion') ?: '24') | |
7 | compileSdkVersion = Integer.parseInt(findProperty('android.compileSdkVersion') ?: '35') | |
8 | targetSdkVersion = Integer.parseInt(findProperty('android.targetSdkVersion') ?: '34') | |
9 | kotlinVersion = findProperty('android.kotlinVersion') ?: '1.9.25' | |
10 | ||
11 | ndkVersion = "26.1.10909125" | |
12 | } | |
13 | repositories { | |
14 | google() | |
15 | mavenCentral() | |
16 | } | |
17 | dependencies { | |
18 | classpath('com.android.tools.build:gradle') | |
19 | classpath('com.facebook.react:react-native-gradle-plugin') | |
20 | classpath('org.jetbrains.kotlin:kotlin-gradle-plugin') | |
21 | } | |
4 | repositories { | |
5 | google() | |
6 | mavenCentral() | |
7 | } | |
8 | dependencies { | |
9 | classpath('com.android.tools.build:gradle') | |
10 | classpath('com.facebook.react:react-native-gradle-plugin') | |
11 | classpath('org.jetbrains.kotlin:kotlin-gradle-plugin') | |
12 | } | |
22 | 13 | } |
23 | 14 | |
24 | apply plugin: "com.facebook.react.rootproject" | |
15 | def reactNativeAndroidDir = new File( | |
16 | providers.exec { | |
17 | workingDir(rootDir) | |
18 | commandLine("node", "--print", "require.resolve('react-native/package.json')") | |
19 | }.standardOutput.asText.get().trim(), | |
20 | "../android" | |
21 | ) | |
25 | 22 | |
26 | 23 | allprojects { |
27 | repositories { | |
28 | maven { | |
29 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm | |
30 | url(new File(['node', '--print', "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim(), '../android')) | |
31 | } | |
32 | maven { | |
33 | // Android JSC is installed from npm | |
34 | url(new File(['node', '--print', "require.resolve('jsc-android/package.json', { paths: [require.resolve('react-native/package.json')] })"].execute(null, rootDir).text.trim(), '../dist')) | |
35 | } | |
36 | ||
37 | google() | |
38 | mavenCentral() | |
39 | maven { url 'https://www.jitpack.io' } | |
24 | repositories { | |
25 | maven { | |
26 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm | |
27 | url(reactNativeAndroidDir) | |
40 | 28 | } |
29 | ||
30 | google() | |
31 | mavenCentral() | |
32 | maven { url 'https://www.jitpack.io' } | |
33 | } | |
41 | 34 | } |
35 | ||
36 | apply plugin: "expo-root-project" | |
37 | apply plugin: "com.facebook.react.rootproject" |
35 | 35 | # your application. You should enable this flag either if you want |
36 | 36 | # to write custom TurboModules/Fabric components OR use libraries that |
37 | 37 | # are providing them. |
38 | newArchEnabled=false | |
38 | newArchEnabled=true | |
39 | 39 | |
40 | 40 | # Use this property to enable or disable the Hermes JS engine. |
41 | 41 | # If set to false, you will be using JSC instead. |
1 | 1 | distributionBase=GRADLE_USER_HOME |
2 | 2 | distributionPath=wrapper/dists |
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip | |
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip | |
4 | 4 | networkTimeout=10000 |
5 | 5 | validateDistributionUrl=true |
6 | 6 | zipStoreBase=GRADLE_USER_HOME |
86 | 86 | # shellcheck disable=SC2034 |
87 | 87 | APP_BASE_NAME=${0##*/} |
88 | 88 | # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) |
89 | APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s | |
90 | ' "$PWD" ) || exit | |
89 | APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit | |
91 | 90 | |
92 | 91 | # Use the maximum available, or set MAX_FD != -1 to use that value. |
93 | 92 | MAX_FD=maximum |
1 | 1 | pluginManagement { |
2 | includeBuild(new File(["node", "--print", "require.resolve('@react-native/gradle-plugin/package.json', { paths: [require.resolve('react-native/package.json')] })"].execute(null, rootDir).text.trim()).getParentFile().toString()) | |
2 | def reactNativeGradlePlugin = new File( | |
3 | providers.exec { | |
4 | workingDir(rootDir) | |
5 | commandLine("node", "--print", "require.resolve('@react-native/gradle-plugin/package.json', { paths: [require.resolve('react-native/package.json')] })") | |
6 | }.standardOutput.asText.get().trim() | |
7 | ).getParentFile().absolutePath | |
8 | includeBuild(reactNativeGradlePlugin) | |
9 | ||
10 | def expoPluginsPath = new File( | |
11 | providers.exec { | |
12 | workingDir(rootDir) | |
13 | commandLine("node", "--print", "require.resolve('expo-modules-autolinking/package.json', { paths: [require.resolve('expo/package.json')] })") | |
14 | }.standardOutput.asText.get().trim(), | |
15 | "../android/expo-gradle-plugin" | |
16 | ).absolutePath | |
17 | includeBuild(expoPluginsPath) | |
18 | } | |
19 | ||
20 | plugins { | |
21 | id("com.facebook.react.settings") | |
22 | id("expo-autolinking-settings") | |
3 | 23 | } |
4 | plugins { id("com.facebook.react.settings") } | |
5 | 24 | |
6 | 25 | extensions.configure(com.facebook.react.ReactSettingsExtension) { ex -> |
7 | 26 | if (System.getenv('EXPO_USE_COMMUNITY_AUTOLINKING') == '1') { |
8 | 27 | ex.autolinkLibrariesFromCommand() |
9 | 28 | } else { |
10 | def command = [ | |
11 | 'node', | |
12 | '--no-warnings', | |
13 | '--eval', | |
14 | 'require(require.resolve(\'expo-modules-autolinking\', { paths: [require.resolve(\'expo/package.json\')] }))(process.argv.slice(1))', | |
15 | 'react-native-config', | |
16 | '--json', | |
17 | '--platform', | |
18 | 'android' | |
19 | ].toList() | |
20 | ex.autolinkLibrariesFromCommand(command) | |
29 | ex.autolinkLibrariesFromCommand(expoAutolinking.rnConfigCommand) | |
21 | 30 | } |
22 | 31 | } |
32 | expoAutolinking.useExpoModules() | |
23 | 33 | |
24 | 34 | rootProject.name = 'HelloWorld' |
25 | 35 | |
26 | dependencyResolutionManagement { | |
27 | versionCatalogs { | |
28 | reactAndroidLibs { | |
29 | from(files(new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim(), "../gradle/libs.versions.toml"))) | |
30 | } | |
31 | } | |
32 | } | |
33 | ||
34 | apply from: new File(["node", "--print", "require.resolve('expo/package.json')"].execute(null, rootDir).text.trim(), "../scripts/autolinking.gradle"); | |
35 | useExpoModules() | |
36 | expoAutolinking.useExpoVersionCatalog() | |
36 | 37 | |
37 | 38 | include ':app' |
38 | includeBuild(new File(["node", "--print", "require.resolve('@react-native/gradle-plugin/package.json', { paths: [require.resolve('react-native/package.json')] })"].execute(null, rootDir).text.trim()).getParentFile()) | |
39 | includeBuild(expoAutolinking.reactNativeGradlePlugin) |
3 | 3 | archiveVersion = 1; |
4 | 4 | classes = { |
5 | 5 | }; |
6 | objectVersion = 46; | |
6 | objectVersion = 54; | |
7 | 7 | objects = { |
8 | 8 | |
9 | 9 | /* Begin PBXBuildFile section */ |
10 | 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; }; | |
11 | 10 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; |
12 | 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; | |
13 | 11 | 3E461D99554A48A4959DE609 /* SplashScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */; }; |
14 | 96905EF65AED1B983A6B3ABC /* libPods-HelloWorld.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 58EEBF8E8E6FB1BC6CAF49B5 /* libPods-HelloWorld.a */; }; | |
15 | B18059E884C0ABDD17F3DC3D /* ExpoModulesProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAC715A2D49A985799AEE119 /* ExpoModulesProvider.swift */; }; | |
16 | 12 | BB2F792D24A3F905000567C9 /* Expo.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB2F792C24A3F905000567C9 /* Expo.plist */; }; |
13 | F11748422D0307B40044C1D9 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F11748412D0307B40044C1D9 /* AppDelegate.swift */; }; | |
17 | 14 | /* End PBXBuildFile section */ |
18 | 15 | |
19 | 16 | /* Begin PBXFileReference section */ |
20 | 17 | 13B07F961A680F5B00A75B9A /* HelloWorld.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HelloWorld.app; sourceTree = BUILT_PRODUCTS_DIR; }; |
21 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = HelloWorld/AppDelegate.h; sourceTree = "<group>"; }; | |
22 | 13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = HelloWorld/AppDelegate.mm; sourceTree = "<group>"; }; | |
23 | 18 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = HelloWorld/Images.xcassets; sourceTree = "<group>"; }; |
24 | 19 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = HelloWorld/Info.plist; sourceTree = "<group>"; }; |
25 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = HelloWorld/main.m; sourceTree = "<group>"; }; | |
26 | 58EEBF8E8E6FB1BC6CAF49B5 /* libPods-HelloWorld.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-HelloWorld.a"; sourceTree = BUILT_PRODUCTS_DIR; }; | |
27 | 6C2E3173556A471DD304B334 /* Pods-HelloWorld.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HelloWorld.debug.xcconfig"; path = "Target Support Files/Pods-HelloWorld/Pods-HelloWorld.debug.xcconfig"; sourceTree = "<group>"; }; | |
28 | 7A4D352CD337FB3A3BF06240 /* Pods-HelloWorld.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HelloWorld.release.xcconfig"; path = "Target Support Files/Pods-HelloWorld/Pods-HelloWorld.release.xcconfig"; sourceTree = "<group>"; }; | |
29 | 20 | AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = SplashScreen.storyboard; path = HelloWorld/SplashScreen.storyboard; sourceTree = "<group>"; }; |
30 | 21 | BB2F792C24A3F905000567C9 /* Expo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Expo.plist; sourceTree = "<group>"; }; |
31 | 22 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; |
32 | FAC715A2D49A985799AEE119 /* ExpoModulesProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExpoModulesProvider.swift; path = "Pods/Target Support Files/Pods-HelloWorld/ExpoModulesProvider.swift"; sourceTree = "<group>"; }; | |
23 | F11748412D0307B40044C1D9 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AppDelegate.swift; path = HelloWorld/AppDelegate.swift; sourceTree = "<group>"; }; | |
24 | F11748442D0722820044C1D9 /* HelloWorld-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "HelloWorld-Bridging-Header.h"; path = "HelloWorld/HelloWorld-Bridging-Header.h"; sourceTree = "<group>"; }; | |
33 | 25 | /* End PBXFileReference section */ |
34 | 26 | |
35 | 27 | /* Begin PBXFrameworksBuildPhase section */ |
37 | 29 | isa = PBXFrameworksBuildPhase; |
38 | 30 | buildActionMask = 2147483647; |
39 | 31 | files = ( |
40 | 96905EF65AED1B983A6B3ABC /* libPods-HelloWorld.a in Frameworks */, | |
41 | 32 | ); |
42 | 33 | runOnlyForDeploymentPostprocessing = 0; |
43 | 34 | }; |
47 | 38 | 13B07FAE1A68108700A75B9A /* HelloWorld */ = { |
48 | 39 | isa = PBXGroup; |
49 | 40 | children = ( |
41 | F11748412D0307B40044C1D9 /* AppDelegate.swift */, | |
42 | F11748442D0722820044C1D9 /* HelloWorld-Bridging-Header.h */, | |
50 | 43 | BB2F792B24A3F905000567C9 /* Supporting */, |
51 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */, | |
52 | 13B07FB01A68108700A75B9A /* AppDelegate.mm */, | |
53 | 44 | 13B07FB51A68108700A75B9A /* Images.xcassets */, |
54 | 45 | 13B07FB61A68108700A75B9A /* Info.plist */, |
55 | 13B07FB71A68108700A75B9A /* main.m */, | |
56 | 46 | AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */, |
57 | 47 | ); |
58 | 48 | name = HelloWorld; |
62 | 52 | isa = PBXGroup; |
63 | 53 | children = ( |
64 | 54 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */, |
65 | 58EEBF8E8E6FB1BC6CAF49B5 /* libPods-HelloWorld.a */, | |
66 | 55 | ); |
67 | 56 | name = Frameworks; |
68 | 57 | sourceTree = "<group>"; |
81 | 70 | 832341AE1AAA6A7D00B99B32 /* Libraries */, |
82 | 71 | 83CBBA001A601CBA00E9B192 /* Products */, |
83 | 72 | 2D16E6871FA4F8E400B85C8A /* Frameworks */, |
84 | D65327D7A22EEC0BE12398D9 /* Pods */, | |
85 | D7E4C46ADA2E9064B798F356 /* ExpoModulesProviders */, | |
86 | 73 | ); |
87 | 74 | indentWidth = 2; |
88 | 75 | sourceTree = "<group>"; |
97 | 84 | name = Products; |
98 | 85 | sourceTree = "<group>"; |
99 | 86 | }; |
100 | 92DBD88DE9BF7D494EA9DA96 /* HelloWorld */ = { | |
101 | isa = PBXGroup; | |
102 | children = ( | |
103 | FAC715A2D49A985799AEE119 /* ExpoModulesProvider.swift */, | |
104 | ); | |
105 | name = HelloWorld; | |
106 | sourceTree = "<group>"; | |
107 | }; | |
108 | 87 | BB2F792B24A3F905000567C9 /* Supporting */ = { |
109 | 88 | isa = PBXGroup; |
110 | 89 | children = ( |
114 | 93 | path = HelloWorld/Supporting; |
115 | 94 | sourceTree = "<group>"; |
116 | 95 | }; |
117 | D65327D7A22EEC0BE12398D9 /* Pods */ = { | |
118 | isa = PBXGroup; | |
119 | children = ( | |
120 | 6C2E3173556A471DD304B334 /* Pods-HelloWorld.debug.xcconfig */, | |
121 | 7A4D352CD337FB3A3BF06240 /* Pods-HelloWorld.release.xcconfig */, | |
122 | ); | |
123 | path = Pods; | |
124 | sourceTree = "<group>"; | |
125 | }; | |
126 | D7E4C46ADA2E9064B798F356 /* ExpoModulesProviders */ = { | |
127 | isa = PBXGroup; | |
128 | children = ( | |
129 | 92DBD88DE9BF7D494EA9DA96 /* HelloWorld */, | |
130 | ); | |
131 | name = ExpoModulesProviders; | |
132 | sourceTree = "<group>"; | |
133 | }; | |
134 | 96 | /* End PBXGroup section */ |
135 | 97 | |
136 | 98 | /* Begin PBXNativeTarget section */ |
265 | 227 | isa = PBXSourcesBuildPhase; |
266 | 228 | buildActionMask = 2147483647; |
267 | 229 | files = ( |
268 | 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */, | |
269 | 13B07FC11A68108700A75B9A /* main.m in Sources */, | |
270 | B18059E884C0ABDD17F3DC3D /* ExpoModulesProvider.swift in Sources */, | |
230 | F11748422D0307B40044C1D9 /* AppDelegate.swift in Sources */, | |
271 | 231 | ); |
272 | 232 | runOnlyForDeploymentPostprocessing = 0; |
273 | 233 | }; |
276 | 236 | /* Begin XCBuildConfiguration section */ |
277 | 237 | 13B07F941A680F5B00A75B9A /* Debug */ = { |
278 | 238 | isa = XCBuildConfiguration; |
279 | baseConfigurationReference = 6C2E3173556A471DD304B334 /* Pods-HelloWorld.debug.xcconfig */; | |
280 | 239 | buildSettings = { |
281 | 240 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; |
282 | 241 | CLANG_ENABLE_MODULES = YES; |
288 | 247 | ); |
289 | 248 | INFOPLIST_FILE = HelloWorld/Info.plist; |
290 | 249 | IPHONEOS_DEPLOYMENT_TARGET = 15.1; |
291 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; | |
250 | LD_RUNPATH_SEARCH_PATHS = ( | |
251 | "$(inherited)", | |
252 | "@executable_path/Frameworks", | |
253 | ); | |
292 | 254 | MARKETING_VERSION = 1.0; |
293 | 255 | OTHER_LDFLAGS = ( |
294 | 256 | "$(inherited)", |
297 | 259 | ); |
298 | 260 | PRODUCT_BUNDLE_IDENTIFIER = org.name.HelloWorld; |
299 | 261 | PRODUCT_NAME = HelloWorld; |
262 | SWIFT_OBJC_BRIDGING_HEADER = "HelloWorld/HelloWorld-Bridging-Header.h"; | |
300 | 263 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; |
301 | 264 | SWIFT_VERSION = 5.0; |
302 | 265 | VERSIONING_SYSTEM = "apple-generic"; |
305 | 268 | }; |
306 | 269 | 13B07F951A680F5B00A75B9A /* Release */ = { |
307 | 270 | isa = XCBuildConfiguration; |
308 | baseConfigurationReference = 7A4D352CD337FB3A3BF06240 /* Pods-HelloWorld.release.xcconfig */; | |
309 | 271 | buildSettings = { |
310 | 272 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; |
311 | 273 | CLANG_ENABLE_MODULES = YES; |
312 | 274 | CURRENT_PROJECT_VERSION = 1; |
313 | 275 | INFOPLIST_FILE = HelloWorld/Info.plist; |
314 | 276 | IPHONEOS_DEPLOYMENT_TARGET = 15.1; |
315 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; | |
277 | LD_RUNPATH_SEARCH_PATHS = ( | |
278 | "$(inherited)", | |
279 | "@executable_path/Frameworks", | |
280 | ); | |
316 | 281 | MARKETING_VERSION = 1.0; |
317 | 282 | OTHER_LDFLAGS = ( |
318 | 283 | "$(inherited)", |
321 | 286 | ); |
322 | 287 | PRODUCT_BUNDLE_IDENTIFIER = org.name.HelloWorld; |
323 | 288 | PRODUCT_NAME = HelloWorld; |
289 | SWIFT_OBJC_BRIDGING_HEADER = "HelloWorld/HelloWorld-Bridging-Header.h"; | |
324 | 290 | SWIFT_VERSION = 5.0; |
325 | 291 | VERSIONING_SYSTEM = "apple-generic"; |
326 | 292 | }; |
374 | 340 | GCC_WARN_UNUSED_FUNCTION = YES; |
375 | 341 | GCC_WARN_UNUSED_VARIABLE = YES; |
376 | 342 | IPHONEOS_DEPLOYMENT_TARGET = 15.1; |
377 | LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)"; | |
343 | LD_RUNPATH_SEARCH_PATHS = ( | |
344 | /usr/lib/swift, | |
345 | "$(inherited)", | |
346 | ); | |
378 | 347 | LIBRARY_SEARCH_PATHS = "\"$(inherited)\""; |
379 | 348 | MTL_ENABLE_DEBUG_INFO = YES; |
380 | 349 | ONLY_ACTIVE_ARCH = YES; |
423 | 392 | GCC_WARN_UNUSED_FUNCTION = YES; |
424 | 393 | GCC_WARN_UNUSED_VARIABLE = YES; |
425 | 394 | IPHONEOS_DEPLOYMENT_TARGET = 15.1; |
426 | LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)"; | |
395 | LD_RUNPATH_SEARCH_PATHS = ( | |
396 | /usr/lib/swift, | |
397 | "$(inherited)", | |
398 | ); | |
427 | 399 | LIBRARY_SEARCH_PATHS = "\"$(inherited)\""; |
428 | 400 | MTL_ENABLE_DEBUG_INFO = NO; |
429 | 401 | SDKROOT = iphoneos; |
1 | import Expo | |
2 | import React | |
3 | import ReactAppDependencyProvider | |
4 | ||
5 | @UIApplicationMain | |
6 | public class AppDelegate: ExpoAppDelegate { | |
7 | var window: UIWindow? | |
8 | ||
9 | var reactNativeDelegate: ExpoReactNativeFactoryDelegate? | |
10 | var reactNativeFactory: RCTReactNativeFactory? | |
11 | ||
12 | public override func application( | |
13 | _ application: UIApplication, | |
14 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil | |
15 | ) -> Bool { | |
16 | let delegate = ReactNativeDelegate() | |
17 | let factory = ExpoReactNativeFactory(delegate: delegate) | |
18 | delegate.dependencyProvider = RCTAppDependencyProvider() | |
19 | ||
20 | reactNativeDelegate = delegate | |
21 | reactNativeFactory = factory | |
22 | bindReactNativeFactory(factory) | |
23 | ||
24 | #if os(iOS) || os(tvOS) | |
25 | window = UIWindow(frame: UIScreen.main.bounds) | |
26 | factory.startReactNative( | |
27 | withModuleName: "main", | |
28 | in: window, | |
29 | launchOptions: launchOptions) | |
30 | #endif | |
31 | ||
32 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) | |
33 | } | |
34 | ||
35 | // Linking API | |
36 | public override func application( | |
37 | _ app: UIApplication, | |
38 | open url: URL, | |
39 | options: [UIApplication.OpenURLOptionsKey: Any] = [:] | |
40 | ) -> Bool { | |
41 | return super.application(app, open: url, options: options) || RCTLinkingManager.application(app, open: url, options: options) | |
42 | } | |
43 | ||
44 | // Universal Links | |
45 | public override func application( | |
46 | _ application: UIApplication, | |
47 | continue userActivity: NSUserActivity, | |
48 | restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void | |
49 | ) -> Bool { | |
50 | let result = RCTLinkingManager.application(application, continue: userActivity, restorationHandler: restorationHandler) | |
51 | return super.application(application, continue: userActivity, restorationHandler: restorationHandler) || result | |
52 | } | |
53 | } | |
54 | ||
55 | class ReactNativeDelegate: ExpoReactNativeFactoryDelegate { | |
56 | // Extension point for config-plugins | |
57 | ||
58 | override func sourceURL(for bridge: RCTBridge) -> URL? { | |
59 | // needed to return the correct URL for expo-dev-client. | |
60 | bridge.bundleURL ?? bundleURL() | |
61 | } | |
62 | ||
63 | override func bundleURL() -> URL? { | |
64 | #if DEBUG | |
65 | return RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: ".expo/.virtual-metro-entry") | |
66 | #else | |
67 | return Bundle.main.url(forResource: "main", withExtension: "jsbundle") | |
68 | #endif | |
69 | } | |
70 | } |
1 | // | |
2 | // Use this file to import your target's public headers that you would like to expose to Swift. | |
3 | // |
4 | 4 | require 'json' |
5 | 5 | podfile_properties = JSON.parse(File.read(File.join(__dir__, 'Podfile.properties.json'))) rescue {} |
6 | 6 | |
7 | ENV['RCT_NEW_ARCH_ENABLED'] = podfile_properties['newArchEnabled'] == 'true' ? '1' : '0' | |
7 | ENV['RCT_NEW_ARCH_ENABLED'] = '0' if podfile_properties['newArchEnabled'] == 'false' | |
8 | 8 | ENV['EX_DEV_CLIENT_NETWORK_INSPECTOR'] = podfile_properties['EX_DEV_CLIENT_NETWORK_INSPECTOR'] |
9 | 9 | |
10 | 10 | platform :ios, podfile_properties['ios.deploymentTarget'] || '15.1' |
20 | 20 | config_command = ['node', '-e', "process.argv=['', '', 'config'];require('@react-native-community/cli').run()"]; |
21 | 21 | else |
22 | 22 | config_command = [ |
23 | 'node', | |
24 | '--no-warnings', | |
25 | '--eval', | |
26 | 'require(require.resolve(\'expo-modules-autolinking\', { paths: [require.resolve(\'expo/package.json\')] }))(process.argv.slice(1))', | |
23 | 'npx', | |
24 | 'expo-modules-autolinking', | |
27 | 25 | 'react-native-config', |
28 | 26 | '--json', |
29 | 27 | '--platform', |
2 | 2 | "name": "expo-template-bare-minimum", |
3 | 3 | "description": "This bare project template includes a minimal setup for using unimodules with React Native.", |
4 | 4 | "license": "0BSD", |
5 | "version": "52.0.76", | |
5 | "version": "53.0.25", | |
6 | 6 | "main": "index.js", |
7 | 7 | "scripts": { |
8 | 8 | "start": "expo start --dev-client", |
11 | 11 | "web": "expo start --web" |
12 | 12 | }, |
13 | 13 | "dependencies": { |
14 | "expo": "~52.0.46", | |
15 | "expo-status-bar": "~2.0.1", | |
16 | "react": "18.3.1", | |
17 | "react-native": "0.76.9" | |
14 | "expo": "~53.0.7", | |
15 | "expo-status-bar": "~2.2.3", | |
16 | "react": "19.0.0", | |
17 | "react-native": "0.79.2" | |
18 | 18 | }, |
19 | 19 | "devDependencies": { |
20 | 20 | "@babel/core": "^7.20.0" |