expo-template-bare-minimum 44.0.9 → 45.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 (54) hide show
  1. package/android/.idea/modules/-1038281344/HelloWorld.react-native-safe-area-context.iml +94 -0
  2. package/android/.idea/modules/-1357046555/HelloWorld.react-native-reanimated.iml +26 -0
  3. package/android/.idea/modules/-150769534/HelloWorld.expo-manifests.iml +97 -0
  4. package/android/.idea/modules/-184925778/HelloWorld.expo-json-utils.iml +98 -0
  5. package/android/.idea/modules/-2122143186/HelloWorld.expo-application.iml +109 -0
  6. package/android/.idea/modules/-235831713/HelloWorld.expo-keep-awake.iml +74 -0
  7. package/android/.idea/modules/-305550864/HelloWorld.expo-splash-screen.iml +121 -0
  8. package/android/.idea/modules/-51310931/HelloWorld.expo-constants.iml +78 -0
  9. package/android/.idea/modules/-782810028/HelloWorld.expo-updates-interface.iml +89 -0
  10. package/android/.idea/modules/-953330280/HelloWorld.react-native-screens.iml +128 -0
  11. package/android/.idea/modules/1258575575/HelloWorld.react-native-gesture-handler.iml +95 -0
  12. package/android/.idea/modules/1285763372/HelloWorld.expo-structured-headers.iml +117 -0
  13. package/android/.idea/modules/130277035/HelloWorld.expo.iml +145 -0
  14. package/android/.idea/modules/1523306737/HelloWorld.expo-font.iml +74 -0
  15. package/android/.idea/modules/1642879102/HelloWorld.expo-file-system.iml +109 -0
  16. package/android/.idea/modules/1872392903/HelloWorld.expo-modules-core.iml +124 -0
  17. package/android/.idea/modules/536861352/HelloWorld.expo-updates.iml +156 -0
  18. package/android/.idea/modules/HelloWorld.iml +19 -0
  19. package/android/.idea/modules/app/HelloWorld.app.iml +163 -0
  20. package/android/.idea/workspace.xml +104 -0
  21. package/android/.project +17 -0
  22. package/android/.settings/org.eclipse.buildship.core.prefs +13 -0
  23. package/android/app/build.gradle +134 -10
  24. package/android/app/src/main/AndroidManifest.xml +2 -2
  25. package/android/app/src/main/java/com/helloworld/MainApplication.java +12 -3
  26. package/android/app/src/main/java/com/helloworld/newarchitecture/MainApplicationReactNativeHost.java +116 -0
  27. package/android/app/src/main/java/com/helloworld/newarchitecture/components/MainComponentsRegistry.java +36 -0
  28. package/android/app/src/main/java/com/helloworld/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java +48 -0
  29. package/android/app/src/main/jni/Android.mk +49 -0
  30. package/android/app/src/main/jni/MainApplicationModuleProvider.cpp +24 -0
  31. package/android/app/src/main/jni/MainApplicationModuleProvider.h +16 -0
  32. package/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp +45 -0
  33. package/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h +38 -0
  34. package/android/app/src/main/jni/MainComponentsRegistry.cpp +61 -0
  35. package/android/app/src/main/jni/MainComponentsRegistry.h +32 -0
  36. package/android/app/src/main/jni/OnLoad.cpp +11 -0
  37. package/android/app/src/main/res/drawable/rn_edit_text_material.xml +36 -0
  38. package/android/app/src/main/res/values/styles.xml +1 -0
  39. package/android/build.gradle +27 -8
  40. package/android/gitignore +21 -0
  41. package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  42. package/android/gradle/wrapper/gradle-wrapper.properties +1 -1
  43. package/android/gradle.properties +16 -4
  44. package/android/gradlew +154 -103
  45. package/android/gradlew.bat +89 -103
  46. package/android/settings.gradle +6 -0
  47. package/ios/HelloWorld/AppDelegate.mm +125 -0
  48. package/ios/HelloWorld.xcodeproj/project.pbxproj +8 -6
  49. package/ios/HelloWorld.xcodeproj/project.xcworkspace/xcuserdata/tomasz.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  50. package/ios/Podfile +15 -17
  51. package/ios/gitignore +29 -0
  52. package/package.json +7 -7
  53. package/ios/HelloWorld/AppDelegate.m +0 -76
  54. package/ios/HelloWorld.xcodeproj/project.xcworkspace/xcuserdata/brentvatne.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
package/android/gradlew CHANGED
@@ -1,7 +1,7 @@
1
- #!/usr/bin/env sh
1
+ #!/bin/sh
2
2
 
3
3
  #
