expo-template-bare-minimum 47.0.21 → 48.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/android/app/build.gradle +91 -217
  2. package/android/app/src/debug/java/com/helloworld/ReactNativeFlipper.java +11 -5
  3. package/android/app/src/main/AndroidManifest.xml +1 -1
  4. package/android/app/src/main/java/com/helloworld/MainActivity.java +13 -28
  5. package/android/app/src/main/java/com/helloworld/MainApplication.java +37 -67
  6. package/android/app/src/release/java/com/helloworld/ReactNativeFlipper.java +20 -0
  7. package/android/build.gradle +7 -30
  8. package/android/gitignore +0 -6
  9. package/android/gradle.properties +1 -1
  10. package/android/settings.gradle +0 -7
  11. package/gitignore +5 -6
  12. package/ios/HelloWorld/AppDelegate.h +2 -4
  13. package/ios/HelloWorld/AppDelegate.mm +12 -111
  14. package/ios/HelloWorld.xcodeproj/project.pbxproj +2 -0
  15. package/ios/HelloWorld.xcodeproj/project.xcworkspace/xcuserdata/brentvatne.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  16. package/ios/Podfile +19 -2
  17. package/ios/Podfile.properties.json +1 -1
  18. package/package.json +7 -7
  19. package/.buckconfig +0 -6
  20. package/android/app/BUCK +0 -55
  21. package/android/app/build_defs.bzl +0 -19
  22. package/android/app/src/main/java/com/helloworld/newarchitecture/MainApplicationReactNativeHost.java +0 -117
  23. package/android/app/src/main/java/com/helloworld/newarchitecture/components/MainComponentsRegistry.java +0 -36
  24. package/android/app/src/main/java/com/helloworld/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java +0 -48
  25. package/android/app/src/main/jni/CMakeLists.txt +0 -7
  26. package/android/app/src/main/jni/MainApplicationModuleProvider.cpp +0 -32
  27. package/android/app/src/main/jni/MainApplicationModuleProvider.h +0 -16
  28. package/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp +0 -45
  29. package/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h +0 -38
  30. package/android/app/src/main/jni/MainComponentsRegistry.cpp +0 -65
  31. package/android/app/src/main/jni/MainComponentsRegistry.h +0 -32
  32. package/android/app/src/main/jni/OnLoad.cpp +0 -11
@@ -1,69 +1,70 @@
1
1
  package com.helloworld;
2
2
 
3
3
  import android.app.Application;
4
- import android.content.Context;
5
4
  import android.content.res.Configuration;
6
5
  import androidx.annotation.NonNull;
7
6
 
8
7
  import com.facebook.react.PackageList;
9
8
  import com.facebook.react.ReactApplication;
10
- import com.facebook.react.ReactInstanceManager;
11
9
  import com.facebook.react.ReactNativeHost;
12
10
  import com.facebook.react.ReactPackage;
13
- import com.facebook.react.config.ReactFeatureFlags;
11
+ import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
12
+ import com.facebook.react.defaults.DefaultReactNativeHost;
14
13
  import com.facebook.soloader.SoLoader;
15
- import com.helloworld.newarchitecture.MainApplicationReactNativeHost;
16
14
 
17
15
  import expo.modules.ApplicationLifecycleDispatcher;
18
16
  import expo.modules.ReactNativeHostWrapper;
19
17
 
20
- import java.lang.reflect.InvocationTargetException;
21
18
  import java.util.List;
22
19
 
