From 5192b09eec2b4de60e6b597e3ae4c0b1e4ded737 Mon Sep 17 00:00:00 2001 From: Emily Xiong Date: Wed, 18 May 2022 16:09:21 -0400 Subject: [PATCH] feat(react-native): upgrade react-native to 0.68.2 (#10380) --- packages/react-native/migrations.json | 4 + packages/react-native/package.json | 2 +- .../app/android/app/build.gradle.template | 6 +- .../src/debug/AndroidManifest.xml.template | 2 +- .../ReactNativeFlipper.java.template | 2 +- .../app/src/main/AndroidManifest.xml.template | 2 +- .../MainActivity.java.template | 2 +- .../res/drawable/rn_edit_text_material.xml | 9 +- .../src/main/res/drawable/splashscreen.xml | 7 - .../main/res/drawable/splashscreen_image.png | Bin 9306 -> 0 bytes .../app/src/main/res/values/colors.xml | 5 - .../app/src/main/res/values/styles.xml | 18 +- .../files/app/android/build.gradle.template | 6 +- .../files/app/android/gradle.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../application/files/app/android/gradlew.bat | 323 +++++------------- .../files/app/android/gradlew.template | 2 +- .../app/android/settings.gradle.template | 2 +- .../files/app/ios/Podfile.template | 5 + .../project.pbxproj.template | 175 ++++++++++ .../contents.xcworkspacedata | 7 - .../xcshareddata/IDEWorkspaceChecks.plist | 8 - .../xcshareddata/IDEWorkspaceChecks.plist | 8 - .../Base.lproj/LaunchScreen.xib.template | 42 --- .../ios/__className__/Supporting/Expo.plist | 10 - .../files/app/ios/__className__/main.m | 2 +- .../app/ios/__className__Tests/Info.plist | 24 ++ .../__className__Tests/__className__Tests.m | 66 ++++ packages/react-native/src/utils/versions.ts | 2 +- 29 files changed, 392 insertions(+), 353 deletions(-) delete mode 100644 packages/react-native/src/generators/application/files/app/android/app/src/main/res/drawable/splashscreen.xml delete mode 100644 packages/react-native/src/generators/application/files/app/android/app/src/main/res/drawable/splashscreen_image.png delete mode 100644 packages/react-native/src/generators/application/files/app/android/app/src/main/res/values/colors.xml delete mode 100644 packages/react-native/src/generators/application/files/app/ios/__className__.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100644 packages/react-native/src/generators/application/files/app/ios/__className__.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 packages/react-native/src/generators/application/files/app/ios/__className__.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 packages/react-native/src/generators/application/files/app/ios/__className__/Base.lproj/LaunchScreen.xib.template delete mode 100644 packages/react-native/src/generators/application/files/app/ios/__className__/Supporting/Expo.plist create mode 100644 packages/react-native/src/generators/application/files/app/ios/__className__Tests/Info.plist create mode 100644 packages/react-native/src/generators/application/files/app/ios/__className__Tests/__className__Tests.m diff --git a/packages/react-native/migrations.json b/packages/react-native/migrations.json index 94251b0dc271b..bf33435cdce64 100644 --- a/packages/react-native/migrations.json +++ b/packages/react-native/migrations.json @@ -566,6 +566,10 @@ "14.1.8": { "version": "14.1.8-beta.0", "packages": { + "react-native": { + "version": "0.68.2", + "alwaysAddToPackageJson": false + }, "metro": { "version": "0.70.3", "alwaysAddToPackageJson": false diff --git a/packages/react-native/package.json b/packages/react-native/package.json index 9d5c092239265..0922dcd9aebd3 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -40,7 +40,7 @@ "tsconfig-paths": "^3.9.0" }, "peerDependencies": { - "react-native": "^0.68.1" + "react-native": "^0.68.2" }, "builders": "./executors.json", "ng-update": { diff --git a/packages/react-native/src/generators/application/files/app/android/app/build.gradle.template b/packages/react-native/src/generators/application/files/app/android/app/build.gradle.template index fcb9f792487a9..d603781238cfa 100644 --- a/packages/react-native/src/generators/application/files/app/android/app/build.gradle.template +++ b/packages/react-native/src/generators/application/files/app/android/app/build.gradle.template @@ -165,11 +165,9 @@ android { // Make sure this target name is the same you specify inside the // src/main/jni/Android.mk file for the `LOCAL_MODULE` variable. targets "<%= lowerCaseName %>_appmodules" - // Fix for windows limit on number of character in file paths and in command lines if (Os.isFamily(Os.FAMILY_WINDOWS)) { - arguments "NDK_OUT=${rootProject.projectDir.getParent()}\\.cxx", - "NDK_APP_SHORT_COMMANDS=true" + arguments "NDK_APP_SHORT_COMMANDS=true" } } } @@ -335,4 +333,4 @@ def isNewArchitectureEnabled() { // - Invoke gradle with `-newArchEnabled=true` // - Set an environment variable `ORG_GRADLE_PROJECT_newArchEnabled=true` return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true" -} \ No newline at end of file +} diff --git a/packages/react-native/src/generators/application/files/app/android/app/src/debug/AndroidManifest.xml.template b/packages/react-native/src/generators/application/files/app/android/app/src/debug/AndroidManifest.xml.template index b23dccd3410ee..447dd46e6b9ba 100644 --- a/packages/react-native/src/generators/application/files/app/android/app/src/debug/AndroidManifest.xml.template +++ b/packages/react-native/src/generators/application/files/app/android/app/src/debug/AndroidManifest.xml.template @@ -11,4 +11,4 @@ android:networkSecurityConfig="@xml/network_security_config"> - \ No newline at end of file + diff --git a/packages/react-native/src/generators/application/files/app/android/app/src/debug/java/com/__lowerCaseName__/ReactNativeFlipper.java.template b/packages/react-native/src/generators/application/files/app/android/app/src/debug/java/com/__lowerCaseName__/ReactNativeFlipper.java.template index 29b49b50bd415..943a5ba7b78ed 100644 --- a/packages/react-native/src/generators/application/files/app/android/app/src/debug/java/com/__lowerCaseName__/ReactNativeFlipper.java.template +++ b/packages/react-native/src/generators/application/files/app/android/app/src/debug/java/com/__lowerCaseName__/ReactNativeFlipper.java.template @@ -70,4 +70,4 @@ public class ReactNativeFlipper { } } } -} \ No newline at end of file +} diff --git a/packages/react-native/src/generators/application/files/app/android/app/src/main/AndroidManifest.xml.template b/packages/react-native/src/generators/application/files/app/android/app/src/main/AndroidManifest.xml.template index 7191fd0c4d5ee..f3801bcafd9fc 100644 --- a/packages/react-native/src/generators/application/files/app/android/app/src/main/AndroidManifest.xml.template +++ b/packages/react-native/src/generators/application/files/app/android/app/src/main/AndroidManifest.xml.template @@ -24,4 +24,4 @@ - \ No newline at end of file + diff --git a/packages/react-native/src/generators/application/files/app/android/app/src/main/java/com/__lowerCaseName__/MainActivity.java.template b/packages/react-native/src/generators/application/files/app/android/app/src/main/java/com/__lowerCaseName__/MainActivity.java.template index baa1a5734a081..8da02fae92865 100644 --- a/packages/react-native/src/generators/application/files/app/android/app/src/main/java/com/__lowerCaseName__/MainActivity.java.template +++ b/packages/react-native/src/generators/application/files/app/android/app/src/main/java/com/__lowerCaseName__/MainActivity.java.template @@ -37,4 +37,4 @@ public class MainActivity extends ReactActivity { return reactRootView; } } -} \ No newline at end of file +} diff --git a/packages/react-native/src/generators/application/files/app/android/app/src/main/res/drawable/rn_edit_text_material.xml b/packages/react-native/src/generators/application/files/app/android/app/src/main/res/drawable/rn_edit_text_material.xml index bb6f578c3f3b3..f35d9962026a8 100644 --- a/packages/react-native/src/generators/application/files/app/android/app/src/main/res/drawable/rn_edit_text_material.xml +++ b/packages/react-native/src/generators/application/files/app/android/app/src/main/res/drawable/rn_edit_text_material.xml @@ -1,9 +1,12 @@ - \ No newline at end of file + + diff --git a/packages/react-native/src/generators/application/files/app/android/app/src/main/res/drawable/splashscreen.xml b/packages/react-native/src/generators/application/files/app/android/app/src/main/res/drawable/splashscreen.xml deleted file mode 100644 index 9f19c56e5410d..0000000000000 --- a/packages/react-native/src/generators/application/files/app/android/app/src/main/res/drawable/splashscreen.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/packages/react-native/src/generators/application/files/app/android/app/src/main/res/drawable/splashscreen_image.png b/packages/react-native/src/generators/application/files/app/android/app/src/main/res/drawable/splashscreen_image.png deleted file mode 100644 index cc94f379de325e1292ad7843f958a74fb7547d76..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9306 zcmdsdi9b}||GzAiy^s=>QiO&QQ}#94#=gXmx2+8BAp728DYA-9R1^UT!vHaEv<4kjihZhbu+b0#KM z_}|US!r%lJ35GBptoJohnoLYJ$(*}RYz+F4pZRSqrm9|%c?Q8}YGirqwvUmRm{@mr zHy0Pz!NEaTSeRlTN7g@6e{*9Cru`j-PpY1|jHX zw6ljY$|oW2+b7eRPlDriYNQw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#NX>L@pkL)SZQoR2WGKGoZ&Bo{#d69Q2t8l@k+Si1Lt%FIckOG zy1*Vqh~lr;jcC1m=gX^W4RLCxN2I)9r7Ha!+wTAQRRGFPxXA&87rZY|Sj9EmLeY3x zlv>Lekh+y)wOdBRC}e>`-G9q>wN;#}^tpeqhIb~TJK%dUSJ_QQeL1tBSy3;GKTTcX zBM3V<(CU&GzejP1L>sFitzqSO%crT0o1-8-26*7hNS-KTCw{1NOQi?4wmG}=k}xRH z57~?q=aPRAs6*k`Jo@qP0kT!gp>#9qP^l-sjRTmgEguNytnc^5{a!8gHpzO2cvTF9 z!0OHFw0gfkdm?rDZZrOW_e3g>Q=!lh!QClZ&=dJuMCy-)N#2<9VNz9nZY!jY=c$g0 zklJ6&O2AJZ>^6VZzmCQMj(huo;AHZ?Y4bj0zkojwj%p$-S1KK>Zx2r<9Bj`QSw)iD j5B=Xfx59{uZI9)r1XoR$V)vVWG3wtk)~V9^@A3ZwM7s($ diff --git a/packages/react-native/src/generators/application/files/app/android/app/src/main/res/values/colors.xml b/packages/react-native/src/generators/application/files/app/android/app/src/main/res/values/colors.xml deleted file mode 100644 index 7e2bd59b12479..0000000000000 --- a/packages/react-native/src/generators/application/files/app/android/app/src/main/res/values/colors.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - #FFFFFF - diff --git a/packages/react-native/src/generators/application/files/app/android/app/src/main/res/values/styles.xml b/packages/react-native/src/generators/application/files/app/android/app/src/main/res/values/styles.xml index b8c0408c7acd8..7ba83a2ad5a2c 100644 --- a/packages/react-native/src/generators/application/files/app/android/app/src/main/res/values/styles.xml +++ b/packages/react-native/src/generators/application/files/app/android/app/src/main/res/values/styles.xml @@ -1,13 +1,9 @@ - - - - \ No newline at end of file + + + + diff --git a/packages/react-native/src/generators/application/files/app/android/build.gradle.template b/packages/react-native/src/generators/application/files/app/android/build.gradle.template index 969be0cbf0eae..66f622fccdc85 100644 --- a/packages/react-native/src/generators/application/files/app/android/build.gradle.template +++ b/packages/react-native/src/generators/application/files/app/android/build.gradle.template @@ -12,10 +12,6 @@ buildscript { if (System.properties['os.arch'] == "aarch64") { // For M1 Users we need to use the NDK 24 which added support for aarch64 ndkVersion = "24.0.8215888" - } else if (Os.isFamily(Os.FAMILY_WINDOWS)) { - // For Android Users, we need to use NDK 23, otherwise the build will - // fail due to paths longer than the OS limit - ndkVersion = "23.1.7779620" } else { // Otherwise we default to the side-by-side NDK version from AGP. ndkVersion = "21.4.7075529" @@ -61,4 +57,4 @@ allprojects { } <% } %> } -} \ No newline at end of file +} diff --git a/packages/react-native/src/generators/application/files/app/android/gradle.properties b/packages/react-native/src/generators/application/files/app/android/gradle.properties index 9fbae44b0b579..fa4feae5f1902 100644 --- a/packages/react-native/src/generators/application/files/app/android/gradle.properties +++ b/packages/react-native/src/generators/application/files/app/android/gradle.properties @@ -37,4 +37,4 @@ reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64 # your application. You should enable this flag either if you want # to write custom TurboModules/Fabric components OR use libraries that # are providing them. -newArchEnabled=false \ No newline at end of file +newArchEnabled=false diff --git a/packages/react-native/src/generators/application/files/app/android/gradle/wrapper/gradle-wrapper.properties b/packages/react-native/src/generators/application/files/app/android/gradle/wrapper/gradle-wrapper.properties index 639632b502bec..669386b870a69 100644 --- a/packages/react-native/src/generators/application/files/app/android/gradle/wrapper/gradle-wrapper.properties +++ b/packages/react-native/src/generators/application/files/app/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists \ No newline at end of file +zipStorePath=wrapper/dists diff --git a/packages/react-native/src/generators/application/files/app/android/gradlew.bat b/packages/react-native/src/generators/application/files/app/android/gradlew.bat index a58591e97bc13..107acd32c4e68 100644 --- a/packages/react-native/src/generators/application/files/app/android/gradlew.bat +++ b/packages/react-native/src/generators/application/files/app/android/gradlew.bat @@ -1,234 +1,89 @@ -#!/bin/sh - -# -# Copyright © 2015-2021 the original authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -############################################################################## -# -# Gradle start up script for POSIX generated by Gradle. -# -# Important for running: -# -# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is -# noncompliant, but you have some other compliant shell such as ksh or -# bash, then to run this script, type that shell name before the whole -# command line, like: -# -# ksh Gradle -# -# Busybox and similar reduced shells will NOT work, because this script -# requires all of these POSIX shell features: -# * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». -# -# Important for patching: -# -# (2) This script targets any POSIX shell, so it avoids extensions provided -# by Bash, Ksh, etc; in particular arrays are avoided. -# -# The "traditional" practice of packing multiple parameters into a -# space-separated string is a well documented source of bugs and security -# problems, so this is (mostly) avoided, by progressively accumulating -# options in "$@", and eventually passing that to Java. -# -# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, -# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; -# see the in-line comments for details. -# -# There are tweaks for specific operating systems such as AIX, CygWin, -# Darwin, MinGW, and NonStop. -# -# (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt -# within the Gradle project. -# -# You can find Gradle at https://github.com/gradle/gradle/. -# -############################################################################## - -# Attempt to set APP_HOME - -# Resolve links: $0 may be a link -app_path=$0 - -# Need this for daisy-chained symlinks. -while - APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path - [ -h "$app_path" ] -do - ls=$( ls -ld "$app_path" ) - link=${ls#*' -> '} - case $link in #( - /*) app_path=$link ;; #( - *) app_path=$APP_HOME$link ;; - esac -done - -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -APP_NAME="Gradle" -APP_BASE_NAME=${0##*/} - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD=maximum - -warn () { - echo "$*" -} >&2 - -die () { - echo - echo "$*" - echo - exit 1 -} >&2 - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "$( uname )" in #( - CYGWIN* ) cygwin=true ;; #( - Darwin* ) darwin=true ;; #( - MSYS* | MINGW* ) msys=true ;; #( - NONSTOP* ) nonstop=true ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD=$JAVA_HOME/jre/sh/java - else - JAVACMD=$JAVA_HOME/bin/java - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then - case $MAX_FD in #( - max*) - MAX_FD=$( ulimit -H -n ) || - warn "Could not query maximum file descriptor limit" - esac - case $MAX_FD in #( - '' | soft) :;; #( - *) - ulimit -n "$MAX_FD" || - warn "Could not set maximum file descriptor limit to $MAX_FD" - esac -fi - -# Collect all arguments for the java command, stacking in reverse order: -# * args from the command line -# * the main class name -# * -classpath -# * -D...appname settings -# * --module-path (only if needed) -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. - -# For Cygwin or MSYS, switch paths to Windows format before running java -if "$cygwin" || "$msys" ; then - APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) - - JAVACMD=$( cygpath --unix "$JAVACMD" ) - - # Now convert the arguments - kludge to limit ourselves to /bin/sh - for arg do - if - case $arg in #( - -*) false ;; # don't mess with options #( - /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath - [ -e "$t" ] ;; #( - *) false ;; - esac - then - arg=$( cygpath --path --ignore --mixed "$arg" ) - fi - # Roll the args list around exactly as many times as the number of - # args, so each arg winds up back in the position where it started, but - # possibly modified. - # - # NB: a `for` loop captures its iteration list before it begins, so - # changing the positional parameters here affects neither the number of - # iterations, nor the values presented in `arg`. - shift # remove old arg - set -- "$@" "$arg" # push replacement arg - done -fi - -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. - -set -- \ - "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ - "$@" - -# Use "xargs" to parse quoted args. -# -# With -n1 it outputs one arg per line, with the quotes and backslashes removed. -# -# In Bash we could simply go: -# -# readarray ARGS < <( xargs -n1 <<<"$var" ) && -# set -- "${ARGS[@]}" "$@" -# -# but POSIX shell has neither arrays nor command substitution, so instead we -# post-process each arg (as a line of input to sed) to backslash-escape any -# character that might be a shell metacharacter, then use eval to reverse -# that process (while maintaining the separation between arguments), and wrap -# the whole thing up as a single "set" statement. -# -# This will of course break if any of these variables contains a newline or -# an unmatched quote. -# - -eval "set -- $( - printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | - xargs -n1 | - sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | - tr '\n' ' ' - )" '"$@"' - -exec "$JAVACMD" "$@" \ No newline at end of file +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/packages/react-native/src/generators/application/files/app/android/gradlew.template b/packages/react-native/src/generators/application/files/app/android/gradlew.template index a58591e97bc13..1b6c787337ffb 100755 --- a/packages/react-native/src/generators/application/files/app/android/gradlew.template +++ b/packages/react-native/src/generators/application/files/app/android/gradlew.template @@ -231,4 +231,4 @@ eval "set -- $( tr '\n' ' ' )" '"$@"' -exec "$JAVACMD" "$@" \ No newline at end of file +exec "$JAVACMD" "$@" diff --git a/packages/react-native/src/generators/application/files/app/android/settings.gradle.template b/packages/react-native/src/generators/application/files/app/android/settings.gradle.template index 7e54479357f00..a507035c15027 100644 --- a/packages/react-native/src/generators/application/files/app/android/settings.gradle.template +++ b/packages/react-native/src/generators/application/files/app/android/settings.gradle.template @@ -12,4 +12,4 @@ includeBuild('../node_modules/react-native-gradle-plugin') if (settings.hasProperty("newArchEnabled") && settings.newArchEnabled == "true") { include(":ReactAndroid") project(":ReactAndroid").projectDir = file('../node_modules/react-native/ReactAndroid') -} \ No newline at end of file +} diff --git a/packages/react-native/src/generators/application/files/app/ios/Podfile.template b/packages/react-native/src/generators/application/files/app/ios/Podfile.template index add0bb601fe29..10ef39d98ec83 100644 --- a/packages/react-native/src/generators/application/files/app/ios/Podfile.template +++ b/packages/react-native/src/generators/application/files/app/ios/Podfile.template @@ -20,6 +20,11 @@ target '<%= className %>' do :app_path => "#{Pod::Config.instance.installation_root}/.." ) + target '<%= className %>Tests' do + inherit! :complete + # Pods for testing + end + # Enables Flipper. # # Note that if you have use_frameworks! enabled, Flipper will not work and diff --git a/packages/react-native/src/generators/application/files/app/ios/__className__.xcodeproj/project.pbxproj.template b/packages/react-native/src/generators/application/files/app/ios/__className__.xcodeproj/project.pbxproj.template index b4dc353ef9e73..5afd94e9409a2 100644 --- a/packages/react-native/src/generators/application/files/app/ios/__className__.xcodeproj/project.pbxproj.template +++ b/packages/react-native/src/generators/application/files/app/ios/__className__.xcodeproj/project.pbxproj.template @@ -7,10 +7,12 @@ objects = { /* Begin PBXBuildFile section */ + 00E356F31AD99517003FC87E /* <%= className %>Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* <%= className %>Tests.m */; }; 0C80B921A6F3F58F76C31292 /* libPods-<%= className %>.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DCACB8F33CDC322A6C60F78 /* libPods-<%= className %>.a */; }; 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; }; 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; + 7699B88040F8A987B510C191 /* libPods-<%= className %>-<%= className %>Tests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 19F6CBCC0A4E27FBF8BF4A61 /* libPods-<%= className %>-<%= className %>Tests.a */; }; 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; }; /* End PBXBuildFile section */ @@ -25,21 +27,34 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 00E356EE1AD99517003FC87E /* <%= className %>Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = <%= className %>Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 00E356F21AD99517003FC87E /* <%= className %>Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = <%= className %>Tests.m; sourceTree = ""; }; 13B07F961A680F5B00A75B9A /* <%= className %>.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = <%= className %>.app; sourceTree = BUILT_PRODUCTS_DIR; }; 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = <%= className %>/AppDelegate.h; sourceTree = ""; }; 13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = <%= className %>/AppDelegate.mm; sourceTree = ""; }; 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = <%= className %>/Images.xcassets; sourceTree = ""; }; 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = <%= className %>/Info.plist; sourceTree = ""; }; 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = <%= className %>/main.m; sourceTree = ""; }; + 19F6CBCC0A4E27FBF8BF4A61 /* libPods-<%= className %>-<%= className %>Tests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-<%= className %>-<%= className %>Tests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 3B4392A12AC88292D35C810B /* Pods-<%= className %>.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-<%= className %>.debug.xcconfig"; path = "Target Support Files/Pods-<%= className %>/Pods-<%= className %>.debug.xcconfig"; sourceTree = ""; }; 5709B34CF0A7D63546082F79 /* Pods-<%= className %>.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-<%= className %>.release.xcconfig"; path = "Target Support Files/Pods-<%= className %>/Pods-<%= className %>.release.xcconfig"; sourceTree = ""; }; + 5B7EB9410499542E8C5724F5 /* Pods-<%= className %>-<%= className %>Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-<%= className %>-<%= className %>Tests.debug.xcconfig"; path = "Target Support Files/Pods-<%= className %>-<%= className %>Tests/Pods-<%= className %>-<%= className %>Tests.debug.xcconfig"; sourceTree = ""; }; 5DCACB8F33CDC322A6C60F78 /* libPods-<%= className %>.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-<%= className %>.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = <%= className %>/LaunchScreen.storyboard; sourceTree = ""; }; + 89C6BE57DB24E9ADA2F236DE /* Pods-<%= className %>-<%= className %>Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-<%= className %>-<%= className %>Tests.release.xcconfig"; path = "Target Support Files/Pods-<%= className %>-<%= className %>Tests/Pods-<%= className %>-<%= className %>Tests.release.xcconfig"; sourceTree = ""; }; ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ + 00E356EB1AD99517003FC87E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 7699B88040F8A987B510C191 /* libPods-<%= className %>-<%= className %>Tests.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -51,6 +66,15 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 00E356EF1AD99517003FC87E /* <%= className %>Tests */ = { + isa = PBXGroup; + children = ( + 00E356F21AD99517003FC87E /* <%= className %>Tests.m */, + 00E356F01AD99517003FC87E /* Supporting Files */, + ); + path = <%= className %>Tests; + sourceTree = ""; + }; 00E356F01AD99517003FC87E /* Supporting Files */ = { isa = PBXGroup; children = ( @@ -77,6 +101,7 @@ children = ( ED297162215061F000B7C4FE /* JavaScriptCore.framework */, 5DCACB8F33CDC322A6C60F78 /* libPods-<%= className %>.a */, + 19F6CBCC0A4E27FBF8BF4A61 /* libPods-<%= className %>-<%= className %>Tests.a */, ); name = Frameworks; sourceTree = ""; @@ -93,6 +118,7 @@ children = ( 13B07FAE1A68108700A75B9A /* <%= className %> */, 832341AE1AAA6A7D00B99B32 /* Libraries */, + 00E356EF1AD99517003FC87E /* <%= className %>Tests */, 83CBBA001A601CBA00E9B192 /* Products */, 2D16E6871FA4F8E400B85C8A /* Frameworks */, BBD78D7AC51CEA395F1C20DB /* Pods */, @@ -106,6 +132,7 @@ isa = PBXGroup; children = ( 13B07F961A680F5B00A75B9A /* <%= className %>.app */, + 00E356EE1AD99517003FC87E /* <%= className %>Tests.xctest */, ); name = Products; sourceTree = ""; @@ -115,6 +142,8 @@ children = ( 3B4392A12AC88292D35C810B /* Pods-<%= className %>.debug.xcconfig */, 5709B34CF0A7D63546082F79 /* Pods-<%= className %>.release.xcconfig */, + 5B7EB9410499542E8C5724F5 /* Pods-<%= className %>-<%= className %>Tests.debug.xcconfig */, + 89C6BE57DB24E9ADA2F236DE /* Pods-<%= className %>-<%= className %>Tests.release.xcconfig */, ); path = Pods; sourceTree = ""; @@ -122,6 +151,27 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ + 00E356ED1AD99517003FC87E /* <%= className %>Tests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "<%= className %>Tests" */; + buildPhases = ( + A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */, + 00E356EA1AD99517003FC87E /* Sources */, + 00E356EB1AD99517003FC87E /* Frameworks */, + 00E356EC1AD99517003FC87E /* Resources */, + C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */, + F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */, + ); + buildRules = ( + ); + dependencies = ( + 00E356F51AD99517003FC87E /* PBXTargetDependency */, + ); + name = <%= className %>Tests; + productName = <%= className %>Tests; + productReference = 00E356EE1AD99517003FC87E /* <%= className %>Tests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; 13B07F861A680F5B00A75B9A /* <%= className %> */ = { isa = PBXNativeTarget; buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "<%= className %>" */; @@ -175,6 +225,7 @@ projectRoot = ""; targets = ( 13B07F861A680F5B00A75B9A /* <%= className %> */, + 00E356ED1AD99517003FC87E /* <%= className %>Tests */, ); }; /* End PBXProject section */ @@ -230,6 +281,28 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-<%= className %>/Pods-<%= className %>-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; + A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-<%= className %>-<%= className %>Tests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -252,6 +325,23 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; + C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-<%= className %>-<%= className %>Tests/Pods-<%= className %>-<%= className %>Tests-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-<%= className %>-<%= className %>Tests/Pods-<%= className %>-<%= className %>Tests-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-<%= className %>-<%= className %>Tests/Pods-<%= className %>-<%= className %>Tests-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; E235C05ADACE081382539298 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -269,6 +359,23 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-<%= className %>/Pods-<%= className %>-resources.sh\"\n"; showEnvVarsInLog = 0; }; + F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-<%= className %>-<%= className %>Tests/Pods-<%= className %>-<%= className %>Tests-resources-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Copy Pods Resources"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-<%= className %>-<%= className %>Tests/Pods-<%= className %>-<%= className %>Tests-resources-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-<%= className %>-<%= className %>Tests/Pods-<%= className %>-<%= className %>Tests-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; FD10A7F022414F080027D42C /* Start Packager */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -291,6 +398,14 @@ /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ + 00E356EA1AD99517003FC87E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 00E356F31AD99517003FC87E /* <%= className %>Tests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 13B07F871A680F5B00A75B9A /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -311,6 +426,57 @@ /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ + 00E356F61AD99517003FC87E /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 5B7EB9410499542E8C5724F5 /* Pods-<%= className %>-<%= className %>Tests.debug.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + INFOPLIST_FILE = <%= className %>Tests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + OTHER_LDFLAGS = ( + "-ObjC", + "-lc++", + "$(inherited)", + ); + PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/<%= className %>.app/<%= className %>"; + }; + name = Debug; + }; + 00E356F71AD99517003FC87E /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 89C6BE57DB24E9ADA2F236DE /* Pods-<%= className %>-<%= className %>Tests.release.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + COPY_PHASE_STRIP = NO; + INFOPLIST_FILE = <%= className %>Tests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + OTHER_LDFLAGS = ( + "-ObjC", + "-lc++", + "$(inherited)", + ); + PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/<%= className %>.app/<%= className %>"; + }; + name = Release; + }; 13B07F941A680F5B00A75B9A /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = 3B4392A12AC88292D35C810B /* Pods-<%= className %>.debug.xcconfig */; @@ -499,6 +665,15 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ + 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "<%= className %>Tests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 00E356F61AD99517003FC87E /* Debug */, + 00E356F71AD99517003FC87E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "<%= className %>" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/packages/react-native/src/generators/application/files/app/ios/__className__.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/react-native/src/generators/application/files/app/ios/__className__.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a6254f0..0000000000000 --- a/packages/react-native/src/generators/application/files/app/ios/__className__.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/packages/react-native/src/generators/application/files/app/ios/__className__.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/react-native/src/generators/application/files/app/ios/__className__.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003d68d..0000000000000 --- a/packages/react-native/src/generators/application/files/app/ios/__className__.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/packages/react-native/src/generators/application/files/app/ios/__className__.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/react-native/src/generators/application/files/app/ios/__className__.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003d68d..0000000000000 --- a/packages/react-native/src/generators/application/files/app/ios/__className__.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/packages/react-native/src/generators/application/files/app/ios/__className__/Base.lproj/LaunchScreen.xib.template b/packages/react-native/src/generators/application/files/app/ios/__className__/Base.lproj/LaunchScreen.xib.template deleted file mode 100644 index 0880e22d26ced..0000000000000 --- a/packages/react-native/src/generators/application/files/app/ios/__className__/Base.lproj/LaunchScreen.xib.template +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/react-native/src/generators/application/files/app/ios/__className__/Supporting/Expo.plist b/packages/react-native/src/generators/application/files/app/ios/__className__/Supporting/Expo.plist deleted file mode 100644 index 03410dc8b39a8..0000000000000 --- a/packages/react-native/src/generators/application/files/app/ios/__className__/Supporting/Expo.plist +++ /dev/null @@ -1,10 +0,0 @@ - - - - - EXUpdatesSDKVersion - YOUR-APP-SDK-VERSION-HERE - EXUpdatesURL - YOUR-APP-URL-HERE - - diff --git a/packages/react-native/src/generators/application/files/app/ios/__className__/main.m b/packages/react-native/src/generators/application/files/app/ios/__className__/main.m index a9549d36bc300..d645c7246c42e 100644 --- a/packages/react-native/src/generators/application/files/app/ios/__className__/main.m +++ b/packages/react-native/src/generators/application/files/app/ios/__className__/main.m @@ -7,4 +7,4 @@ int main(int argc, char *argv[]) @autoreleasepool { return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); } -} \ No newline at end of file +} diff --git a/packages/react-native/src/generators/application/files/app/ios/__className__Tests/Info.plist b/packages/react-native/src/generators/application/files/app/ios/__className__Tests/Info.plist new file mode 100644 index 0000000000000..ba72822e8728e --- /dev/null +++ b/packages/react-native/src/generators/application/files/app/ios/__className__Tests/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/packages/react-native/src/generators/application/files/app/ios/__className__Tests/__className__Tests.m b/packages/react-native/src/generators/application/files/app/ios/__className__Tests/__className__Tests.m new file mode 100644 index 0000000000000..03fbd0e5d7732 --- /dev/null +++ b/packages/react-native/src/generators/application/files/app/ios/__className__Tests/__className__Tests.m @@ -0,0 +1,66 @@ +#import +#import + +#import +#import + +#define TIMEOUT_SECONDS 600 +#define TEXT_TO_LOOK_FOR @"Welcome to React" + +@interface <%= className %>Tests : XCTestCase + +@end + +@implementation <%= className %>Tests + +- (BOOL)findSubviewInView:(UIView *)view matching:(BOOL (^)(UIView *view))test +{ + if (test(view)) { + return YES; + } + for (UIView *subview in [view subviews]) { + if ([self findSubviewInView:subview matching:test]) { + return YES; + } + } + return NO; +} + +- (void)testRendersWelcomeScreen +{ + UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController]; + NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; + BOOL foundElement = NO; + + __block NSString *redboxError = nil; +#ifdef DEBUG + RCTSetLogFunction( + ^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { + if (level >= RCTLogLevelError) { + redboxError = message; + } + }); +#endif + + while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { + [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; + [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; + + foundElement = [self findSubviewInView:vc.view + matching:^BOOL(UIView *view) { + if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { + return YES; + } + return NO; + }]; + } + +#ifdef DEBUG + RCTSetLogFunction(RCTDefaultLogFunction); +#endif + + XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); + XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); +} + +@end diff --git a/packages/react-native/src/utils/versions.ts b/packages/react-native/src/utils/versions.ts index 00e32655e7140..2b1212d749b80 100644 --- a/packages/react-native/src/utils/versions.ts +++ b/packages/react-native/src/utils/versions.ts @@ -1,6 +1,6 @@ export const nxVersion = '*'; -export const reactNativeVersion = '0.68.1'; +export const reactNativeVersion = '0.68.2'; export const typesReactNativeVersion = '0.67.7'; export const typesNodeVersion = '16.11.7';