@nx/react-native 0.0.0-pr-31840-b906464 → 0.0.0-pr-31853-d3f52a1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/migrations.json +0 -75
  2. package/package.json +9 -9
  3. package/src/generators/application/files/app/android/app/build.gradle.template +2 -2
  4. package/src/generators/application/files/app/android/app/src/androidTest/java/com/__lowerCaseName__/DetoxTest.java.template +30 -0
  5. package/src/generators/application/files/app/android/app/src/debug/AndroidManifest.xml.template +1 -0
  6. package/src/generators/application/files/app/android/app/src/main/AndroidManifest.xml.template +2 -1
  7. package/src/generators/application/files/app/android/app/src/main/java/com/__lowerCaseName__/MainApplication.kt.template +1 -1
  8. package/src/generators/application/files/app/android/app/src/main/res/xml/network_security_config.xml +7 -0
  9. package/src/generators/application/files/app/android/build.gradle.template +3 -3
  10. package/src/generators/application/files/app/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  11. package/src/generators/application/files/app/android/gradle/wrapper/gradle-wrapper.properties +1 -1
  12. package/src/generators/application/files/app/android/gradlew.template +3 -2
  13. package/src/generators/application/files/app/ios/.xcode.env.template +1 -0
  14. package/src/generators/application/files/app/ios/Podfile.template +5 -0
  15. package/src/generators/application/files/app/ios/__className__/AppDelegate.h +6 -0
  16. package/src/generators/application/files/app/ios/__className__/AppDelegate.mm.template +31 -0
  17. package/src/generators/application/files/app/ios/__className__/PrivacyInfo.xcprivacy +32 -31
  18. package/src/generators/application/files/app/ios/__className__/main.m +10 -0
  19. package/src/generators/application/files/app/ios/__className__.xcodeproj/project.pbxproj.template +192 -9
  20. package/src/generators/application/files/app/ios/__className__Tests/Info.plist +24 -0
  21. package/src/generators/application/files/app/ios/__className__Tests/__className__Tests.m +66 -0
  22. package/src/generators/application/files/app/package.json.template +1 -0
  23. package/src/generators/application/files/app/src/app/App.spec.tsx.template +1 -1
  24. package/src/generators/application/lib/add-project.js +0 -2
  25. package/src/generators/web-configuration/web-configuration.js +1 -1
  26. package/src/utils/ensure-dependencies.js +3 -0
  27. package/src/utils/versions.d.ts +19 -16
  28. package/src/utils/versions.js +20 -17
  29. package/src/generators/application/files/app/ios/__className__/AppDelegate.swift.template +0 -48
  30. package/src/migrations/update-21-2-0/remove-deprecated-deps.d.ts +0 -5
  31. package/src/migrations/update-21-2-0/remove-deprecated-deps.js +0 -38
package/migrations.json CHANGED
@@ -5,12 +5,6 @@
5
5
  "version": "19.6.0-beta.1",
6
6
  "description": "Rename upgrade target name to fix casing.",
7
7
  "implementation": "./src/migrations/update-19-6-0/rename-upgrade-target-name"
8
- },
9
- "update-21-2-0-remove-deprecated-deps": {
10
- "version": "21.2.0-beta.0",
11
- "cli": "nx",
12
- "description": "Remove deprecated dependencies from package.json",
13
- "factory": "./src/migrations/update-21-2-0/remove-deprecated-deps"
14
8
  }
15
9
  },
16
10
  "packageJsonUpdates": {
@@ -173,75 +167,6 @@
173
167
  "alwaysAddToPackageJson": false
174
168
  }
175
169
  }
176
- },
177
- "21.2.0-beta.0": {
178
- "version": "21.2.0-beta.0",
179
- "packages": {
180
- "react-native": {
181
- "version": "~0.79.3",
182
- "alwaysAddToPackageJson": false
183
- },
184
- "@react-native-community/cli": {
185
- "version": "~18.0.0",
186
- "alwaysAddToPackageJson": true
187
- },
188
- "@react-native-community/cli-platform-android": {
189
- "version": "~18.0.0",
190
- "alwaysAddToPackageJson": true
191
- },
192
- "@react-native-community/cli-platform-ios": {
193
- "version": "~18.0.0",
194
- "alwaysAddToPackageJson": true
195
- },
196
- "@react-native/babel-preset": {
197
- "version": "~0.79.3",
198
- "alwaysAddToPackageJson": false
199
- },
200
- "@react-native/metro-config": {
201
- "version": "~0.79.3",
202
- "alwaysAddToPackageJson": false
203
- },
204
- "react-native-web": {
205
- "version": "~0.20.0",
206
- "alwaysAddToPackageJson": false
207
- },
208
- "react": {
209
- "version": "19.0.0",
210
- "alwaysAddToPackageJson": false
211
- },
212
- "react-dom": {
213
- "version": "19.0.0",
214
- "alwaysAddToPackageJson": false
215
- },
216
- "@types/react": {
217
- "version": "~19.0.10",
218
- "alwaysAddToPackageJson": false
219
- },
220
- "@types/react-dom": {
221
- "version": "~19.0.6",
222
- "alwaysAddToPackageJson": false
223
- },
224
- "@testing-library/react-native": {
225
- "version": "~13.2.0",
226
- "alwaysAddToPackageJson": false
227
- },
228
- "react-native-svg-transformer": {
229
- "version": "~1.5.1",
230
- "alwaysAddToPackageJson": false
231
- },
232
- "react-native-svg": {
233
- "version": "~15.11.2",
234
- "alwaysAddToPackageJson": false
235
- },
236
- "react-native-svg-web": {
237
- "version": "~1.0.9",
238
- "addToPackageJson": "devDependencies"
239
- },
240
- "@babel/runtime": {
241
- "version": "^7.25.0",
242
- "alwaysAddToPackageJson": false
243
- }
244
- }
245
170
  }
246
171
  }
247
172
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/react-native",
3
- "version": "0.0.0-pr-31840-b906464",
3
+ "version": "0.0.0-pr-31853-d3f52a1",
4
4
  "private": false,
5
5
  "description": "The Nx Plugin for React Native contains generators for managing React Native applications and libraries within an Nx workspace. It provides: \n\n-Integration with libraries such as Jest, Detox, and Storybook.\n-Scaffolding for creating buildable libraries that can be published to npm.\n-Utilities for automatic workspace refactoring.",