23
20
  public class MainApplication extends Application implements ReactApplication {
24
- private final ReactNativeHost mReactNativeHost = new ReactNativeHostWrapper(
25
- this,
26
- new ReactNativeHost(this) {
27
- @Override
28
- public boolean getUseDeveloperSupport() {
29
- return BuildConfig.DEBUG;
30
- }
31
21
 
32
- @Override
33
- protected List<ReactPackage> getPackages() {
34
- @SuppressWarnings("UnnecessaryLocalVariable")
35
- List<ReactPackage> packages = new PackageList(this).getPackages();
36
- // Packages that cannot be autolinked yet can be added manually here, for example:
37
- // packages.add(new MyReactNativePackage());
38
- return packages;
39
- }
22
+ private final ReactNativeHost mReactNativeHost =
23
+ new ReactNativeHostWrapper(this, new DefaultReactNativeHost(this) {
24
+ @Override
25
+ public boolean getUseDeveloperSupport() {
26
+ return BuildConfig.DEBUG;
27
+ }
40
28
 
41
- @Override
42
- protected String getJSMainModuleName() {
43
- return "index";
44
- }
45
- });
29
+ @Override
30
+ protected List<ReactPackage> getPackages() {
31
+ @SuppressWarnings("UnnecessaryLocalVariable")
32
+ List<ReactPackage> packages = new PackageList(this).getPackages();
33
+ // Packages that cannot be autolinked yet can be added manually here, for example:
34
+ // packages.add(new MyReactNativePackage());
35
+ return packages;
36
+ }
46
37
 
47
- private final ReactNativeHost mNewArchitectureNativeHost =
48
- new ReactNativeHostWrapper(this, new MainApplicationReactNativeHost(this));
38
+ @Override
39
+ protected String getJSMainModuleName() {
40
+ return "index";
41
+ }
42
+
43
+ @Override
44
+ protected boolean isNewArchEnabled() {
45
+ return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
46
+ }
47
+
48
+ @Override
49
+ protected Boolean isHermesEnabled() {
50
+ return BuildConfig.IS_HERMES_ENABLED;
51
+ }
52
+ });
49
53
 
50
54
  @Override
51
55
  public ReactNativeHost getReactNativeHost() {
52
- if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
53
- return mNewArchitectureNativeHost;
54
- } else {
55
- return mReactNativeHost;
56
- }
56
+ return mReactNativeHost;
57
57
  }
58
58
 
59
59
  @Override
60
60
  public void onCreate() {
61
61
  super.onCreate();
62
- // If you opted-in for the New Architecture, we enable the TurboModule system
63
- ReactFeatureFlags.useTurboModules = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
64
62
  SoLoader.init(this, /* native exopackage */ false);
65
-
66
- initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
63
+ if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
64
+ // If you opted-in for the New Architecture, we load the native entry point for this app.
65
+ DefaultNewArchitectureEntryPoint.load();
66
+ }
67
+ ReactNativeFlipper.initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
67
68
  ApplicationLifecycleDispatcher.onApplicationCreate(this);
68
69
  }
69
70
 
@@ -72,35 +73,4 @@ public class MainApplication extends Application implements ReactApplication {
72
73
  super.onConfigurationChanged(newConfig);
73
74
  ApplicationLifecycleDispatcher.onConfigurationChanged(this, newConfig);
74
75
  }
75
-
76
- /**
77
- * Loads Flipper in React Native templates. Call this in the onCreate method with something like
78
- * initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
79
- *
80
- * @param context
81
- * @param reactInstanceManager
82
- */
83
- private static void initializeFlipper(
84
- Context context, ReactInstanceManager reactInstanceManager) {
85
- if (BuildConfig.DEBUG) {
86
- try {
87
- /*
88
- We use reflection here to pick up the class that initializes Flipper,
89
- since Flipper library is not available in release mode
90
- */
91
- Class<?> aClass = Class.forName("com.helloworld.ReactNativeFlipper");
92
- aClass
93
- .getMethod("initializeFlipper", Context.class, ReactInstanceManager.class)
94
- .invoke(null, context, reactInstanceManager);
95
- } catch (ClassNotFoundException e) {
96
- e.printStackTrace();
97
- } catch (NoSuchMethodException e) {
98
- e.printStackTrace();
99
- } catch (IllegalAccessException e) {
100
- e.printStackTrace();
101
- } catch (InvocationTargetException e) {
102
- e.printStackTrace();
103
- }
104
- }
105
- }
106
76
  }
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * <p>This source code is licensed under the MIT license found in the LICENSE file in the root
5
+ * directory of this source tree.
6
+ */
7
+ package com.helloworld;
8
+
9
+ import android.content.Context;
10
+ import com.facebook.react.ReactInstanceManager;
11
+
12
+ /**
13
+ * Class responsible of loading Flipper inside your React Native application. This is the release
14
+ * flavor of it so it's empty as we don't want to load Flipper.
15
+ */
16
+ public class ReactNativeFlipper {
17
+ public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
18
+ // Do nothing as we don't want to initialize Flipper on Release.
19
+ }
20
+ }
@@ -2,47 +2,30 @@
2
2
 