4
- # Copyright 2015 the original author or authors.
4
+ # Copyright © 2015-2021 the original authors.
5
5
  #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License");
7
7
  # you may not use this file except in compliance with the License.
@@ -17,78 +17,113 @@
17
17
  #
18
18
 
19
19
  ##############################################################################
20
- ##
21
- ## Gradle start up script for UN*X
22
- ##
20
+ #
21
+ # Gradle start up script for POSIX generated by Gradle.
22
+ #
23
+ # Important for running:
24
+ #
25
+ # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
26
+ # noncompliant, but you have some other compliant shell such as ksh or
27
+ # bash, then to run this script, type that shell name before the whole
28
+ # command line, like:
29
+ #
30
+ # ksh Gradle
31
+ #
32
+ # Busybox and similar reduced shells will NOT work, because this script
33
+ # requires all of these POSIX shell features:
34
+ # * functions;
35
+ # * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
36
+ # «${var#prefix}», «${var%suffix}», and «$( cmd )»;
37
+ # * compound commands having a testable exit status, especially «case»;
38
+ # * various built-in commands including «command», «set», and «ulimit».
39
+ #
40
+ # Important for patching:
41
+ #
42
+ # (2) This script targets any POSIX shell, so it avoids extensions provided
43
+ # by Bash, Ksh, etc; in particular arrays are avoided.
44
+ #
45
+ # The "traditional" practice of packing multiple parameters into a
46
+ # space-separated string is a well documented source of bugs and security
47
+ # problems, so this is (mostly) avoided, by progressively accumulating
48
+ # options in "$@", and eventually passing that to Java.
49
+ #
50
+ # Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
51
+ # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
52
+ # see the in-line comments for details.
53
+ #
54
+ # There are tweaks for specific operating systems such as AIX, CygWin,
55
+ # Darwin, MinGW, and NonStop.
56
+ #
57
+ # (3) This script is generated from the Groovy template
58
+ # https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
59
+ # within the Gradle project.
60
+ #
61
+ # You can find Gradle at https://github.com/gradle/gradle/.
62
+ #
23
63
  ##############################################################################
24
64
 
25
65
  # Attempt to set APP_HOME
66
+
26
67
  # Resolve links: $0 may be a link
27
- PRG="$0"
28
- # Need this for relative symlinks.
29
- while [ -h "$PRG" ] ; do
30
- ls=`ls -ld "$PRG"`
31
- link=`expr "$ls" : '.*-> \(.*\)$'`
32
- if expr "$link" : '/.*' > /dev/null; then
33
- PRG="$link"
34
- else
35
- PRG=`dirname "$PRG"`"/$link"
36
- fi
68
+ app_path=$0
69
+
70
+ # Need this for daisy-chained symlinks.
71
+ while
72
+ APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
73
+ [ -h "$app_path" ]
74
+ do
75
+ ls=$( ls -ld "$app_path" )
76
+ link=${ls#*' -> '}
77
+ case $link in #(
78
+ /*) app_path=$link ;; #(
79
+ *) app_path=$APP_HOME$link ;;
80
+ esac
37
81
  done
38
- SAVED="`pwd`"
39
- cd "`dirname \"$PRG\"`/" >/dev/null
40
- APP_HOME="`pwd -P`"
41
- cd "$SAVED" >/dev/null
82
+
83
+ APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
42
84
 
43
85
  APP_NAME="Gradle"
44
- APP_BASE_NAME=`basename "$0"`
86
+ APP_BASE_NAME=${0##*/}
45
87
 
46
88
  # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
47
89
  DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
48
90
 
49
91
  # Use the maximum available, or set MAX_FD != -1 to use that value.
50
- MAX_FD="maximum"
92
+ MAX_FD=maximum
51
93
 
52
94
  warn () {
53
95
  echo "$*"
54
- }
96
+ } >&2
55
97
 
56
98
  die () {
57
99
  echo
58
100
  echo "$*"
59
101
  echo
60
102
  exit 1
61
- }
103
+ } >&2
62
104
 
63
105
  # OS specific support (must be 'true' or 'false').
64
106
  cygwin=false
65
107
  msys=false
66
108
  darwin=false
67
109
  nonstop=false
68
- case "`uname`" in
69
- CYGWIN* )
70
- cygwin=true
71
- ;;
72
- Darwin* )
73
- darwin=true
74
- ;;
75
- MINGW* )
76
- msys=true
77
- ;;
78
- NONSTOP* )
79
- nonstop=true
80
- ;;
110
+ case "$( uname )" in #(
111
+ CYGWIN* ) cygwin=true ;; #(
112
+ Darwin* ) darwin=true ;; #(
113
+ MSYS* | MINGW* ) msys=true ;; #(
114
+ NONSTOP* ) nonstop=true ;;
81
115
  esac
