expo-template-bare-minimum 47.0.22 → 48.0.2
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.
- package/android/app/build.gradle +91 -217
- package/android/app/src/debug/java/com/helloworld/ReactNativeFlipper.java +11 -5
- package/android/app/src/main/AndroidManifest.xml +1 -1
- package/android/app/src/main/java/com/helloworld/MainActivity.java +13 -28
- package/android/app/src/main/java/com/helloworld/MainApplication.java +37 -67
- package/android/app/src/release/java/com/helloworld/ReactNativeFlipper.java +20 -0
- package/android/build.gradle +7 -30
- package/android/gitignore +0 -6
- package/android/gradle.properties +1 -1
- package/android/settings.gradle +0 -7
- package/app.json +1 -2
- package/gitignore +5 -6
- package/ios/HelloWorld/AppDelegate.h +2 -4
- package/ios/HelloWorld/AppDelegate.mm +12 -111
- package/ios/HelloWorld.xcodeproj/project.pbxproj +2 -0
- package/ios/Podfile +32 -5
- package/ios/Podfile.properties.json +1 -1
- package/package.json +7 -7
- package/.buckconfig +0 -6
- package/android/app/BUCK +0 -55
- package/android/app/build_defs.bzl +0 -19
- package/android/app/src/main/java/com/helloworld/newarchitecture/MainApplicationReactNativeHost.java +0 -117
- package/android/app/src/main/java/com/helloworld/newarchitecture/components/MainComponentsRegistry.java +0 -36
- package/android/app/src/main/java/com/helloworld/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java +0 -48
- package/android/app/src/main/jni/CMakeLists.txt +0 -7
- package/android/app/src/main/jni/MainApplicationModuleProvider.cpp +0 -32
- package/android/app/src/main/jni/MainApplicationModuleProvider.h +0 -16
- package/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp +0 -45
- package/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h +0 -38
- package/android/app/src/main/jni/MainComponentsRegistry.cpp +0 -65
- package/android/app/src/main/jni/MainComponentsRegistry.h +0 -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.
|
|
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
|
-
|
|
33
|
-
|
|
34
|
-
@
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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
|
-
|
|
42
|
-
|
|
43
|
-
|
|
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
|
-
|
|
48
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
+
}
|
package/android/build.gradle
CHANGED
|
@@ -2,47 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
buildscript {
|
|
4
4
|
ext {
|
|
5
|
-
buildToolsVersion = findProperty('android.buildToolsVersion') ?: '
|
|
5
|
+
buildToolsVersion = findProperty('android.buildToolsVersion') ?: '33.0.0'
|
|
6
6
|
minSdkVersion = Integer.parseInt(findProperty('android.minSdkVersion') ?: '21')
|
|
7
|
-
compileSdkVersion = Integer.parseInt(findProperty('android.compileSdkVersion') ?: '
|
|
8
|
-
targetSdkVersion = Integer.parseInt(findProperty('android.targetSdkVersion') ?: '
|
|
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
|
-
|
|
15
|
-
|
|
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.
|
|
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
package/android/settings.gradle
CHANGED
|
@@ -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/app.json
CHANGED
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 <
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
16
|
+
return [super application:application didFinishLaunchingWithOptions:launchOptions];
|
|
61
17
|
}
|
|
62
18
|
|
|
63
|
-
- (
|
|
19
|
+
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
|
|
64
20
|
{
|
|
65
|
-
|
|
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`
|
|
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,61 @@ 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 = FlipperConfiguration.disabled
|
|
26
|
+
if ENV['NO_FLIPPER'] == "1" || ENV['CI'] then
|
|
27
|
+
# Explicitly disabled via ENV settings
|
|
28
|
+
flipper_config = FlipperConfiguration.disabled
|
|
29
|
+
elsif defined?(podfile_properties['ios.flipper']) then
|
|
30
|
+
# Flipper support in expo via build properties plugin
|
|
31
|
+
# Configured via podfile properties
|
|
32
|
+
if podfile_properties['ios.flipper'] == 'true' then
|
|
33
|
+
flipper_config = FlipperConfiguration.enabled(["Debug", "Release"])
|
|
34
|
+
elsif podfile_properties['ios.flipper'] != 'false' then
|
|
35
|
+
flipper_config = FlipperConfiguration.enabled(["Debug", "Release"], { 'Flipper' => podfile_properties['ios.flipper'] })
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
|
|
12
39
|
target 'HelloWorld' do
|
|
13
40
|
use_expo_modules!
|
|
14
41
|
config = use_native_modules!
|
|
15
42
|
|
|
16
43
|
use_frameworks! :linkage => podfile_properties['ios.useFrameworks'].to_sym if podfile_properties['ios.useFrameworks']
|
|
44
|
+
use_frameworks! :linkage => ENV['USE_FRAMEWORKS'].to_sym if ENV['USE_FRAMEWORKS']
|
|
17
45
|
|
|
18
46
|
# Flags change depending on the env values.
|
|
19
47
|
flags = get_default_flags()
|
|
20
48
|
|
|
21
49
|
use_react_native!(
|
|
22
50
|
:path => config[:reactNativePath],
|
|
23
|
-
:hermes_enabled => podfile_properties['expo.jsEngine'] == 'hermes',
|
|
51
|
+
:hermes_enabled => podfile_properties['expo.jsEngine'] == nil || podfile_properties['expo.jsEngine'] == 'hermes',
|
|
24
52
|
:fabric_enabled => flags[:fabric_enabled],
|
|
25
53
|
# An absolute path to your application root.
|
|
26
54
|
:app_path => "#{Pod::Config.instance.installation_root}/..",
|
|
27
|
-
#
|
|
28
|
-
|
|
29
|
-
# Note that if you have use_frameworks! enabled, Flipper will not work
|
|
30
|
-
# :flipper_configuration => !ENV['CI'] ? FlipperConfiguration.enabled : FlipperConfiguration.disabled,
|
|
55
|
+
# Note that if you have use_frameworks! enabled, Flipper will not work if enabled
|
|
56
|
+
:flipper_configuration => flipper_config
|
|
31
57
|
)
|
|
32
58
|
|
|
33
59
|
post_install do |installer|
|
|
34
60
|
react_native_post_install(
|
|
35
61
|
installer,
|
|
62
|
+
config[:reactNativePath],
|
|
36
63
|
# Set `mac_catalyst_enabled` to `true` in order to apply patches
|
|
37
64
|
# necessary for Mac Catalyst builds
|
|
38
65
|
:mac_catalyst_enabled => false
|
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": "
|
|
4
|
+
"version": "48.0.2",
|
|
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": "~
|
|
14
|
-
"expo-splash-screen": "~0.
|
|
15
|
-
"expo-status-bar": "~1.4.
|
|
16
|
-
"react": "18.
|
|
17
|
-
"react-native": "0.
|
|
13
|
+
"expo": "~48.0.0-beta.2",
|
|
14
|
+
"expo-splash-screen": "~0.18.1",
|
|
15
|
+
"expo-status-bar": "~1.4.4",
|
|
16
|
+
"react": "18.2.0",
|
|
17
|
+
"react-native": "0.71.2"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@babel/core": "^7.
|
|
20
|
+
"@babel/core": "^7.20.0"
|
|
21
21
|
}
|
|
22
22
|
}
|
package/.buckconfig
DELETED
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
|
-
)
|