3
3
  buildscript {
4
4
  ext {
5
- buildToolsVersion = findProperty('android.buildToolsVersion') ?: '31.0.0'
5
+ buildToolsVersion = findProperty('android.buildToolsVersion') ?: '33.0.0'
6
6
  minSdkVersion = Integer.parseInt(findProperty('android.minSdkVersion') ?: '21')
7
- compileSdkVersion = Integer.parseInt(findProperty('android.compileSdkVersion') ?: '31')
8
- targetSdkVersion = Integer.parseInt(findProperty('android.targetSdkVersion') ?: '31')
7
+ compileSdkVersion = Integer.parseInt(findProperty('android.compileSdkVersion') ?: '33')
8
+ targetSdkVersion = Integer.parseInt(findProperty('android.targetSdkVersion') ?: '33')
9
9
  if (findProperty('android.kotlinVersion')) {
10
10
  kotlinVersion = findProperty('android.kotlinVersion')
11
11
  }
12
12
  frescoVersion = findProperty('expo.frescoVersion') ?: '2.5.0'
13
13
 
14
- if (System.properties['os.arch'] == 'aarch64') {
15
- // For M1 Users we need to use the NDK 24 which added support for aarch64
16
- ndkVersion = '24.0.8215888'
17
- } else {
18
- // Otherwise we default to the side-by-side NDK version from AGP.
19
- ndkVersion = '21.4.7075529'
20
- }
14
+ // We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP.
15
+ ndkVersion = "23.1.7779620"
21
16
  }
22
17
  repositories {
23
18
  google()
24
19
  mavenCentral()
25
20
  }
26
21
  dependencies {
27
- classpath('com.android.tools.build:gradle:7.2.1')
22
+ classpath('com.android.tools.build:gradle:7.3.1')
28
23
  classpath('com.facebook.react:react-native-gradle-plugin')
29
- classpath('de.undercouch:gradle-download-task:5.0.1')
30
- // NOTE: Do not place your application dependencies here; they belong
31
- // in the individual module build.gradle files
32
24
  }
33
25
  }
34
26
 