82
116
 
83
117
  CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
84
118
 
119
+
85
120
  # Determine the Java command to use to start the JVM.
86
121
  if [ -n "$JAVA_HOME" ] ; then
87
122
  if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
88
123
  # IBM's JDK on AIX uses strange locations for the executables
89
- JAVACMD="$JAVA_HOME/jre/sh/java"
124
+ JAVACMD=$JAVA_HOME/jre/sh/java
90
125
  else
91
- JAVACMD="$JAVA_HOME/bin/java"
126
+ JAVACMD=$JAVA_HOME/bin/java
92
127
  fi
93
128
  if [ ! -x "$JAVACMD" ] ; then
94
129
  die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
@@ -97,7 +132,7 @@ Please set the JAVA_HOME variable in your environment to match the
97
132
  location of your Java installation."
98
133
  fi
99
134
  else
100
- JAVACMD="java"
135
+ JAVACMD=java
101
136
  which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
102
137
 
103
138
  Please set the JAVA_HOME variable in your environment to match the
@@ -105,79 +140,95 @@ location of your Java installation."
105
140
  fi
106
141
 
107
142
  # Increase the maximum file descriptors if we can.
108
- if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
109
- MAX_FD_LIMIT=`ulimit -H -n`
110
- if [ $? -eq 0 ] ; then
111
- if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
112
- MAX_FD="$MAX_FD_LIMIT"
113
- fi
114
- ulimit -n $MAX_FD
115
- if [ $? -ne 0 ] ; then
116
- warn "Could not set maximum file descriptor limit: $MAX_FD"
117
- fi
118
- else
119
- warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
120
- fi
143
+ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144
+ case $MAX_FD in #(
145
+ max*)
146
+ MAX_FD=$( ulimit -H -n ) ||
147
+ warn "Could not query maximum file descriptor limit"
148
+ esac
149
+ case $MAX_FD in #(
150
+ '' | soft) :;; #(
151
+ *)
152
+ ulimit -n "$MAX_FD" ||
153
+ warn "Could not set maximum file descriptor limit to $MAX_FD"
154
+ esac
121
155
  fi
122
156
 
123
- # For Darwin, add options to specify how the application appears in the dock
124
- if $darwin; then
125
- GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
126
- fi
157
+ # Collect all arguments for the java command, stacking in reverse order:
158
+ # * args from the command line
159
+ # * the main class name
160
+ # * -classpath
161
+ # * -D...appname settings
162
+ # * --module-path (only if needed)
163
+ # * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
127
164
 
128
165
  # For Cygwin or MSYS, switch paths to Windows format before running java
129
- if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
130
- APP_HOME=`cygpath --path --mixed "$APP_HOME"`
131
- CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
132
- JAVACMD=`cygpath --unix "$JAVACMD"`
133
-
134
- # We build the pattern for arguments to be converted via cygpath
135
- ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
136
- SEP=""
137
- for dir in $ROOTDIRSRAW ; do
138
- ROOTDIRS="$ROOTDIRS$SEP$dir"
139
- SEP="|"
140
- done
141
- OURCYGPATTERN="(^($ROOTDIRS))"
142
- # Add a user-defined pattern to the cygpath arguments
143
- if [ "$GRADLE_CYGPATTERN" != "" ] ; then
144
- OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
145
- fi
166
+ if "$cygwin" || "$msys" ; then
167
+ APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
168
+ CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
169
+
170
+ JAVACMD=$( cygpath --unix "$JAVACMD" )
171
+
146
172
  # Now convert the arguments - kludge to limit ourselves to /bin/sh
147
- i=0
148
- for arg in "$@" ; do
149
- CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
150
- CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
151
-
152
- if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
153
- eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
154
- else
155
- eval `echo args$i`="\"$arg\""
173
+ for arg do
174
+ if
175
+ case $arg in #(
176
+ -*) false ;; # don't mess with options #(
177
+ /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
178
+ [ -e "$t" ] ;; #(
179
+ *) false ;;
180
+ esac
181
+ then
182
+ arg=$( cygpath --path --ignore --mixed "$arg" )
156
183
  fi
157
- i=`expr $i + 1`
184
+ # Roll the args list around exactly as many times as the number of
185
+ # args, so each arg winds up back in the position where it started, but
186
+ # possibly modified.
187
+ #
188
+ # NB: a `for` loop captures its iteration list before it begins, so
189
+ # changing the positional parameters here affects neither the number of
190
+ # iterations, nor the values presented in `arg`.
191
+ shift # remove old arg
192
+ set -- "$@" "$arg" # push replacement arg
158
193
  done
