expo-template-bare-minimum 44.0.11 → 45.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 +135 -11
- package/android/app/proguard-rules.pro +4 -0
- package/android/app/src/main/AndroidManifest.xml +2 -2
- package/android/app/src/main/java/com/helloworld/MainApplication.java +12 -3
- package/android/app/src/main/java/com/helloworld/newarchitecture/MainApplicationReactNativeHost.java +116 -0
- package/android/app/src/main/java/com/helloworld/newarchitecture/components/MainComponentsRegistry.java +36 -0
- package/android/app/src/main/java/com/helloworld/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java +48 -0
- package/android/app/src/main/jni/Android.mk +49 -0
- package/android/app/src/main/jni/MainApplicationModuleProvider.cpp +24 -0
- package/android/app/src/main/jni/MainApplicationModuleProvider.h +16 -0
- package/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp +45 -0
- package/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h +38 -0
- package/android/app/src/main/jni/MainComponentsRegistry.cpp +61 -0
- package/android/app/src/main/jni/MainComponentsRegistry.h +32 -0
- package/android/app/src/main/jni/OnLoad.cpp +11 -0
- package/android/app/src/main/res/drawable/rn_edit_text_material.xml +36 -0
- package/android/app/src/main/res/values/styles.xml +1 -0
- package/android/build.gradle +30 -8
- package/android/gitignore +21 -0
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/android/gradle.properties +16 -4
- package/android/gradlew +154 -103
- package/android/gradlew.bat +89 -103
- package/android/settings.gradle +6 -0
- package/ios/HelloWorld/AppDelegate.mm +143 -0
- package/ios/HelloWorld.xcodeproj/project.pbxproj +8 -6
- package/ios/Podfile +16 -16
- package/ios/gitignore +29 -0
- package/package.json +8 -8
- package/ios/HelloWorld/AppDelegate.m +0 -75
- package/ios/HelloWorld.xcodeproj/project.xcworkspace/xcuserdata/brentvatne.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
package/android/gradlew.bat
CHANGED
|
@@ -1,103 +1,89 @@
|
|
|
1
|
-
@rem
|
|
2
|
-
@rem Copyright 2015 the original author or authors.
|
|
3
|
-
@rem
|
|
4
|
-
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
@rem you may not use this file except in compliance with the License.
|
|
6
|
-
@rem You may obtain a copy of the License at
|
|
7
|
-
@rem
|
|
8
|
-
@rem https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
@rem
|
|
10
|
-
@rem Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
@rem See the License for the specific language governing permissions and
|
|
14
|
-
@rem limitations under the License.
|
|
15
|
-
@rem
|
|
16
|
-
|
|
17
|
-
@if "%DEBUG%" == "" @echo off
|
|
18
|
-
@rem ##########################################################################
|
|
19
|
-
@rem
|
|
20
|
-
@rem Gradle startup script for Windows
|
|
21
|
-
@rem
|
|
22
|
-
@rem ##########################################################################
|
|
23
|
-
|
|
24
|
-
@rem Set local scope for the variables with windows NT shell
|
|
25
|
-
if "%OS%"=="Windows_NT" setlocal
|
|
26
|
-
|
|
27
|
-
set DIRNAME=%~dp0
|
|
28
|
-
if "%DIRNAME%" == "" set DIRNAME=.
|
|
29
|
-
set APP_BASE_NAME=%~n0
|
|
30
|
-
set APP_HOME=%DIRNAME%
|
|
31
|
-
|
|
32
|
-
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
|
33
|
-
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
|
34
|
-
|
|
35
|
-
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
|
36
|
-
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
|
37
|
-
|
|
38
|
-
@rem Find java.exe
|
|
39
|
-
if defined JAVA_HOME goto findJavaFromJavaHome
|
|
40
|
-
|
|
41
|
-
set JAVA_EXE=java.exe
|
|
42
|
-
%JAVA_EXE% -version >NUL 2>&1
|
|
43
|
-
if "%ERRORLEVEL%" == "0" goto
|
|
44
|
-
|
|
45
|
-
echo.
|
|
46
|
-
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
|
47
|
-
echo.
|
|
48
|
-
echo Please set the JAVA_HOME variable in your environment to match the
|
|
49
|
-
echo location of your Java installation.
|
|
50
|
-
|
|
51
|
-
goto fail
|
|
52
|
-
|
|
53
|
-
:findJavaFromJavaHome
|
|
54
|
-
set JAVA_HOME=%JAVA_HOME:"=%
|
|
55
|
-
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
|
56
|
-
|
|
57
|
-
if exist "%JAVA_EXE%" goto
|
|
58
|
-
|
|
59
|
-
echo.
|
|
60
|
-
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
|
61
|
-
echo.
|
|
62
|
-
echo Please set the JAVA_HOME variable in your environment to match the
|
|
63
|
-
echo location of your Java installation.
|
|
64
|
-
|
|
65
|
-
goto fail
|
|
66
|
-
|
|
67
|
-
:
|
|
68
|
-
@rem
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
@rem
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
if "
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
:end
|
|
91
|
-
@rem End local scope for the variables with windows NT shell
|
|
92
|
-
if "%ERRORLEVEL%"=="0" goto mainEnd
|
|
93
|
-
|
|
94
|
-
:fail
|
|
95
|
-
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
|
96
|
-
rem the _cmd.exe /c_ return code!
|
|
97
|
-
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
|
98
|
-
exit /b 1
|
|
99
|
-
|
|
100
|
-
:mainEnd
|
|
101
|
-
if "%OS%"=="Windows_NT" endlocal
|
|
102
|
-
|
|
103
|
-
:omega
|
|
1
|
+
@rem
|
|
2
|
+
@rem Copyright 2015 the original author or authors.
|
|
3
|
+
@rem
|
|
4
|
+
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
@rem you may not use this file except in compliance with the License.
|
|
6
|
+
@rem You may obtain a copy of the License at
|
|
7
|
+
@rem
|
|
8
|
+
@rem https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
@rem
|
|
10
|
+
@rem Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
@rem See the License for the specific language governing permissions and
|
|
14
|
+
@rem limitations under the License.
|
|
15
|
+
@rem
|
|
16
|
+
|
|
17
|
+
@if "%DEBUG%" == "" @echo off
|
|
18
|
+
@rem ##########################################################################
|
|
19
|
+
@rem
|
|
20
|
+
@rem Gradle startup script for Windows
|
|
21
|
+
@rem
|
|
22
|
+
@rem ##########################################################################
|
|
23
|
+
|
|
24
|
+
@rem Set local scope for the variables with windows NT shell
|
|
25
|
+
if "%OS%"=="Windows_NT" setlocal
|
|
26
|
+
|
|
27
|
+
set DIRNAME=%~dp0
|
|
28
|
+
if "%DIRNAME%" == "" set DIRNAME=.
|
|
29
|
+
set APP_BASE_NAME=%~n0
|
|
30
|
+
set APP_HOME=%DIRNAME%
|
|
31
|
+
|
|
32
|
+
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
|
33
|
+
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
|
34
|
+
|
|
35
|
+
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
|
36
|
+
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
|
37
|
+
|
|
38
|
+
@rem Find java.exe
|
|
39
|
+
if defined JAVA_HOME goto findJavaFromJavaHome
|
|
40
|
+
|
|
41
|
+
set JAVA_EXE=java.exe
|
|
42
|
+
%JAVA_EXE% -version >NUL 2>&1
|
|
43
|
+
if "%ERRORLEVEL%" == "0" goto execute
|
|
44
|
+
|
|
45
|
+
echo.
|
|
46
|
+
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
|
47
|
+
echo.
|
|
48
|
+
echo Please set the JAVA_HOME variable in your environment to match the
|
|
49
|
+
echo location of your Java installation.
|
|
50
|
+
|
|
51
|
+
goto fail
|
|
52
|
+
|
|
53
|
+
:findJavaFromJavaHome
|
|
54
|
+
set JAVA_HOME=%JAVA_HOME:"=%
|
|
55
|
+
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
|
56
|
+
|
|
57
|
+
if exist "%JAVA_EXE%" goto execute
|
|
58
|
+
|
|
59
|
+
echo.
|
|
60
|
+
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
|
61
|
+
echo.
|
|
62
|
+
echo Please set the JAVA_HOME variable in your environment to match the
|
|
63
|
+
echo location of your Java installation.
|
|
64
|
+
|
|
65
|
+
goto fail
|
|
66
|
+
|
|
67
|
+
:execute
|
|
68
|
+
@rem Setup the command line
|
|
69
|
+
|
|
70
|
+
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
@rem Execute Gradle
|
|
74
|
+
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
|
75
|
+
|
|
76
|
+
:end
|
|
77
|
+
@rem End local scope for the variables with windows NT shell
|
|
78
|
+
if "%ERRORLEVEL%"=="0" goto mainEnd
|
|
79
|
+
|
|
80
|
+
:fail
|
|
81
|
+
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
|
82
|
+
rem the _cmd.exe /c_ return code!
|
|
83
|
+
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
|
84
|
+
exit /b 1
|
|
85
|
+
|
|
86
|
+
:mainEnd
|
|
87
|
+
if "%OS%"=="Windows_NT" endlocal
|
|
88
|
+
|
|
89
|
+
:omega
|
package/android/settings.gradle
CHANGED
|
@@ -7,3 +7,9 @@ apply from: new File(["node", "--print", "require.resolve('@react-native-communi
|
|
|
7
7
|
applyNativeModulesSettingsGradle(settings)
|
|
8
8
|
|
|
9
9
|
include ':app'
|
|
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
|
+
}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
#import "AppDelegate.h"
|
|
2
|
+
|
|
3
|
+
#import <React/RCTBridge.h>
|
|
4
|
+
#import <React/RCTBundleURLProvider.h>
|
|
5
|
+
#import <React/RCTRootView.h>
|
|
6
|
+
#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
|
+
@interface AppDelegate () <RCTCxxBridgeDelegate, RCTTurboModuleManagerDelegate> {
|
|
22
|
+
RCTTurboModuleManager *_turboModuleManager;
|
|
23
|
+
RCTSurfacePresenterBridgeAdapter *_bridgeAdapter;
|
|
24
|
+
std::shared_ptr<const facebook::react::ReactNativeConfig> _reactNativeConfig;
|
|
25
|
+
facebook::react::ContextContainer::Shared _contextContainer;
|
|
26
|
+
}
|
|
27
|
+
@end
|
|
28
|
+
#endif
|
|
29
|
+
|
|
30
|
+
@implementation AppDelegate
|
|
31
|
+
|
|
32
|
+
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
|
33
|
+
{
|
|
34
|
+
RCTAppSetupPrepareApp(application);
|
|
35
|
+
|
|
36
|
+
RCTBridge *bridge = [self.reactDelegate createBridgeWithDelegate:self launchOptions:launchOptions];
|
|
37
|
+
|
|
38
|
+
#if RCT_NEW_ARCH_ENABLED
|
|
39
|
+
_contextContainer = std::make_shared<facebook::react::ContextContainer const>();
|
|
40
|
+
_reactNativeConfig = std::make_shared<facebook::react::EmptyReactNativeConfig const>();
|
|
41
|
+
_contextContainer->insert("ReactNativeConfig", _reactNativeConfig);
|
|
42
|
+
_bridgeAdapter = [[RCTSurfacePresenterBridgeAdapter alloc] initWithBridge:bridge contextContainer:_contextContainer];
|
|
43
|
+
bridge.surfacePresenter = _bridgeAdapter.surfacePresenter;
|
|
44
|
+
#endif
|
|
45
|
+
|
|
46
|
+
UIView *rootView = [self.reactDelegate createRootViewWithBridge:bridge moduleName:@"main" initialProperties:nil];
|
|
47
|
+
|
|
48
|
+
rootView.backgroundColor = [UIColor whiteColor];
|
|
49
|
+
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
|
|
50
|
+
UIViewController *rootViewController = [self.reactDelegate createRootViewController];
|
|
51
|
+
rootViewController.view = rootView;
|
|
52
|
+
self.window.rootViewController = rootViewController;
|
|
53
|
+
[self.window makeKeyAndVisible];
|
|
54
|
+
|
|
55
|
+
[super application:application didFinishLaunchingWithOptions:launchOptions];
|
|
56
|
+
|
|
57
|
+
return YES;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
- (NSArray<id<RCTBridgeModule>> *)extraModulesForBridge:(RCTBridge *)bridge
|
|
61
|
+
{
|
|
62
|
+
// If you'd like to export some custom RCTBridgeModules, add them here!
|
|
63
|
+
return @[];
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
|
|
67
|
+
{
|
|
68
|
+
#if DEBUG
|
|
69
|
+
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
|
|
70
|
+
#else
|
|
71
|
+
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
|
|
72
|
+
#endif
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// Linking API
|
|
76
|
+
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
|
|
77
|
+
return [super application:application openURL:url options:options] || [RCTLinkingManager application:application openURL:url options:options];
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// Universal Links
|
|
81
|
+
- (BOOL)application:(UIApplication *)application continueUserActivity:(nonnull NSUserActivity *)userActivity restorationHandler:(nonnull void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler {
|
|
82
|
+
BOOL result = [RCTLinkingManager application:application continueUserActivity:userActivity restorationHandler:restorationHandler];
|
|
83
|
+
return [super application:application continueUserActivity:userActivity restorationHandler:restorationHandler] || result;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// Explicitly define remote notification delegates to ensure compatibility with some third-party libraries
|
|
87
|
+
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
|
|
88
|
+
{
|
|
89
|
+
return [super application:application didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Explicitly define remote notification delegates to ensure compatibility with some third-party libraries
|
|
93
|
+
- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error
|
|
94
|
+
{
|
|
95
|
+
return [super application:application didFailToRegisterForRemoteNotificationsWithError:error];
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// Explicitly define remote notification delegates to ensure compatibility with some third-party libraries
|
|
99
|
+
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler
|
|
100
|
+
{
|
|
101
|
+
return [super application:application didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler];
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
#if RCT_NEW_ARCH_ENABLED
|
|
105
|
+
|
|
106
|
+
#pragma mark - RCTCxxBridgeDelegate
|
|
107
|
+
|
|
108
|
+
- (std::unique_ptr<facebook::react::JSExecutorFactory>)jsExecutorFactoryForBridge:(RCTBridge *)bridge
|
|
109
|
+
{
|
|
110
|
+
_turboModuleManager = [[RCTTurboModuleManager alloc] initWithBridge:bridge
|
|
111
|
+
delegate:self
|
|
112
|
+
jsInvoker:bridge.jsCallInvoker];
|
|
113
|
+
return RCTAppSetupDefaultJsExecutorFactory(bridge, _turboModuleManager);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
#pragma mark RCTTurboModuleManagerDelegate
|
|
117
|
+
|
|
118
|
+
- (Class)getModuleClassFromName:(const char *)name
|
|
119
|
+
{
|
|
120
|
+
return RCTCoreModulesClassProvider(name);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:(const std::string &)name
|
|
124
|
+
jsInvoker:(std::shared_ptr<facebook::react::CallInvoker>)jsInvoker
|
|
125
|
+
{
|
|
126
|
+
return nullptr;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:(const std::string &)name
|
|
130
|
+
initParams:
|
|
131
|
+
(const facebook::react::ObjCTurboModule::InitParams &)params
|
|
132
|
+
{
|
|
133
|
+
return nullptr;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
- (id<RCTTurboModule>)getModuleInstanceFromClass:(Class)moduleClass
|
|
137
|
+
{
|
|
138
|
+
return RCTAppSetupDefaultModuleFromClass(moduleClass);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
#endif
|
|
142
|
+
|
|
143
|
+
@end
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
objects = {
|
|
8
8
|
|
|
9
9
|
/* Begin PBXBuildFile section */
|
|
10
|
-
13B07FBC1A68108700A75B9A /* AppDelegate.
|
|
10
|
+
13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; };
|
|
11
11
|
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
|
|
12
12
|
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
|
|
13
13
|
3E461D99554A48A4959DE609 /* SplashScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */; };
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = "<group>"; };
|
|
21
21
|
13B07F961A680F5B00A75B9A /* HelloWorld.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HelloWorld.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
22
22
|
13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = HelloWorld/AppDelegate.h; sourceTree = "<group>"; };
|
|
23
|
-
13B07FB01A68108700A75B9A /* AppDelegate.
|
|
23
|
+
13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = HelloWorld/AppDelegate.mm; sourceTree = "<group>"; };
|
|
24
24
|
13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = HelloWorld/Images.xcassets; sourceTree = "<group>"; };
|
|
25
25
|
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = HelloWorld/Info.plist; sourceTree = "<group>"; };
|
|
26
26
|
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = HelloWorld/main.m; sourceTree = "<group>"; };
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
BB2F792B24A3F905000567C9 /* Supporting */,
|
|
52
52
|
008F07F21AC5B25A0029DE68 /* main.jsbundle */,
|
|
53
53
|
13B07FAF1A68108700A75B9A /* AppDelegate.h */,
|
|
54
|
-
13B07FB01A68108700A75B9A /* AppDelegate.
|
|
54
|
+
13B07FB01A68108700A75B9A /* AppDelegate.mm */,
|
|
55
55
|
13B07FB51A68108700A75B9A /* Images.xcassets */,
|
|
56
56
|
13B07FB61A68108700A75B9A /* Info.plist */,
|
|
57
57
|
13B07FB71A68108700A75B9A /* main.m */,
|
|
@@ -246,11 +246,13 @@
|
|
|
246
246
|
inputPaths = (
|
|
247
247
|
"${PODS_ROOT}/Target Support Files/Pods-HelloWorld/Pods-HelloWorld-resources.sh",
|
|
248
248
|
"${PODS_CONFIGURATION_BUILD_DIR}/EXConstants/EXConstants.bundle",
|
|
249
|
+
"${PODS_CONFIGURATION_BUILD_DIR}/EXUpdates/EXUpdates.bundle",
|
|
249
250
|
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle",
|
|
250
251
|
);
|
|
251
252
|
name = "[CP] Copy Pods Resources";
|
|
252
253
|
outputPaths = (
|
|
253
254
|
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EXConstants.bundle",
|
|
255
|
+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EXUpdates.bundle",
|
|
254
256
|
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle",
|
|
255
257
|
);
|
|
256
258
|
runOnlyForDeploymentPostprocessing = 0;
|
|
@@ -284,7 +286,7 @@
|
|
|
284
286
|
isa = PBXSourcesBuildPhase;
|
|
285
287
|
buildActionMask = 2147483647;
|
|
286
288
|
files = (
|
|
287
|
-
13B07FBC1A68108700A75B9A /* AppDelegate.
|
|
289
|
+
13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */,
|
|
288
290
|
13B07FC11A68108700A75B9A /* main.m in Sources */,
|
|
289
291
|
B18059E884C0ABDD17F3DC3D /* ExpoModulesProvider.swift in Sources */,
|
|
290
292
|
);
|
|
@@ -348,7 +350,7 @@
|
|
|
348
350
|
buildSettings = {
|
|
349
351
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
|
350
352
|
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
|
351
|
-
CLANG_CXX_LANGUAGE_STANDARD = "
|
|
353
|
+
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
|
|
352
354
|
CLANG_CXX_LIBRARY = "libc++";
|
|
353
355
|
CLANG_ENABLE_MODULES = YES;
|
|
354
356
|
CLANG_ENABLE_OBJC_ARC = YES;
|
|
@@ -404,7 +406,7 @@
|
|
|
404
406
|
buildSettings = {
|
|
405
407
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
|
406
408
|
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
|
407
|
-
CLANG_CXX_LANGUAGE_STANDARD = "
|
|
409
|
+
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
|
|
408
410
|
CLANG_CXX_LIBRARY = "libc++";
|
|
409
411
|
CLANG_ENABLE_MODULES = YES;
|
|
410
412
|
CLANG_ENABLE_OBJC_ARC = YES;
|
package/ios/Podfile
CHANGED
|
@@ -2,40 +2,40 @@ require File.join(File.dirname(`node --print "require.resolve('expo/package.json
|
|
|
2
2
|
require File.join(File.dirname(`node --print "require.resolve('react-native/package.json')"`), "scripts/react_native_pods")
|
|
3
3
|
require File.join(File.dirname(`node --print "require.resolve('@react-native-community/cli-platform-ios/package.json')"`), "native_modules")
|
|
4
4
|
|
|
5
|
-
platform :ios, '12.0'
|
|
6
|
-
|
|
7
5
|
require 'json'
|
|
8
6
|
podfile_properties = JSON.parse(File.read('./Podfile.properties.json')) rescue {}
|
|
9
7
|
|
|
8
|
+
platform :ios, podfile_properties['ios.deploymentTarget'] || '12.0'
|
|
9
|
+
install! 'cocoapods',
|
|
10
|
+
:deterministic_uuids => false
|
|
11
|
+
|
|
10
12
|
target 'HelloWorld' do
|
|
11
13
|
use_expo_modules!
|
|
12
14
|
config = use_native_modules!
|
|
13
15
|
|
|
16
|
+
use_frameworks! :linkage => podfile_properties['ios.useFrameworks'].to_sym if podfile_properties['ios.useFrameworks']
|
|
17
|
+
|
|
18
|
+
# Flags change depending on the env values.
|
|
19
|
+
flags = get_default_flags()
|
|
20
|
+
|
|
14
21
|
use_react_native!(
|
|
15
22
|
:path => config[:reactNativePath],
|
|
16
|
-
:hermes_enabled => podfile_properties['expo.jsEngine'] == 'hermes'
|
|
23
|
+
:hermes_enabled => flags[:hermes_enabled] || podfile_properties['expo.jsEngine'] == 'hermes',
|
|
24
|
+
:fabric_enabled => flags[:fabric_enabled],
|
|
25
|
+
# An absolute path to your application root.
|
|
26
|
+
:app_path => "#{Dir.pwd}/.."
|
|
17
27
|
)
|
|
18
28
|
|
|
19
29
|
# Uncomment to opt-in to using Flipper
|
|
30
|
+
# Note that if you have use_frameworks! enabled, Flipper will not work
|
|
20
31
|
#
|
|
21
32
|
# if !ENV['CI']
|
|
22
|
-
# use_flipper!(
|
|
33
|
+
# use_flipper!()
|
|
23
34
|
# end
|
|
24
35
|
|
|
25
36
|
post_install do |installer|
|
|
26
37
|
react_native_post_install(installer)
|
|
27
|
-
|
|
28
|
-
# Workaround `Cycle inside FBReactNativeSpec` error for react-native 0.64
|
|
29
|
-
# Reference: https://github.com/software-mansion/react-native-screens/issues/842#issuecomment-812543933
|
|
30
|
-
installer.pods_project.targets.each do |target|
|
|
31
|
-
if (target.name&.eql?('FBReactNativeSpec'))
|
|
32
|
-
target.build_phases.each do |build_phase|
|
|
33
|
-
if (build_phase.respond_to?(:name) && build_phase.name.eql?('[CP-User] Generate Specs'))
|
|
34
|
-
target.build_phases.move(build_phase, 0)
|
|
35
|
-
end
|
|
36
|
-
end
|
|
37
|
-
end
|
|
38
|
-
end
|
|
38
|
+
__apply_Xcode_12_5_M1_post_install_workaround(installer)
|
|
39
39
|
end
|
|
40
40
|
|
|
41
41
|
post_integrate do |installer|
|
package/ios/gitignore
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# OSX
|
|
2
|
+
#
|
|
3
|
+
.DS_Store
|
|
4
|
+
|
|
5
|
+
# Xcode
|
|
6
|
+
#
|
|
7
|
+
build/
|
|
8
|
+
*.pbxuser
|
|
9
|
+
!default.pbxuser
|
|
10
|
+
*.mode1v3
|
|
11
|
+
!default.mode1v3
|
|
12
|
+
*.mode2v3
|
|
13
|
+
!default.mode2v3
|
|
14
|
+
*.perspectivev3
|
|
15
|
+
!default.perspectivev3
|
|
16
|
+
xcuserdata
|
|
17
|
+
*.xccheckout
|
|
18
|
+
*.moved-aside
|
|
19
|
+
DerivedData
|
|
20
|
+
*.hmap
|
|
21
|
+
*.ipa
|
|
22
|
+
*.xcuserstate
|
|
23
|
+
project.xcworkspace
|
|
24
|
+
|
|
25
|
+
# Bundle artifacts
|
|
26
|
+
*.jsbundle
|
|
27
|
+
|
|
28
|
+
# CocoaPods
|
|
29
|
+
/Pods/
|
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": "45.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.
|
|
16
|
-
"react": "17.0.
|
|
17
|
-
"react-dom": "17.0.
|
|
18
|
-
"react-native": "0.
|
|
19
|
-
"react-native-web": "0.17.
|
|
13
|
+
"expo": "~45.0.0",
|
|
14
|
+
"expo-splash-screen": "~0.15.1",
|
|
15
|
+
"expo-status-bar": "~1.3.0",
|
|
16
|
+
"react": "17.0.2",
|
|
17
|
+
"react-dom": "17.0.2",
|
|
18
|
+
"react-native": "0.68.1",
|
|
19
|
+
"react-native-web": "0.17.7"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@babel/core": "^7.12.9"
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
#import "AppDelegate.h"
|
|
2
|
-
|
|
3
|
-
#import <React/RCTBridge.h>
|
|
4
|
-
#import <React/RCTBundleURLProvider.h>
|
|
5
|
-
#import <React/RCTRootView.h>
|
|
6
|
-
#import <React/RCTLinkingManager.h>
|
|
7
|
-
#import <React/RCTConvert.h>
|
|
8
|
-
|
|
9
|
-
#if defined(FB_SONARKIT_ENABLED) && __has_include(<FlipperKit/FlipperClient.h>)
|
|
10
|
-
#import <FlipperKit/FlipperClient.h>
|
|
11
|
-
#import <FlipperKitLayoutPlugin/FlipperKitLayoutPlugin.h>
|
|
12
|
-
#import <FlipperKitUserDefaultsPlugin/FKUserDefaultsPlugin.h>
|
|
13
|
-
#import <FlipperKitNetworkPlugin/FlipperKitNetworkPlugin.h>
|
|
14
|
-
#import <SKIOSNetworkPlugin/SKIOSNetworkAdapter.h>
|
|
15
|
-
#import <FlipperKitReactPlugin/FlipperKitReactPlugin.h>
|
|
16
|
-
|
|
17
|
-
static void InitializeFlipper(UIApplication *application) {
|
|
18
|
-
FlipperClient *client = [FlipperClient sharedClient];
|
|
19
|
-
SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults];
|
|
20
|
-
[client addPlugin:[[FlipperKitLayoutPlugin alloc] initWithRootNode:application withDescriptorMapper:layoutDescriptorMapper]];
|
|
21
|
-
[client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]];
|
|
22
|
-
[client addPlugin:[FlipperKitReactPlugin new]];
|
|
23
|
-
[client addPlugin:[[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]];
|
|
24
|
-
[client start];
|
|
25
|
-
}
|
|
26
|
-
#endif
|
|
27
|
-
|
|
28
|
-
@implementation AppDelegate
|
|
29
|
-
|
|
30
|
-
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
|
31
|
-
{
|
|
32
|
-
#if defined(FB_SONARKIT_ENABLED) && __has_include(<FlipperKit/FlipperClient.h>)
|
|
33
|
-
InitializeFlipper(application);
|
|
34
|
-
#endif
|
|
35
|
-
|
|
36
|
-
RCTBridge *bridge = [self.reactDelegate createBridgeWithDelegate:self launchOptions:launchOptions];
|
|
37
|
-
RCTRootView *rootView = [self.reactDelegate createRootViewWithBridge:bridge moduleName:@"main" initialProperties:nil];
|
|
38
|
-
rootView.backgroundColor = [UIColor whiteColor];
|
|
39
|
-
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
|
|
40
|
-
UIViewController *rootViewController = [self.reactDelegate createRootViewController];
|
|
41
|
-
rootViewController.view = rootView;
|
|
42
|
-
self.window.rootViewController = rootViewController;
|
|
43
|
-
[self.window makeKeyAndVisible];
|
|
44
|
-
|
|
45
|
-
[super application:application didFinishLaunchingWithOptions:launchOptions];
|
|
46
|
-
|
|
47
|
-
return YES;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
- (NSArray<id<RCTBridgeModule>> *)extraModulesForBridge:(RCTBridge *)bridge
|
|
51
|
-
{
|
|
52
|
-
// If you'd like to export some custom RCTBridgeModules, add them here!
|
|
53
|
-
return @[];
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge {
|
|
57
|
-
#ifdef DEBUG
|
|
58
|
-
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
|
|
59
|
-
#else
|
|
60
|
-
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
|
|
61
|
-
#endif
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
// Linking API
|
|
65
|
-
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
|
|
66
|
-
return [super application:application openURL:url options:options] || [RCTLinkingManager application:application openURL:url options:options];
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
// Universal Links
|
|
70
|
-
- (BOOL)application:(UIApplication *)application continueUserActivity:(nonnull NSUserActivity *)userActivity restorationHandler:(nonnull void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler {
|
|
71
|
-
BOOL result = [RCTLinkingManager application:application continueUserActivity:userActivity restorationHandler:restorationHandler];
|
|
72
|
-
return [super application:application continueUserActivity:userActivity restorationHandler:restorationHandler] || result;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
@end
|