35
- def REACT_NATIVE_VERSION = new File(['node', '--print', "JSON.parse(require('fs').readFileSync(require.resolve('react-native/package.json'), 'utf-8')).version"].execute(null, rootDir).text.trim())
36
-
37
27
  allprojects {
38
- configurations.all {
39
- resolutionStrategy {
40
- force "com.facebook.react:react-native:" + REACT_NATIVE_VERSION
41
- }
42
- }
43
-
44
28
  repositories {
45
- mavenLocal()
46
29
  maven {
47
30
  // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
48
31
  url(new File(['node', '--print', "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim(), '../android'))
@@ -53,13 +36,7 @@ allprojects {
53
36
  }
54
37
 
55
38
  google()
56
- mavenCentral {
57
- // We don't want to fetch react-native from Maven Central as there are
58
- // older versions over there.
59
- content {
60
- excludeGroup 'com.facebook.react'
61
- }
62
- }
39
+ mavenCentral()
63
40
  maven { url 'https://www.jitpack.io' }
64
41
  }
65
42
  }
package/android/gitignore CHANGED
@@ -11,11 +11,5 @@ local.properties
11
11
  *.iml
12
12
  *.hprof
13
13
 
14
- # BUCK
15
- buck-out/
16
- \.buckd/
17
- *.keystore
18
- !debug.keystore
19
-
20
14
  # Bundle artifacts
21
15
  *.jsbundle
@@ -42,7 +42,7 @@ newArchEnabled=false
42
42
 
43
43
  # The hosted JavaScript engine
44
44
  # Supported values: expo.jsEngine = "hermes" | "jsc"
45
- expo.jsEngine=jsc
45
+ expo.jsEngine=hermes
46
46
 
47
47
  # Enable GIF support in React Native images (~200 B increase)
48
48
  expo.gif.enabled=true
@@ -8,10 +8,3 @@ applyNativeModulesSettingsGradle(settings)
8
8
 
9
9
  include ':app'
10
10
  includeBuild(new File(["node", "--print", "require.resolve('react-native-gradle-plugin/package.json')"].execute(null, rootDir).text.trim()).getParentFile())
11
-
12
- if (settings.hasProperty("newArchEnabled") && settings.newArchEnabled == "true") {
13
- include(":ReactAndroid")
14
- project(":ReactAndroid").projectDir = new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim(), "../ReactAndroid");
15
- include(":ReactAndroid:hermes-engine")
16
- project(":ReactAndroid:hermes-engine").projectDir = new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim(), "../ReactAndroid/hermes-engine");
17
- }
package/gitignore CHANGED
@@ -31,6 +31,8 @@ local.properties
31
31
  *.iml
32
32
  *.hprof
33
33
  .cxx/
34
+ *.keystore
35
+ !debug.keystore
34
36
 
35
37
  # node.js
36
38
  #
@@ -38,18 +40,15 @@ node_modules/
38
40
  npm-debug.log
39
41
  yarn-error.log
40
42
 
41
- # BUCK
42
- buck-out/
43
- \.buckd/
44
- *.keystore
45
- !debug.keystore
46
-
47
43
  # Bundle artifacts
48
44
  *.jsbundle
49
45
 
50
46
  # CocoaPods
51
47
  /ios/Pods/
52
48
 
49
+ # Temporary files created by Metro to check the health of the file watcher
50
+ .metro-health-check*
51
+
53
52
  # Expo
54
53
  .expo/
55
54
  web-build/
@@ -1,9 +1,7 @@
1
- #import <Foundation/Foundation.h>
2
- #import <React/RCTBridgeDelegate.h>
1
+ #import <RCTAppDelegate.h>
3
2
  #import <UIKit/UIKit.h>
4
-
5
3
  #import <Expo/Expo.h>
6
4
 
7
- @interface AppDelegate : EXAppDelegateWrapper <RCTBridgeDelegate>
5
+ @interface AppDelegate : EXAppDelegateWrapper
8
6
 
9
7
  @end
@@ -1,100 +1,40 @@
1
1
  #import "AppDelegate.h"
2
2
 
3
- #import <React/RCTBridge.h>
4
3
  #import <React/RCTBundleURLProvider.h>
5
- #import <React/RCTRootView.h>
6
4
  #import <React/RCTLinkingManager.h>
7
- #import <React/RCTConvert.h>
8
-
9
- #import <React/RCTAppSetupUtils.h>
10
-
11
- #if RCT_NEW_ARCH_ENABLED
12
- #import <React/CoreModulesPlugins.h>
13
- #import <React/RCTCxxBridgeDelegate.h>
14
- #import <React/RCTFabricSurfaceHostingProxyRootView.h>
15
- #import <React/RCTSurfacePresenter.h>
16
- #import <React/RCTSurfacePresenterBridgeAdapter.h>
17
- #import <ReactCommon/RCTTurboModuleManager.h>
18
-
19
- #import <react/config/ReactNativeConfig.h>
20
-
21
- static NSString *const kRNConcurrentRoot = @"concurrentRoot";
22
-
23
- @interface AppDelegate () <RCTCxxBridgeDelegate, RCTTurboModuleManagerDelegate> {
24
- RCTTurboModuleManager *_turboModuleManager;
25
- RCTSurfacePresenterBridgeAdapter *_bridgeAdapter;
26
- std::shared_ptr<const facebook::react::ReactNativeConfig> _reactNativeConfig;
27
- facebook::react::ContextContainer::Shared _contextContainer;
28
- }
29
- @end
30
- #endif
31
5
 
32
6
  @implementation AppDelegate
33
7
 
34
8
  - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
35
9
  {
36
- RCTAppSetupPrepareApp(application);
37
-
38
- RCTBridge *bridge = [self.reactDelegate createBridgeWithDelegate:self launchOptions:launchOptions];
39
-
40
- #if RCT_NEW_ARCH_ENABLED
41
- _contextContainer = std::make_shared<facebook::react::ContextContainer const>();
42
- _reactNativeConfig = std::make_shared<facebook::react::EmptyReactNativeConfig const>();
43
- _contextContainer->insert("ReactNativeConfig", _reactNativeConfig);
44
- _bridgeAdapter = [[RCTSurfacePresenterBridgeAdapter alloc] initWithBridge:bridge contextContainer:_contextContainer];
45
- bridge.surfacePresenter = _bridgeAdapter.surfacePresenter;
46
- #endif
47
-
48
- NSDictionary *initProps = [self prepareInitialProps];
49
- UIView *rootView = [self.reactDelegate createRootViewWithBridge:bridge moduleName:@"main" initialProperties:initProps];
50
-
51
- rootView.backgroundColor = [UIColor whiteColor];
52
- self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
53
- UIViewController *rootViewController = [self.reactDelegate createRootViewController];
54
- rootViewController.view = rootView;
55
- self.window.rootViewController = rootViewController;
56
- [self.window makeKeyAndVisible];
10
+ self.moduleName = @"main";
57
11
 
58
- [super application:application didFinishLaunchingWithOptions:launchOptions];
12
+ // You can add your custom initial props in the dictionary below.
13
+ // They will be passed down to the ViewController used by React Native.
14
+ self.initialProps = @{};
59
15
 
60
- return YES;
16
+ return [super application:application didFinishLaunchingWithOptions:launchOptions];
61
17
  }
62
18
 
63
- - (NSArray<id<RCTBridgeModule>> *)extraModulesForBridge:(RCTBridge *)bridge
19
+ - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
64
20
  {
65
- // If you'd like to export some custom RCTBridgeModules, add them here!
66
- return @[];
21
+ #if DEBUG
22
+ return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
23
+ #else
24
+ return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
25
+ #endif
67
26
  }
68
27
 
69
28
  /// This method controls whether the `concurrentRoot`feature of React18 is turned on or off.
70
29
  ///
71
30
  /// @see: https://reactjs.org/blog/2022/03/29/react-v18.html
72
31
  /// @note: This requires to be rendering on Fabric (i.e. on the New Architecture).
73
- /// @return: `true` if the `concurrentRoot` feture is enabled. Otherwise, it returns `false`.
32
+ /// @return: `true` if the `concurrentRoot` feature is enabled. Otherwise, it returns `false`.
74
33
  - (BOOL)concurrentRootEnabled
75
34
  {
76
- // Switch this bool to turn on and off the concurrent root
77
35
  return true;
78
36
  }
79
37
 
80
- - (NSDictionary *)prepareInitialProps
81
- {
82
- NSMutableDictionary *initProps = [NSMutableDictionary new];
83
- #if RCT_NEW_ARCH_ENABLED
84
- initProps[kRNConcurrentRoot] = @([self concurrentRootEnabled]);
85
- #endif
86
- return initProps;
87
- }
88
-
89
- - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
90
- {
91
- #if DEBUG
92
- return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
93
- #else
94
- return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
95
- #endif
96
- }
97
-
98
38
  // Linking API
99
39
  - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
100
40
  return [super application:application openURL:url options:options] || [RCTLinkingManager application:application openURL:url options:options];
@@ -124,43 +64,4 @@ static NSString *const kRNConcurrentRoot = @"concurrentRoot";
124
64
  return [super application:application didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler];
125
65
  }
126
66
 
127
- #if RCT_NEW_ARCH_ENABLED
128
-
129
- #pragma mark - RCTCxxBridgeDelegate
130
-
131
- - (std::unique_ptr<facebook::react::JSExecutorFactory>)jsExecutorFactoryForBridge:(RCTBridge *)bridge
132
- {
133
- _turboModuleManager = [[RCTTurboModuleManager alloc] initWithBridge:bridge
134
- delegate:self
135
- jsInvoker:bridge.jsCallInvoker];
136
- return RCTAppSetupDefaultJsExecutorFactory(bridge, _turboModuleManager);
137
- }
138
-
139
- #pragma mark RCTTurboModuleManagerDelegate
140
-
141
- - (Class)getModuleClassFromName:(const char *)name
142
- {
143
- return RCTCoreModulesClassProvider(name);
144
- }
145
-
146
- - (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:(const std::string &)name
147
- jsInvoker:(std::shared_ptr<facebook::react::CallInvoker>)jsInvoker
148
- {
149
- return nullptr;
150
- }
151
-
152
- - (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:(const std::string &)name
153
- initParams:
154
- (const facebook::react::ObjCTurboModule::InitParams &)params
155
- {
156
- return nullptr;
157
- }
158
-
159
- - (id<RCTTurboModule>)getModuleInstanceFromClass:(Class)moduleClass
160
- {
161
- return RCTAppSetupDefaultModuleFromClass(moduleClass);
162
- }
163
-
164
- #endif
165
-
166
67
  @end
@@ -310,6 +310,7 @@
310
310
  INFOPLIST_FILE = HelloWorld/Info.plist;
311
311
  IPHONEOS_DEPLOYMENT_TARGET = 13.0;
312
312
  LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
313
+ MARKETING_VERSION = 1.0;
313
314
  OTHER_LDFLAGS = (
314
315
  "$(inherited)",
315
316
  "-ObjC",
@@ -333,6 +334,7 @@
333
334
  INFOPLIST_FILE = HelloWorld/Info.plist;
334
335
  IPHONEOS_DEPLOYMENT_TARGET = 13.0;
335
336
  LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
337
+ MARKETING_VERSION = 1.0;
336
338
  OTHER_LDFLAGS = (
337
339
  "$(inherited)",
338
340
  "-ObjC",
package/ios/Podfile CHANGED
@@ -5,34 +5,51 @@ require File.join(File.dirname(`node --print "require.resolve('@react-native-com
5
5
  require 'json'
6
6
  podfile_properties = JSON.parse(File.read(File.join(__dir__, 'Podfile.properties.json'))) rescue {}
7
7
 
8
+ ENV['RCT_NEW_ARCH_ENABLED'] = podfile_properties['newArchEnabled'] == 'true' ? '1' : '0'
9
+
8
10
  platform :ios, podfile_properties['ios.deploymentTarget'] || '13.0'
9
11
  install! 'cocoapods',
10
12
  :deterministic_uuids => false
11
13
 
14
+ prepare_react_native_project!
15
+
16
+ # If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
17
+ # because `react-native-flipper` depends on (FlipperKit,...) that will be excluded
18
+ #
19
+ # To fix this you can also exclude `react-native-flipper` using a `react-native.config.js`
20
+ # ```js
21
+ # module.exports = {
22
+ # dependencies: {
23
+ # ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
24
+ # ```
25
+ flipper_config = ENV['NO_FLIPPER'] == "1" || ENV['CI'] ? FlipperConfiguration.disabled : FlipperConfiguration.enabled
26
+
12
27
  target 'HelloWorld' do
13
28
  use_expo_modules!
14
29
  config = use_native_modules!
15
30
 
16
31
  use_frameworks! :linkage => podfile_properties['ios.useFrameworks'].to_sym if podfile_properties['ios.useFrameworks']
32
+ use_frameworks! :linkage => ENV['USE_FRAMEWORKS'].to_sym if ENV['USE_FRAMEWORKS']
17
33
 
18
34
  # Flags change depending on the env values.
19
35
  flags = get_default_flags()
20
36
 
21
37
  use_react_native!(
22
38
  :path => config[:reactNativePath],
23
- :hermes_enabled => podfile_properties['expo.jsEngine'] == 'hermes',
39
+ :hermes_enabled => podfile_properties['expo.jsEngine'] == nil || podfile_properties['expo.jsEngine'] == 'hermes',
24
40
  :fabric_enabled => flags[:fabric_enabled],
25
41
  # An absolute path to your application root.
26
42
  :app_path => "#{Pod::Config.instance.installation_root}/..",
27
43
  #
28
44
  # Uncomment to opt-in to using Flipper
29
45
  # Note that if you have use_frameworks! enabled, Flipper will not work
30
- # :flipper_configuration => !ENV['CI'] ? FlipperConfiguration.enabled : FlipperConfiguration.disabled,
46
+ # :flipper_configuration => flipper_config,
31
47
  )
32
48
 
33
49
  post_install do |installer|
34
50
  react_native_post_install(
35
51
  installer,
52
+ config[:reactNativePath],
36
53
  # Set `mac_catalyst_enabled` to `true` in order to apply patches
37
54
  # necessary for Mac Catalyst builds
38
55
  :mac_catalyst_enabled => false
@@ -1,3 +1,3 @@
1
1
  {
2
- "expo.jsEngine": "jsc"
2
+ "expo.jsEngine": "hermes"
3
3
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
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
- "version": "47.0.21",
4
+ "version": "48.0.0",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
7
  "start": "expo start --dev-client",
@@ -10,13 +10,13 @@
10
10
  "web": "expo start --web"
11
11
  },
12
12
  "dependencies": {
13
- "expo": "~47.0.9",
14
- "expo-splash-screen": "~0.17.5",
15
- "expo-status-bar": "~1.4.2",
16
- "react": "18.1.0",
17
- "react-native": "0.70.5"
13
+ "expo": "~48.0.0-beta.0",
14
+ "expo-splash-screen": "~0.18.0",
15
+ "expo-status-bar": "~1.4.3",
16
+ "react": "18.2.0",
17
+ "react-native": "0.71.2"
18
18
  },
19
19
  "devDependencies": {
20
- "@babel/core": "^7.12.9"
20
+ "@babel/core": "^7.20.0"
21
21
  }
22
22
  }
package/.buckconfig DELETED
@@ -1,6 +0,0 @@
1
-
2
- [android]
3
- target = Google Inc.:Google APIs:23
4
-
5
- [maven_repositories]
6
- central = https://repo1.maven.org/maven2
package/android/app/BUCK DELETED
@@ -1,55 +0,0 @@
1
- # To learn about Buck see [Docs](https://buckbuild.com/).
2
- # To run your application with Buck:
3
- # - install Buck
4
- # - `npm start` - to start the packager
5
- # - `cd android`
6
- # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
7
- # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
8
- # - `buck install -r android/app` - compile, install and run application
9
- #
10
-
11
- load(":build_defs.bzl", "create_aar_targets", "create_jar_targets")
12
-
13
- lib_deps = []
14
-
15
- create_aar_targets(glob(["libs/*.aar"]))
16
-
17
- create_jar_targets(glob(["libs/*.jar"]))
18
-
19
- android_library(
20
- name = "all-libs",
21
- exported_deps = lib_deps,
22
- )
23
-
24
- android_library(
25
- name = "app-code",
26
- srcs = glob([
27
- "src/main/java/**/*.java",
28
- ]),
29
- deps = [
30
- ":all-libs",
31
- ":build_config",
32
- ":res",
33
- ],
34
- )
35
-
36
- android_build_config(
37
- name = "build_config",
38
- package = "com.helloworld",
39
- )
40
-
41
- android_resource(
42
- name = "res",
43
- package = "com.helloworld",
44
- res = "src/main/res",
45
- )
46
-
47
- android_binary(
48
- name = "app",
49
- keystore = "//android/keystores:debug",
50
- manifest = "src/main/AndroidManifest.xml",
51
- package_type = "debug",
52
- deps = [
53
- ":app-code",
54
- ],
55
- )
@@ -1,19 +0,0 @@
1
- """Helper definitions to glob .aar and .jar targets"""
2
-
3
- def create_aar_targets(aarfiles):
4
- for aarfile in aarfiles:
5
- name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")]
6
- lib_deps.append(":" + name)
7
- android_prebuilt_aar(
8
- name = name,
9
- aar = aarfile,
10
- )
11
-
12
- def create_jar_targets(jarfiles):
13
- for jarfile in jarfiles:
14
- name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")]
15
- lib_deps.append(":" + name)
16
- prebuilt_jar(
17
- name = name,
18
- binary_jar = jarfile,
19
- )