Skip to content

Commit 9c4e190

Browse files
committed
chore: android and ios are tested with the newest dependencies
1 parent 94d5545 commit 9c4e190

File tree

15 files changed

+450
-551
lines changed

15 files changed

+450
-551
lines changed

android/app/build.gradle

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ react {
5656
def enableSeparateBuildPerCPUArchitecture = false
5757
def enableProguardInReleaseBuilds = false
5858
def jscFlavor = 'org.webkit:android-jsc:+'
59-
def enableHermes = project.ext.react.get("enableHermes", false);
59+
//def enableHermes = project.ext.react.get("enableHermes", false);
6060

6161
def reactNativeArchitectures() {
6262
def value = project.getProperties().get("reactNativeArchitectures")
@@ -127,22 +127,13 @@ android {
127127

128128
}
129129
}
130-
131-
packagingOptions {
132-
pickFirst '**/armeabi-v7a/libc++_shared.so'
133-
pickFirst '**/x86/libc++_shared.so'
134-
pickFirst '**/arm64-v8a/libc++_shared.so'
135-
pickFirst '**/x86_64/libc++_shared.so'
136-
pickFirst '**/x86/libjsc.so'
137-
pickFirst '**/armeabi-v7a/libjsc.so'
138-
}
139130
}
140131

141132
dependencies {
142133
// The version of react-native is set by the React Native Gradle Plugin
143134
implementation("com.facebook.react:react-android")
144135

145-
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
136+
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.0.0")
146137

147138
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}")
148139
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {

android/app/src/main/java/com/rntypescriptboilerplate/MainActivity.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,18 @@
55
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
66
import com.facebook.react.defaults.DefaultReactActivityDelegate;
77

8+
// SplashScreen Imports
9+
import android.os.Bundle;
10+
import org.devio.rn.splashscreen.SplashScreen;
11+
812
public class MainActivity extends ReactActivity {
913

14+
15+
@Override
16+
protected void onCreate(Bundle savedInstanceState) {
17+
SplashScreen.show(this);
18+
super.onCreate(savedInstanceState);
19+
}
1020
/**
1121
* Returns the name of the main component registered from JavaScript. This is used to schedule
1222
* rendering of the component.

android/app/src/main/java/com/rntypescriptboilerplate/MainApplication.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import com.facebook.react.defaults.DefaultReactNativeHost;
1111
import com.facebook.soloader.SoLoader;
1212
import java.util.List;
13-
import com.swmansion.reanimated.ReanimatedJSIModulePackage;
1413

1514
public class MainApplication extends Application implements ReactApplication {
1615

@@ -45,10 +44,6 @@ protected Boolean isHermesEnabled() {
4544
return BuildConfig.IS_HERMES_ENABLED;
4645
}
4746

48-
@Override
49-
protected JSIModulePackage getJSIModulePackage() {
50-
return new ReanimatedJSIModulePackage();
51-
}
5247
};
5348

5449
@Override

android/app/src/main/java/com/rntypescriptboilerplate/ReactNativeFlipper.java

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

ios/Podfile

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,25 @@
11
require_relative '../node_modules/react-native/scripts/react_native_pods'
22
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
33

4-
platform :ios, '12.4'
5-
install! 'cocoapods', :deterministic_uuids => false
4+
platform :ios, min_ios_version_supported
5+
prepare_react_native_project!
66

7-
production = ENV["PRODUCTION"] == "1"
7+
# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
8+
# because `react-native-flipper` depends on (FlipperKit,...) that will be excluded
9+
#
10+
# To fix this you can also exclude `react-native-flipper` using a `react-native.config.js`
11+
# ```js
12+
# module.exports = {
13+
# dependencies: {
14+
# ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
15+
# ```
16+
flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled
17+
18+
linkage = ENV['USE_FRAMEWORKS']
19+
if linkage != nil
20+
Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
21+
use_frameworks! :linkage => linkage.to_sym
22+
end
823

924
target 'RNTypescriptBoilerplate' do
1025
config = use_native_modules!
@@ -13,12 +28,17 @@ target 'RNTypescriptBoilerplate' do
1328
flags = get_default_flags()
1429

1530
use_react_native!(
16-
:production => production,
1731
:path => config[:reactNativePath],
18-
# to enable hermes on iOS, change `false` to `true` and then install pods
32+
# Hermes is now enabled by default. Disable by setting this flag to false.
33+
# Upcoming versions of React Native may rely on get_default_flags(), but
34+
# we make it explicit here to aid in the React Native upgrade process.
1935
:hermes_enabled => flags[:hermes_enabled],
2036
:fabric_enabled => flags[:fabric_enabled],
21-
:flipper_configuration => FlipperConfiguration.enabled,
37+
# Enables Flipper.
38+
#
39+
# Note that if you have use_frameworks! enabled, Flipper will not work and
40+
# you should disable the next line.
41+
:flipper_configuration => flipper_config,
2242
# An absolute path to your application root.
2343
:app_path => "#{Pod::Config.instance.installation_root}/.."
2444
)
@@ -29,7 +49,12 @@ target 'RNTypescriptBoilerplate' do
2949
end
3050

3151
post_install do |installer|
32-
react_native_post_install(installer)
52+
react_native_post_install(
53+
installer,
54+
# Set `mac_catalyst_enabled` to `true` in order to apply patches
55+
# necessary for Mac Catalyst builds
56+
:mac_catalyst_enabled => false
57+
)
3358
__apply_Xcode_12_5_M1_post_install_workaround(installer)
3459
end
3560
end

0 commit comments

Comments
 (0)