159
- case $i in
160
- 0) set -- ;;
161
- 1) set -- "$args0" ;;
162
- 2) set -- "$args0" "$args1" ;;
163
- 3) set -- "$args0" "$args1" "$args2" ;;
164
- 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
165
- 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
166
- 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
167
- 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
168
- 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
169
- 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
170
- esac
171
194
  fi
172
195
 
173
- # Escape application args
174
- save () {
175
- for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
176
- echo " "
177
- }
178
- APP_ARGS=`save "$@"`
196
+ # Collect all arguments for the java command;
197
+ # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
198
+ # shell script including quotes and variable substitutions, so put them in
199
+ # double quotes to make sure that they get re-expanded; and
200
+ # * put everything else in single quotes, so that it's not re-expanded.
201
+
202
+ set -- \
203
+ "-Dorg.gradle.appname=$APP_BASE_NAME" \
204
+ -classpath "$CLASSPATH" \
205
+ org.gradle.wrapper.GradleWrapperMain \
206
+ "$@"
207
+
208
+ # Use "xargs" to parse quoted args.
209
+ #
210
+ # With -n1 it outputs one arg per line, with the quotes and backslashes removed.
211
+ #
212
+ # In Bash we could simply go:
213
+ #
214
+ # readarray ARGS < <( xargs -n1 <<<"$var" ) &&
215
+ # set -- "${ARGS[@]}" "$@"
216
+ #
217
+ # but POSIX shell has neither arrays nor command substitution, so instead we
218
+ # post-process each arg (as a line of input to sed) to backslash-escape any
219
+ # character that might be a shell metacharacter, then use eval to reverse
220
+ # that process (while maintaining the separation between arguments), and wrap
221
+ # the whole thing up as a single "set" statement.
222
+ #
223
+ # This will of course break if any of these variables contains a newline or
224
+ # an unmatched quote.
225
+ #
179
226
 
180
- # Collect all arguments for the java command, following the shell quoting and substitution rules
181
- eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
227
+ eval "set -- $(
228
+ printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
229
+ xargs -n1 |
230
+ sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
231
+ tr '\n' ' '
232
+ )" '"$@"'
182
233
 
183
234
  exec "$JAVACMD" "$@"
@@ -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 init
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 init
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
- :init
68
- @rem Get command-line arguments, handling Windows variants
69
-
70
- if not "%OS%" == "Windows_NT" goto win9xME_args
71
-
72
- :win9xME_args
73
- @rem Slurp the command line arguments.
74
- set CMD_LINE_ARGS=
75
- set _SKIP=2
76
-
77
- :win9xME_args_slurp
78
- if "x%~1" == "x" goto execute
79
-
80
- set CMD_LINE_ARGS=%*
81
-
82
- :execute
83
- @rem Setup the command line
84
-
85
- set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
86
-
87
- @rem Execute Gradle
88
- "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
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
@@ -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,125 @@
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
+ #if RCT_NEW_ARCH_ENABLED
87
+
88
+ #pragma mark - RCTCxxBridgeDelegate
89
+
90
+ - (std::unique_ptr<facebook::react::JSExecutorFactory>)jsExecutorFactoryForBridge:(RCTBridge *)bridge
91
+ {
92
+ _turboModuleManager = [[RCTTurboModuleManager alloc] initWithBridge:bridge
93
+ delegate:self
94
+ jsInvoker:bridge.jsCallInvoker];
95
+ return RCTAppSetupDefaultJsExecutorFactory(bridge, _turboModuleManager);
96
+ }
97
+
98
+ #pragma mark RCTTurboModuleManagerDelegate
99
+
100
+ - (Class)getModuleClassFromName:(const char *)name
101
+ {
102
+ return RCTCoreModulesClassProvider(name);
103
+ }
104
+
105
+ - (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:(const std::string &)name
106
+ jsInvoker:(std::shared_ptr<facebook::react::CallInvoker>)jsInvoker
107
+ {
108
+ return nullptr;
109
+ }
110
+
111
+ - (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:(const std::string &)name
112
+ initParams:
113
+ (const facebook::react::ObjCTurboModule::InitParams &)params
114
+ {
115
+ return nullptr;
116
+ }
117
+
118
+ - (id<RCTTurboModule>)getModuleInstanceFromClass:(Class)moduleClass
119
+ {
120
+ return RCTAppSetupDefaultModuleFromClass(moduleClass);
121
+ }
122
+
123
+ #endif
124
+
125
+ @end