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 cc94f379de325..0000000000000 Binary files a/packages/react-native/src/generators/application/files/app/android/app/src/main/res/drawable/splashscreen_image.png and /dev/null differ 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';