6
6
  "keywords": [
@@ -30,17 +30,17 @@
30
30
  "enhanced-resolve": "^5.8.3",
31
31
  "glob": "7.1.4",
32
32
  "ignore": "^5.0.4",
33
- "metro-config": "~0.82.4",
34
- "metro-resolver": "~0.82.4",
33
+ "metro-config": "~0.80.4",
34
+ "metro-resolver": "~0.80.4",
35
35
  "picocolors": "^1.1.0",
36
36
  "tsconfig-paths": "^4.1.2",
37
37
  "tslib": "^2.3.0",
38
- "@nx/devkit": "0.0.0-pr-31840-b906464",
39
- "@nx/jest": "0.0.0-pr-31840-b906464",
40
- "@nx/js": "0.0.0-pr-31840-b906464",
41
- "@nx/eslint": "0.0.0-pr-31840-b906464",
42
- "@nx/react": "0.0.0-pr-31840-b906464",
43
- "@nx/workspace": "0.0.0-pr-31840-b906464"
38
+ "@nx/devkit": "0.0.0-pr-31853-d3f52a1",
39
+ "@nx/jest": "0.0.0-pr-31853-d3f52a1",
40
+ "@nx/js": "0.0.0-pr-31853-d3f52a1",
41
+ "@nx/eslint": "0.0.0-pr-31853-d3f52a1",
42
+ "@nx/react": "0.0.0-pr-31853-d3f52a1",
43
+ "@nx/workspace": "0.0.0-pr-31853-d3f52a1"
44
44
  },
45
45
  "executors": "./executors.json",
46
46
  "ng-update": {
@@ -63,14 +63,14 @@ def enableProguardInReleaseBuilds = false
63
63
  * The preferred build flavor of JavaScriptCore (JSC)
64
64
  *
65
65
  * For example, to use the international variant, you can use:
66
- * `def jscFlavor = io.github.react-native-community:jsc-android-intl:2026004.+`
66
+ * `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
67
67
  *
68
68
  * The international variant includes ICU i18n library and necessary data
69
69
  * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
70
70
  * give correct results when using with locales other than en-US. Note that
71
71
  * this variant is about 6MiB larger per architecture than default.
72
72
  */
73
- def jscFlavor = 'io.github.react-native-community:jsc-android:2026004.+'
73
+ def jscFlavor = 'org.webkit:android-jsc:+'
74
74
 
75
75
  android {
76
76
  ndkVersion rootProject.ext.ndkVersion
@@ -0,0 +1,30 @@
1
+ // Replace "com.<%= lowerCaseName %>" here and below with your app's package name from the top of MainActivity.java
2
+ package com.<%= lowerCaseName %>;
3
+
4
+ import com.wix.detox.Detox;
5
+ import com.wix.detox.config.DetoxConfig;
6
+
7
+ import org.junit.Rule;
8
+ import org.junit.Test;
9
+ import org.junit.runner.RunWith;
10
+
11
+ import androidx.test.ext.junit.runners.AndroidJUnit4;
12
+ import androidx.test.filters.LargeTest;
13
+ import androidx.test.rule.ActivityTestRule;
14
+
15
+ @RunWith(AndroidJUnit4.class)
16
+ @LargeTest
17
+ public class DetoxTest {
18
+ @Rule // (2)
19
+ public ActivityTestRule<MainActivity> mActivityRule = new ActivityTestRule<>(MainActivity.class, false, false);
20
+
21
+ @Test
22
+ public void runDetoxTests() {
23
+ DetoxConfig detoxConfig = new DetoxConfig();
24
+ detoxConfig.idlePolicyConfig.masterTimeoutSec = 90;
25
+ detoxConfig.idlePolicyConfig.idleResourceTimeoutSec = 60;
26
+ detoxConfig.rnContextLoadTimeoutSec = (BuildConfig.DEBUG ? 180 : 60);
27
+
28
+ Detox.runTests(mActivityRule, detoxConfig);
29
+ }
30
+ }
@@ -5,5 +5,6 @@
5
5
  <application
6
6
  android:usesCleartextTraffic="true"
7
7
  tools:targetApi="28"
8
+ android:networkSecurityConfig="@xml/network_security_config"
8
9
  tools:ignore="GoogleAppIndexingWarning"/>
9
10
  </manifest>
@@ -9,7 +9,8 @@
9
9
  android:roundIcon="@mipmap/ic_launcher_round"
10
10
  android:allowBackup="false"
11
11
  android:theme="@style/AppTheme"
12
- android:supportsRtl="true">
12
+ android:supportsRtl="true"
13
+ android:networkSecurityConfig="@xml/network_security_config">
13
14
  <activity
14
15
  android:name=".MainActivity"
15
16
  android:label="@string/app_name"
@@ -22,7 +22,7 @@ class MainApplication : Application(), ReactApplication {
22
22
  // add(MyReactNativePackage())
23
23
  }
24
24
 
25
- override fun getJSMainModuleName(): String = "index"
25
+ override fun getJSMainModuleName(): String = "src/main"
26
26
 
27
27
  override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG
28
28
 
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <network-security-config>
3
+ <domain-config cleartextTrafficPermitted="true">
4
+ <domain includeSubdomains="true">10.0.2.2</domain>
5
+ <domain includeSubdomains="true">localhost</domain>
6
+ </domain-config>
7
+ </network-security-config>
@@ -3,9 +3,9 @@ buildscript {
3
3
  buildToolsVersion = "35.0.0"
4
4
  minSdkVersion = 24
5
5
  compileSdkVersion = 35
6
- targetSdkVersion = 35
7
- ndkVersion = "27.1.12297006"
8
- kotlinVersion = "2.0.21"
6
+ targetSdkVersion = 34
7
+ ndkVersion = "26.1.10909125"
8
+ kotlinVersion = "1.9.24"
9
9
  }
10
10
  repositories {
11
11
  google()
@@ -1,6 +1,6 @@
1
1
  distributionBase=GRADLE_USER_HOME
2
2
  distributionPath=wrapper/dists
3
- distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
3
+ distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
4
4
  networkTimeout=10000
5
5
  validateDistributionUrl=true
6
6
  zipStoreBase=GRADLE_USER_HOME
@@ -86,7 +86,8 @@ done
86
86
  # shellcheck disable=SC2034
87
87
  APP_BASE_NAME=${0##*/}
88
88
  # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
89
- APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
89
+ APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
90
+ ' "$PWD" ) || exit
90
91
 
91
92
  # Use the maximum available, or set MAX_FD != -1 to use that value.
92
93
  MAX_FD=maximum
@@ -205,7 +206,7 @@ fi
205
206
  DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
206
207
 
207
208
  # Collect all arguments for the java command:
208
- # * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
209
+ # * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
209
210
  # and any embedded shellness will be escaped.
210
211
  # * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
211
212
  # treated as '${Hostname}' itself on the command line.
@@ -9,3 +9,4 @@
9
9
  # For example, to use nvm with brew, add the following line
10
10
  # . "$(brew --prefix nvm)/nvm.sh" --no-use
11
11
  export NODE_BINARY=$(command -v node)
12
+ export ENTRY_FILE="${PROJECT_DIR}/../<%= entryFile %>"
@@ -23,6 +23,11 @@ target '<%= className %>' do
23
23
  :app_path => "#{Pod::Config.instance.installation_root}/.."
24
24
  )
25
25
 
26
+ target '<%= className %>Tests' do
27
+ inherit! :complete
28
+ # Pods for testing
29
+ end
30
+
26
31
  post_install do |installer|
27
32
  # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
28
33
  react_native_post_install(
@@ -0,0 +1,6 @@
1
+ #import <RCTAppDelegate.h>
2
+ #import <UIKit/UIKit.h>
3
+
4
+ @interface AppDelegate : RCTAppDelegate
5
+
6
+ @end
@@ -0,0 +1,31 @@
1
+ #import "AppDelegate.h"
2
+
3
+ #import <React/RCTBundleURLProvider.h>
4
+
5
+ @implementation AppDelegate
6
+
7
+ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
8
+ {
9
+ self.moduleName = @"<%= className %>";
10
+ // You can add your custom initial props in the dictionary below.
11
+ // They will be passed down to the ViewController used by React Native.
12
+ self.initialProps = @{};
13
+
14
+ return [super application:application didFinishLaunchingWithOptions:launchOptions];
15
+ }
16
+
17
+ - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
18
+ {
19
+ return [self bundleURL];
20
+ }
21
+
22
+ - (NSURL *)bundleURL
23
+ {
24
+ #if DEBUG
25
+ return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"<%= entryFileIos %>"];
26
+ #else
27
+ return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
28
+ #endif
29
+ }
30
+
31
+ @end
@@ -2,36 +2,37 @@
2
2
  <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
3
  <plist version="1.0">
4
4
  <dict>
5
- <key>NSPrivacyAccessedAPITypes</key>
6
- <array>
7
- <dict>
8
- <key>NSPrivacyAccessedAPIType</key>
9
- <string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
10
- <key>NSPrivacyAccessedAPITypeReasons</key>
11
- <array>
12
- <string>C617.1</string>
13
- </array>
14
- </dict>
15
- <dict>
16
- <key>NSPrivacyAccessedAPIType</key>
17
- <string>NSPrivacyAccessedAPICategoryUserDefaults</string>
18
- <key>NSPrivacyAccessedAPITypeReasons</key>
19
- <array>
20
- <string>CA92.1</string>
21
- </array>
22
- </dict>
23
- <dict>
24
- <key>NSPrivacyAccessedAPIType</key>
25
- <string>NSPrivacyAccessedAPICategorySystemBootTime</string>
26
- <key>NSPrivacyAccessedAPITypeReasons</key>
27
- <array>
28
- <string>35F9.1</string>
29
- </array>
30
- </dict>
31
- </array>
32
- <key>NSPrivacyCollectedDataTypes</key>
33
- <array/>
34
- <key>NSPrivacyTracking</key>
35
- <false/>
5
+ <key>NSPrivacyCollectedDataTypes</key>
6
+ <array>
7
+ </array>
8
+ <key>NSPrivacyAccessedAPITypes</key>
9
+ <array>
10
+ <dict>
11
+ <key>NSPrivacyAccessedAPIType</key>
12
+ <string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
13
+ <key>NSPrivacyAccessedAPITypeReasons</key>
14
+ <array>
15
+ <string>C617.1</string>
16
+ </array>
17
+ </dict>
18
+ <dict>
19
+ <key>NSPrivacyAccessedAPIType</key>
20
+ <string>NSPrivacyAccessedAPICategoryUserDefaults</string>
21
+ <key>NSPrivacyAccessedAPITypeReasons</key>
22
+ <array>
23
+ <string>CA92.1</string>
24
+ </array>
25
+ </dict>
26
+ <dict>
27
+ <key>NSPrivacyAccessedAPIType</key>
28
+ <string>NSPrivacyAccessedAPICategorySystemBootTime</string>
29
+ <key>NSPrivacyAccessedAPITypeReasons</key>
30
+ <array>
31
+ <string>35F9.1</string>
32
+ </array>
33
+ </dict>
34
+ </array>
35
+ <key>NSPrivacyTracking</key>
36
+ <false/>
36
37
  </dict>
37
38
  </plist>
@@ -0,0 +1,10 @@
1
+ #import <UIKit/UIKit.h>
2
+
3
+ #import "AppDelegate.h"
4
+
5
+ int main(int argc, char *argv[])
6
+ {
7
+ @autoreleasepool {
8
+ return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
9
+ }
10
+ }
@@ -7,9 +7,12 @@
7
7
  objects = {
8
8
 
9
9
  /* Begin PBXBuildFile section */
10
+ 00E356F31AD99517003FC87E /* <%= className %>Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* <%= className %>Tests.m */; };
10
11
  0C80B921A6F3F58F76C31292 /* libPods-<%= className %>.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DCACB8F33CDC322A6C60F78 /* libPods-<%= className %>.a */; };
12
+ 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; };
11
13
  13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
12
- 761780ED2CA45674006654EE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761780EC2CA45674006654EE /* AppDelegate.swift */; };
14
+ 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
15
+ 7699B88040F8A987B510C191 /* libPods-<%= className %>-<%= className %>Tests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 19F6CBCC0A4E27FBF8BF4A61 /* libPods-<%= className %>-<%= className %>Tests.a */; };
13
16
  81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
14
17
  /* End PBXBuildFile section */
15
18
 
@@ -24,20 +27,35 @@
24
27
  /* End PBXContainerItemProxy section */
25
28
 
26
29
  /* Begin PBXFileReference section */
30
+ 00E356EE1AD99517003FC87E /* <%= className %>Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = <%= className %>Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
27
31
  00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
32
+ 00E356F21AD99517003FC87E /* <%= className %>Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = <%= className %>Tests.m; sourceTree = "<group>"; };
28
33
  13B07F961A680F5B00A75B9A /* <%= className %>.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = <%= className %>.app; sourceTree = BUILT_PRODUCTS_DIR; };
34
+ 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = <%= className %>/AppDelegate.h; sourceTree = "<group>"; };
35
+ 13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = <%= className %>/AppDelegate.mm; sourceTree = "<group>"; };
29
36
  13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = <%= className %>/Images.xcassets; sourceTree = "<group>"; };
30
37
  13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = <%= className %>/Info.plist; sourceTree = "<group>"; };
31
- 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = PrivacyInfo.xcprivacy; path = <%= className %>/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
38
+ 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = <%= className %>/main.m; sourceTree = "<group>"; };
39
+ 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = PrivacyInfo.xcprivacy; path = <%= className %>/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
40
+ 19F6CBCC0A4E27FBF8BF4A61 /* libPods-<%= className %>-<%= className %>Tests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-<%= className %>-<%= className %>Tests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
32
41
  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 = "<group>"; };
33
42
  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 = "<group>"; };
43
+ 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 = "<group>"; };
34
44
  5DCACB8F33CDC322A6C60F78 /* libPods-<%= className %>.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-<%= className %>.a"; sourceTree = BUILT_PRODUCTS_DIR; };
35
- 761780EC2CA45674006654EE /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AppDelegate.swift; path = <%= className %>/AppDelegate.swift; sourceTree = "<group>"; };
36
45
  81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = <%= className %>/LaunchScreen.storyboard; sourceTree = "<group>"; };
46
+ 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 = "<group>"; };
37
47
  ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
38
48
  /* End PBXFileReference section */
39
49
 
40
50
  /* Begin PBXFrameworksBuildPhase section */
51
+ 00E356EB1AD99517003FC87E /* Frameworks */ = {
52
+ isa = PBXFrameworksBuildPhase;
53
+ buildActionMask = 2147483647;
54
+ files = (
55
+ 7699B88040F8A987B510C191 /* libPods-<%= className %>-<%= className %>Tests.a in Frameworks */,
56
+ );
57
+ runOnlyForDeploymentPostprocessing = 0;
58
+ };
41
59
  13B07F8C1A680F5B00A75B9A /* Frameworks */ = {
42
60
  isa = PBXFrameworksBuildPhase;
43
61
  buildActionMask = 2147483647;
@@ -49,6 +67,15 @@
49
67
  /* End PBXFrameworksBuildPhase section */
50
68
 
51
69
  /* Begin PBXGroup section */
70
+ 00E356EF1AD99517003FC87E /* <%= className %>Tests */ = {
71
+ isa = PBXGroup;
72
+ children = (
73
+ 00E356F21AD99517003FC87E /* <%= className %>Tests.m */,
74
+ 00E356F01AD99517003FC87E /* Supporting Files */,
75
+ );
76
+ path = <%= className %>Tests;
77
+ sourceTree = "<group>";
78
+ };
52
79
  00E356F01AD99517003FC87E /* Supporting Files */ = {
53
80
  isa = PBXGroup;
54
81
  children = (
@@ -60,10 +87,12 @@
60
87
  13B07FAE1A68108700A75B9A /* <%= className %> */ = {
61
88
  isa = PBXGroup;
62
89
  children = (
90
+ 13B07FAF1A68108700A75B9A /* AppDelegate.h */,
91
+ 13B07FB01A68108700A75B9A /* AppDelegate.mm */,
63
92
  13B07FB51A68108700A75B9A /* Images.xcassets */,
64
- 761780EC2CA45674006654EE /* AppDelegate.swift */,
65
93
  13B07FB61A68108700A75B9A /* Info.plist */,
66
94
  81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */,
95
+ 13B07FB71A68108700A75B9A /* main.m */,
67
96
  13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */,
68
97
  );
69
98
  name = <%= className %>;
@@ -74,6 +103,7 @@
74
103
  children = (
75
104
  ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
76
105
  5DCACB8F33CDC322A6C60F78 /* libPods-<%= className %>.a */,
106
+ 19F6CBCC0A4E27FBF8BF4A61 /* libPods-<%= className %>-<%= className %>Tests.a */,
77
107
  );
78
108
  name = Frameworks;
79
109
  sourceTree = "<group>";
@@ -90,6 +120,7 @@
90
120
  children = (
91
121
  13B07FAE1A68108700A75B9A /* <%= className %> */,
92
122
  832341AE1AAA6A7D00B99B32 /* Libraries */,
123
+ 00E356EF1AD99517003FC87E /* <%= className %>Tests */,
93
124
  83CBBA001A601CBA00E9B192 /* Products */,
94
125
  2D16E6871FA4F8E400B85C8A /* Frameworks */,
95
126
  BBD78D7AC51CEA395F1C20DB /* Pods */,
@@ -103,6 +134,7 @@
103
134
  isa = PBXGroup;
104
135
  children = (
105
136
  13B07F961A680F5B00A75B9A /* <%= className %>.app */,
137
+ 00E356EE1AD99517003FC87E /* <%= className %>Tests.xctest */,
106
138
  );
107
139
  name = Products;
108
140
  sourceTree = "<group>";
@@ -112,6 +144,8 @@
112
144
  children = (
113
145
  3B4392A12AC88292D35C810B /* Pods-<%= className %>.debug.xcconfig */,
114
146
  5709B34CF0A7D63546082F79 /* Pods-<%= className %>.release.xcconfig */,
147
+ 5B7EB9410499542E8C5724F5 /* Pods-<%= className %>-<%= className %>Tests.debug.xcconfig */,
148
+ 89C6BE57DB24E9ADA2F236DE /* Pods-<%= className %>-<%= className %>Tests.release.xcconfig */,
115
149
  );
116
150
  path = Pods;
117
151
  sourceTree = "<group>";
@@ -119,6 +153,27 @@
119
153
  /* End PBXGroup section */
120
154
 
121
155
  /* Begin PBXNativeTarget section */
156
+ 00E356ED1AD99517003FC87E /* <%= className %>Tests */ = {
157
+ isa = PBXNativeTarget;
158
+ buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "<%= className %>Tests" */;
159
+ buildPhases = (
160
+ A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */,
161
+ 00E356EA1AD99517003FC87E /* Sources */,
162
+ 00E356EB1AD99517003FC87E /* Frameworks */,
163
+ 00E356EC1AD99517003FC87E /* Resources */,
164
+ C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */,
165
+ F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */,
166
+ );
167
+ buildRules = (
168
+ );
169
+ dependencies = (
170
+ 00E356F51AD99517003FC87E /* PBXTargetDependency */,
171
+ );
172
+ name = <%= className %>Tests;
173
+ productName = <%= className %>Tests;
174
+ productReference = 00E356EE1AD99517003FC87E /* <%= className %>Tests.xctest */;
175
+ productType = "com.apple.product-type.bundle.unit-test";
176
+ };
122
177
  13B07F861A680F5B00A75B9A /* <%= className %> */ = {
123
178
  isa = PBXNativeTarget;
124
179
  buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "<%= className %>" */;
@@ -148,6 +203,10 @@
148
203
  attributes = {
149
204
  LastUpgradeCheck = 1210;
150
205
  TargetAttributes = {
206
+ 00E356ED1AD99517003FC87E = {
207
+ CreatedOnToolsVersion = 6.2;
208
+ TestTargetID = 13B07F861A680F5B00A75B9A;
209
+ };
151
210
  13B07F861A680F5B00A75B9A = {
152
211
  LastSwiftMigration = 1120;
153
212
  };
@@ -167,6 +226,7 @@
167
226
  projectRoot = "";
168
227
  targets = (
169
228
  13B07F861A680F5B00A75B9A /* <%= className %> */,
229
+ 00E356ED1AD99517003FC87E /* <%= className %>Tests */,
170
230
  );
171
231
  };
172
232
  /* End PBXProject section */
@@ -224,6 +284,28 @@
224
284
  shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-<%= className %>/Pods-<%= className %>-frameworks.sh\"\n";
225
285
  showEnvVarsInLog = 0;
226
286
  };
287
+ A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */ = {
288
+ isa = PBXShellScriptBuildPhase;
289
+ buildActionMask = 2147483647;
290
+ files = (
291
+ );
292
+ inputFileListPaths = (
293
+ );
294
+ inputPaths = (
295
+ "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
296
+ "${PODS_ROOT}/Manifest.lock",
297
+ );
298
+ name = "[CP] Check Pods Manifest.lock";
299
+ outputFileListPaths = (
300
+ );
301
+ outputPaths = (
302
+ "$(DERIVED_FILE_DIR)/Pods-<%= className %>-<%= className %>Tests-checkManifestLockResult.txt",
303
+ );
304
+ runOnlyForDeploymentPostprocessing = 0;
305
+ shellPath = /bin/sh;
306
+ 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";
307
+ showEnvVarsInLog = 0;
308
+ };
227
309
  C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */ = {
228
310
  isa = PBXShellScriptBuildPhase;
229
311
  buildActionMask = 2147483647;
@@ -246,6 +328,23 @@
246
328
  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";
247
329
  showEnvVarsInLog = 0;
248
330
  };
331
+ C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */ = {
332
+ isa = PBXShellScriptBuildPhase;
333
+ buildActionMask = 2147483647;
334
+ files = (
335
+ );
336
+ inputFileListPaths = (
337
+ "${PODS_ROOT}/Target Support Files/Pods-<%= className %>-<%= className %>Tests/Pods-<%= className %>-<%= className %>Tests-frameworks-${CONFIGURATION}-input-files.xcfilelist",
338
+ );
339
+ name = "[CP] Embed Pods Frameworks";
340
+ outputFileListPaths = (
341
+ "${PODS_ROOT}/Target Support Files/Pods-<%= className %>-<%= className %>Tests/Pods-<%= className %>-<%= className %>Tests-frameworks-${CONFIGURATION}-output-files.xcfilelist",
342
+ );
343
+ runOnlyForDeploymentPostprocessing = 0;
344
+ shellPath = /bin/sh;
345
+ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-<%= className %>-<%= className %>Tests/Pods-<%= className %>-<%= className %>Tests-frameworks.sh\"\n";
346
+ showEnvVarsInLog = 0;
347
+ };
249
348
  E235C05ADACE081382539298 /* [CP] Copy Pods Resources */ = {
250
349
  isa = PBXShellScriptBuildPhase;
251
350
  buildActionMask = 2147483647;
@@ -263,14 +362,40 @@
263
362
  shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-<%= className %>/Pods-<%= className %>-resources.sh\"\n";
264
363
  showEnvVarsInLog = 0;
265
364
  };
365
+ F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */ = {
366
+ isa = PBXShellScriptBuildPhase;
367
+ buildActionMask = 2147483647;
368
+ files = (
369
+ );
370
+ inputFileListPaths = (
371
+ "${PODS_ROOT}/Target Support Files/Pods-<%= className %>-<%= className %>Tests/Pods-<%= className %>-<%= className %>Tests-resources-${CONFIGURATION}-input-files.xcfilelist",
372
+ );
373
+ name = "[CP] Copy Pods Resources";
374
+ outputFileListPaths = (
375
+ "${PODS_ROOT}/Target Support Files/Pods-<%= className %>-<%= className %>Tests/Pods-<%= className %>-<%= className %>Tests-resources-${CONFIGURATION}-output-files.xcfilelist",
376
+ );
377
+ runOnlyForDeploymentPostprocessing = 0;
378
+ shellPath = /bin/sh;
379
+ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-<%= className %>-<%= className %>Tests/Pods-<%= className %>-<%= className %>Tests-resources.sh\"\n";
380
+ showEnvVarsInLog = 0;
381
+ };
266
382
  /* End PBXShellScriptBuildPhase section */
267
383
 
268
384
  /* Begin PBXSourcesBuildPhase section */
385
+ 00E356EA1AD99517003FC87E /* Sources */ = {
386
+ isa = PBXSourcesBuildPhase;
387
+ buildActionMask = 2147483647;
388
+ files = (
389
+ 00E356F31AD99517003FC87E /* <%= className %>Tests.m in Sources */,
390
+ );
391
+ runOnlyForDeploymentPostprocessing = 0;
392
+ };
269
393
  13B07F871A680F5B00A75B9A /* Sources */ = {
270
394
  isa = PBXSourcesBuildPhase;
271
395
  buildActionMask = 2147483647;
272
396
  files = (
273
- 761780ED2CA45674006654EE /* AppDelegate.swift in Sources */,
397
+ 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */,
398
+ 13B07FC11A68108700A75B9A /* main.m in Sources */,
274
399
  );
275
400
  runOnlyForDeploymentPostprocessing = 0;
276
401
  };
@@ -285,6 +410,57 @@
285
410
  /* End PBXTargetDependency section */
286
411
 
287
412
  /* Begin XCBuildConfiguration section */
413
+ 00E356F61AD99517003FC87E /* Debug */ = {
414
+ isa = XCBuildConfiguration;
415
+ baseConfigurationReference = 5B7EB9410499542E8C5724F5 /* Pods-<%= className %>-<%= className %>Tests.debug.xcconfig */;
416
+ buildSettings = {
417
+ BUNDLE_LOADER = "$(TEST_HOST)";
418
+ GCC_PREPROCESSOR_DEFINITIONS = (
419
+ "DEBUG=1",
420
+ "$(inherited)",
421
+ );
422
+ INFOPLIST_FILE = <%= className %>Tests/Info.plist;
423
+ IPHONEOS_DEPLOYMENT_TARGET = 13.4;
424
+ LD_RUNPATH_SEARCH_PATHS = (
425
+ "$(inherited)",
426
+ "@executable_path/Frameworks",
427
+ "@loader_path/Frameworks",
428
+ );
429
+ OTHER_LDFLAGS = (
430
+ "-ObjC",
431
+ "-lc++",
432
+ "$(inherited)",
433
+ );
434
+ PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
435
+ PRODUCT_NAME = "$(TARGET_NAME)";
436
+ TEST_HOST = "$(BUILT_PRODUCTS_DIR)/<%= className %>.app/<%= className %>";
437
+ };
438
+ name = Debug;
439
+ };
440
+ 00E356F71AD99517003FC87E /* Release */ = {
441
+ isa = XCBuildConfiguration;
442
+ baseConfigurationReference = 89C6BE57DB24E9ADA2F236DE /* Pods-<%= className %>-<%= className %>Tests.release.xcconfig */;
443
+ buildSettings = {
444
+ BUNDLE_LOADER = "$(TEST_HOST)";
445
+ COPY_PHASE_STRIP = NO;
446
+ INFOPLIST_FILE = <%= className %>Tests/Info.plist;
447
+ IPHONEOS_DEPLOYMENT_TARGET = 13.4;
448
+ LD_RUNPATH_SEARCH_PATHS = (
449
+ "$(inherited)",
450
+ "@executable_path/Frameworks",
451
+ "@loader_path/Frameworks",
452
+ );
453
+ OTHER_LDFLAGS = (
454
+ "-ObjC",
455
+ "-lc++",
456
+ "$(inherited)",
457
+ );
458
+ PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
459
+ PRODUCT_NAME = "$(TARGET_NAME)";
460
+ TEST_HOST = "$(BUILT_PRODUCTS_DIR)/<%= className %>.app/<%= className %>";
461
+ };
462
+ name = Release;
463
+ };
288
464
  13B07F941A680F5B00A75B9A /* Debug */ = {
289
465
  isa = XCBuildConfiguration;
290
466
  baseConfigurationReference = 3B4392A12AC88292D35C810B /* Pods-<%= className %>.debug.xcconfig */;
@@ -294,7 +470,6 @@
294
470
  CURRENT_PROJECT_VERSION = 1;
295
471
  ENABLE_BITCODE = NO;
296
472
  INFOPLIST_FILE = <%= className %>/Info.plist;
297
- IPHONEOS_DEPLOYMENT_TARGET = 15.1;
298
473
  LD_RUNPATH_SEARCH_PATHS = (
299
474
  "$(inherited)",
300
475
  "@executable_path/Frameworks",
@@ -321,7 +496,6 @@
321
496
  CLANG_ENABLE_MODULES = YES;
322
497
  CURRENT_PROJECT_VERSION = 1;
323
498
  INFOPLIST_FILE = <%= className %>/Info.plist;
324
- IPHONEOS_DEPLOYMENT_TARGET = 15.1;
325
499
  LD_RUNPATH_SEARCH_PATHS = (
326
500
  "$(inherited)",
327
501
  "@executable_path/Frameworks",
@@ -388,7 +562,7 @@
388
562
  GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
389
563
  GCC_WARN_UNUSED_FUNCTION = YES;
390
564
  GCC_WARN_UNUSED_VARIABLE = YES;
391
- IPHONEOS_DEPLOYMENT_TARGET = 15.1;
565
+ IPHONEOS_DEPLOYMENT_TARGET = 13.4;
392
566
  LD_RUNPATH_SEARCH_PATHS = (
393
567
  /usr/lib/swift,
394
568
  "$(inherited)",
@@ -454,7 +628,7 @@
454
628
  GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
455
629
  GCC_WARN_UNUSED_FUNCTION = YES;
456
630
  GCC_WARN_UNUSED_VARIABLE = YES;
457
- IPHONEOS_DEPLOYMENT_TARGET = 15.1;
631
+ IPHONEOS_DEPLOYMENT_TARGET = 13.4;
458
632
  LD_RUNPATH_SEARCH_PATHS = (
459
633
  /usr/lib/swift,
460
634
  "$(inherited)",
@@ -481,6 +655,15 @@
481
655
  /* End XCBuildConfiguration section */
482
656
 
483
657
  /* Begin XCConfigurationList section */
658
+ 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "<%= className %>Tests" */ = {
659
+ isa = XCConfigurationList;
660
+ buildConfigurations = (
661
+ 00E356F61AD99517003FC87E /* Debug */,
662
+ 00E356F71AD99517003FC87E /* Release */,
663
+ );
664
+ defaultConfigurationIsVisible = 0;
665
+ defaultConfigurationName = Release;
666
+ };
484
667
  13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "<%= className %>" */ = {
485
668
  isa = XCConfigurationList;
486
669
  buildConfigurations = (
@@ -0,0 +1,24 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>CFBundleDevelopmentRegion</key>
6
+ <string>en</string>
7
+ <key>CFBundleExecutable</key>
8
+ <string>$(EXECUTABLE_NAME)</string>
9
+ <key>CFBundleIdentifier</key>
10
+ <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
11
+ <key>CFBundleInfoDictionaryVersion</key>
12
+ <string>6.0</string>
13
+ <key>CFBundleName</key>
14
+ <string>$(PRODUCT_NAME)</string>
15
+ <key>CFBundlePackageType</key>
16
+ <string>BNDL</string>
17
+ <key>CFBundleShortVersionString</key>
18
+ <string>1.0</string>
19
+ <key>CFBundleSignature</key>
20
+ <string>????</string>
21
+ <key>CFBundleVersion</key>
22
+ <string>1</string>
23
+ </dict>
24
+ </plist>
@@ -0,0 +1,66 @@
1
+ #import <UIKit/UIKit.h>
2
+ #import <XCTest/XCTest.h>
3
+
4
+ #import <React/RCTLog.h>
5
+ #import <React/RCTRootView.h>
6
+
7
+ #define TIMEOUT_SECONDS 600
8
+ #define TEXT_TO_LOOK_FOR @"Welcome to React"
9
+
10
+ @interface <%= className %>Tests : XCTestCase
11
+
12
+ @end
13
+
14
+ @implementation <%= className %>Tests
15
+
16
+ - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL (^)(UIView *view))test
17
+ {
18
+ if (test(view)) {
19
+ return YES;
20
+ }
21
+ for (UIView *subview in [view subviews]) {
22
+ if ([self findSubviewInView:subview matching:test]) {
23
+ return YES;
24
+ }
25
+ }
26
+ return NO;
27
+ }
28
+
29
+ - (void)testRendersWelcomeScreen
30
+ {
31
+ UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController];
32
+ NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS];
33
+ BOOL foundElement = NO;
34
+
35
+ __block NSString *redboxError = nil;
36
+ #ifdef DEBUG
37
+ RCTSetLogFunction(
38
+ ^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) {
39
+ if (level >= RCTLogLevelError) {
40
+ redboxError = message;
41
+ }
42
+ });
43
+ #endif
44
+
45
+ while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) {
46
+ [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
47
+ [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
48
+
49
+ foundElement = [self findSubviewInView:vc.view
50
+ matching:^BOOL(UIView *view) {
51
+ if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) {
52
+ return YES;
53
+ }
54
+ return NO;
55
+ }];
56
+ }
57
+
58
+ #ifdef DEBUG
59
+ RCTSetLogFunction(RCTDefaultLogFunction);
60
+ #endif
61
+
62
+ XCTAssertNil(redboxError, @"RedBox error: %@", redboxError);
63
+ XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS);
64
+ }
65
+
66
+ @end
@@ -4,6 +4,7 @@
4
4
  "private": true,
5
5
  "dependencies": {
6
6
  "@react-native/metro-config": "*",
7
+ "@testing-library/jest-native": "*",
7
8
  "@testing-library/react-native": "*",
8
9
  "react": "*",
9
10
  "react-native": "*",
@@ -5,5 +5,5 @@ import App from './App';
5
5
 
6
6
  test('renders correctly', () => {
7
7
  const { getByTestId } = render(<App />);
8
- expect(getByTestId('heading')).toHaveTextContent(/Welcome/);
8
+ expect(getByTestId('heading')).toHaveTextContent('Welcome');
9
9
  });
@@ -14,9 +14,7 @@ function addProject(host, options) {
14
14
  targets: hasPlugin ? {} : getTargets(options),
15
15
  tags: options.parsedTags,
16
16
  };
17
- const templatedPackageJson = (0, devkit_1.readJson)(host, (0, devkit_1.joinPathFragments)(options.appProjectRoot, 'package.json'));
18
17
  const packageJson = {
19
- ...templatedPackageJson,
20
18
  name: options.importPath,
21
19
  version: '0.0.1',
22
20
  private: true,
@@ -21,7 +21,7 @@ async function webConfigurationGenerator(tree, options) {
21
21
  if (!options.skipPackageJson) {
22
22
  const installTask = (0, devkit_1.addDependenciesToPackageJson)(tree, {}, {
23
23
  'react-native-web': versions_1.reactNativeWebVersion,
24
- 'react-native-svg-web': versions_1.reactNativeSvgWebVersion,
24
+ 'react-native-svg-web': versions_1.reacttNativeSvgWebVersion,
25
25
  });
26
26
  tasks.push(installTask);
27
27
  }
@@ -12,9 +12,12 @@ function ensureDependencies(tree) {
12
12
  '@react-native/babel-preset': versions_2.reactNativeBabelPresetVersion,
13
13
  '@react-native/metro-config': versions_2.reactNativeMetroConfigVersion,
14
14
  '@testing-library/react-native': versions_2.testingLibraryReactNativeVersion,
15
+ '@testing-library/jest-native': versions_2.testingLibraryJestNativeVersion,
15
16
  '@react-native-community/cli': versions_2.reactNativeCommunityCliVersion,
16
17
  '@react-native-community/cli-platform-android': versions_2.reactNativeCommunityCliPlatformAndroidVersion,
17
18
  '@react-native-community/cli-platform-ios': versions_2.reactNativeCommunityCliPlatformIosVersion,
19
+ 'jest-react-native': versions_2.jestReactNativeVersion,
20
+ 'react-test-renderer': versions_2.reactTestRendererVersion,
18
21
  'react-native-svg-transformer': versions_2.reactNativeSvgTransformerVersion,
19
22
  'react-native-svg': versions_2.reactNativeSvgVersion,
20
23
  '@babel/preset-react': versions_1.babelPresetReactVersion,
@@ -1,18 +1,21 @@
1
1
  export declare const nxVersion: any;
2
- export declare const reactNativeVersion = "~0.79.3";
2
+ export declare const reactNativeVersion = "~0.76.3";
3
3
  export declare const typesNodeVersion = "18.16.9";
4
- export declare const reactNativeCommunityCliVersion = "~18.0.0";
5
- export declare const reactNativeCommunityCliPlatformAndroidVersion = "~18.0.0";
6
- export declare const reactNativeCommunityCliPlatformIosVersion = "~18.0.0";
7
- export declare const reactNativeBabelPresetVersion = "~0.79.3";
8
- export declare const reactNativeMetroConfigVersion = "~0.79.3";
9
- export declare const reactNativeWebVersion = "~0.20.0";
10
- export declare const reactVersion = "19.0.0";
11
- export declare const reactDomVersion = "19.0.0";
12
- export declare const typesReactVersion = "~19.0.10";
13
- export declare const typesReactDomVersion = "~19.0.6";
14
- export declare const testingLibraryReactNativeVersion = "~13.2.0";
15
- export declare const reactNativeSvgTransformerVersion = "~1.5.1";
16
- export declare const reactNativeSvgVersion = "~15.11.2";
17
- export declare const reactNativeSvgWebVersion = "~1.0.9";
18
- export declare const babelRuntimeVersion = "^7.25.0";
4
+ export declare const reactNativeCommunityCliVersion = "~15.0.1";
5
+ export declare const reactNativeCommunityCliPlatformAndroidVersion = "~15.0.1";
6
+ export declare const reactNativeCommunityCliPlatformIosVersion = "~15.0.1";
7
+ export declare const reactNativeBabelPresetVersion = "~0.76.3";
8
+ export declare const reactNativeMetroConfigVersion = "~0.76.3";
9
+ export declare const reactNativeWebVersion = "~0.19.13";
10
+ export declare const reactVersion = "~18.3.1";
11
+ export declare const reactDomVersion = "~18.3.1";
12
+ export declare const reactTestRendererVersion = "~18.3.1";
13
+ export declare const typesReactVersion = "~18.3.12";
14
+ export declare const typesReactDomVersion = "~18.3.1";
15
+ export declare const testingLibraryReactNativeVersion = "~12.9.0";
16
+ export declare const testingLibraryJestNativeVersion = "~5.4.3";
17
+ export declare const jestReactNativeVersion = "18.0.0";
18
+ export declare const reactNativeSvgTransformerVersion = "~1.5.0";
19
+ export declare const reactNativeSvgVersion = "~15.8.0";
20
+ export declare const reacttNativeSvgWebVersion = "~1.0.9";
21
+ export declare const babelRuntimeVersion = "~7.26.0";
@@ -1,21 +1,24 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.babelRuntimeVersion = exports.reactNativeSvgWebVersion = exports.reactNativeSvgVersion = exports.reactNativeSvgTransformerVersion = exports.testingLibraryReactNativeVersion = exports.typesReactDomVersion = exports.typesReactVersion = exports.reactDomVersion = exports.reactVersion = exports.reactNativeWebVersion = exports.reactNativeMetroConfigVersion = exports.reactNativeBabelPresetVersion = exports.reactNativeCommunityCliPlatformIosVersion = exports.reactNativeCommunityCliPlatformAndroidVersion = exports.reactNativeCommunityCliVersion = exports.typesNodeVersion = exports.reactNativeVersion = exports.nxVersion = void 0;
3
+ exports.babelRuntimeVersion = exports.reacttNativeSvgWebVersion = exports.reactNativeSvgVersion = exports.reactNativeSvgTransformerVersion = exports.jestReactNativeVersion = exports.testingLibraryJestNativeVersion = exports.testingLibraryReactNativeVersion = exports.typesReactDomVersion = exports.typesReactVersion = exports.reactTestRendererVersion = exports.reactDomVersion = exports.reactVersion = exports.reactNativeWebVersion = exports.reactNativeMetroConfigVersion = exports.reactNativeBabelPresetVersion = exports.reactNativeCommunityCliPlatformIosVersion = exports.reactNativeCommunityCliPlatformAndroidVersion = exports.reactNativeCommunityCliVersion = exports.typesNodeVersion = exports.reactNativeVersion = exports.nxVersion = void 0;
4
4
  exports.nxVersion = require('../../package.json').version;
5
- exports.reactNativeVersion = '~0.79.3';
5
+ exports.reactNativeVersion = '~0.76.3';
6
6
  exports.typesNodeVersion = '18.16.9';
7
- exports.reactNativeCommunityCliVersion = '~18.0.0';
8
- exports.reactNativeCommunityCliPlatformAndroidVersion = '~18.0.0';
9
- exports.reactNativeCommunityCliPlatformIosVersion = '~18.0.0';
10
- exports.reactNativeBabelPresetVersion = '~0.79.3';
11
- exports.reactNativeMetroConfigVersion = '~0.79.3';
12
- exports.reactNativeWebVersion = '~0.20.0';
13
- exports.reactVersion = '19.0.0';
14
- exports.reactDomVersion = '19.0.0';
15
- exports.typesReactVersion = '~19.0.10';
16
- exports.typesReactDomVersion = '~19.0.6';
17
- exports.testingLibraryReactNativeVersion = '~13.2.0';
18
- exports.reactNativeSvgTransformerVersion = '~1.5.1';
19
- exports.reactNativeSvgVersion = '~15.11.2';
20
- exports.reactNativeSvgWebVersion = '~1.0.9';
21
- exports.babelRuntimeVersion = '^7.25.0';
7
+ exports.reactNativeCommunityCliVersion = '~15.0.1';
8
+ exports.reactNativeCommunityCliPlatformAndroidVersion = '~15.0.1';
9
+ exports.reactNativeCommunityCliPlatformIosVersion = '~15.0.1';
10
+ exports.reactNativeBabelPresetVersion = '~0.76.3';
11
+ exports.reactNativeMetroConfigVersion = '~0.76.3';
12
+ exports.reactNativeWebVersion = '~0.19.13';
13
+ exports.reactVersion = '~18.3.1';
14
+ exports.reactDomVersion = '~18.3.1';
15
+ exports.reactTestRendererVersion = '~18.3.1';
16
+ exports.typesReactVersion = '~18.3.12';
17
+ exports.typesReactDomVersion = '~18.3.1';
18
+ exports.testingLibraryReactNativeVersion = '~12.9.0';
19
+ exports.testingLibraryJestNativeVersion = '~5.4.3';
20
+ exports.jestReactNativeVersion = '18.0.0';
21
+ exports.reactNativeSvgTransformerVersion = '~1.5.0';
22
+ exports.reactNativeSvgVersion = '~15.8.0';
23
+ exports.reacttNativeSvgWebVersion = '~1.0.9';
24
+ exports.babelRuntimeVersion = '~7.26.0';
@@ -1,48 +0,0 @@
1
- import UIKit
2
- import React
3
- import React_RCTAppDelegate
4
- import ReactAppDependencyProvider
5
-
6
- @main
7
- class AppDelegate: UIResponder, UIApplicationDelegate {
8
- var window: UIWindow?
9
-
10
- var reactNativeDelegate: ReactNativeDelegate?
11
- var reactNativeFactory: RCTReactNativeFactory?
12
-
13
- func application(
14
- _ application: UIApplication,
15
- didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil
16
- ) -> Bool {
17
- let delegate = ReactNativeDelegate()
18
- let factory = RCTReactNativeFactory(delegate: delegate)
19
- delegate.dependencyProvider = RCTAppDependencyProvider()
20
-
21
- reactNativeDelegate = delegate
22
- reactNativeFactory = factory
23
-
24
- window = UIWindow(frame: UIScreen.main.bounds)
25
-
26
- factory.startReactNative(
27
- withModuleName: "<%= className %>",
28
- in: window,
29
- launchOptions: launchOptions
30
- )
31
-
32
- return true
33
- }
34
- }
35
-
36
- class ReactNativeDelegate: RCTDefaultReactNativeFactoryDelegate {
37
- override func sourceURL(for bridge: RCTBridge) -> URL? {
38
- self.bundleURL()
39
- }
40
-
41
- override func bundleURL() -> URL? {
42
- #if DEBUG
43
- RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index")
44
- #else
45
- Bundle.main.url(forResource: "main", withExtension: "jsbundle")
46
- #endif
47
- }
48
- }
@@ -1,5 +0,0 @@
1
- import { Tree } from '@nx/devkit';
2
- /**
3
- * Remove deprecated dependencies from the root and app package.json.
4
- */
5
- export default function update(tree: Tree): void;
@@ -1,38 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = update;
4
- const devkit_1 = require("@nx/devkit");
5
- const path_1 = require("path");
6
- /**
7
- * Remove deprecated dependencies from the root and app package.json.
8
- */
9
- function update(tree) {
10
- const projects = (0, devkit_1.getProjects)(tree);
11
- for (const [_, config] of projects.entries()) {
12
- const appPackageJsonPath = (0, path_1.join)(config.root, 'package.json');
13
- if (!tree.exists(appPackageJsonPath)) {
14
- continue;
15
- }
16
- (0, devkit_1.removeDependenciesFromPackageJson)(tree, [
17
- '@testing-library/jest-native',
18
- 'jest-react-native',
19
- 'react-test-renderer',
20
- ], [
21
- '@testing-library/jest-native',
22
- 'jest-react-native',
23
- 'react-test-renderer',
24
- ]);
25
- (0, devkit_1.updateJson)(tree, appPackageJsonPath, (packageJson) => {
26
- if (packageJson.dependencies?.['@testing-library/jest-native']) {
27
- delete packageJson.dependencies['@testing-library/jest-native'];
28
- }
29
- if (packageJson.dependencies?.['jest-react-native']) {
30
- delete packageJson.dependencies['jest-react-native'];
31
- }
32
- if (packageJson.dependencies?.['react-test-renderer']) {
33
- delete packageJson.dependencies['react-test-renderer'];
34
- }
35
- return packageJson;
36
- });
37
- }
38
- }