chore: cleanup example apps (#2408)

# Summary

* Restructure example apps to one entry-point in `./apps/index.tsx`
where we can change the import between `./examples` and
`./test-examples`
* update pod files
This commit is contained in:
Jakub Grzywacz
2024-08-13 13:57:31 +02:00
committed by GitHub
parent 3350ab442a
commit e87d22f49e
25 changed files with 7437 additions and 10153 deletions

View File

@@ -1,3 +0,0 @@
import App from './App';
export default App;

3
apps/index.tsx Normal file
View File

@@ -0,0 +1,3 @@
import App from './examples';
export default App;

View File

@@ -1,3 +0,0 @@
import App from './App';
export default App;

View File

@@ -1,3 +0,0 @@
import App from '../apps/examples';
export default App;

View File

@@ -2,8 +2,8 @@
* @format
*/
import {AppRegistry} from 'react-native';
import App from './App';
import {name as appName} from './app.json';
import { AppRegistry } from 'react-native';
import App from '../apps';
import { name as appName } from './app.json';
AppRegistry.registerComponent(appName, () => App);

View File

@@ -14,6 +14,7 @@
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
7699B88040F8A987B510C191 /* libPods-Example-ExampleTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 19F6CBCC0A4E27FBF8BF4A61 /* libPods-Example-ExampleTests.a */; };
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
C35781B2457D5898B7213A0D /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 9D90345809BA99F1314F488D /* PrivacyInfo.xcprivacy */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -44,6 +45,7 @@
5DCACB8F33CDC322A6C60F78 /* libPods-Example.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Example.a"; sourceTree = BUILT_PRODUCTS_DIR; };
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = Example/LaunchScreen.storyboard; sourceTree = "<group>"; };
89C6BE57DB24E9ADA2F236DE /* Pods-Example-ExampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example-ExampleTests.release.xcconfig"; path = "Target Support Files/Pods-Example-ExampleTests/Pods-Example-ExampleTests.release.xcconfig"; sourceTree = "<group>"; };
9D90345809BA99F1314F488D /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; name = PrivacyInfo.xcprivacy; path = Example/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
/* End PBXFileReference section */
@@ -94,6 +96,7 @@
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */,
13B07FB71A68108700A75B9A /* main.m */,
13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */,
9D90345809BA99F1314F488D /* PrivacyInfo.xcprivacy */,
);
name = Example;
sourceTree = "<group>";
@@ -245,6 +248,7 @@
files = (
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */,
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
C35781B2457D5898B7213A0D /* PrivacyInfo.xcprivacy in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};

View File

@@ -2,37 +2,36 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyCollectedDataTypes</key>
<array>
</array>
<key>NSPrivacyAccessedAPITypes</key>
<array>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>C617.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>CA92.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategorySystemBootTime</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>35F9.1</string>
</array>
</dict>
</array>
<key>NSPrivacyTracking</key>
<false/>
<key>NSPrivacyAccessedAPITypes</key>
<array>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>C617.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>CA92.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategorySystemBootTime</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>35F9.1</string>
</array>
</dict>
</array>
<key>NSPrivacyCollectedDataTypes</key>
<array/>
<key>NSPrivacyTracking</key>
<false/>
</dict>
</plist>

View File

@@ -1185,7 +1185,7 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- RNSVG (15.3.0):
- RNSVG (15.5.0):
- React-Core
- SocketRocket (0.7.0)
- Yoga (0.0.0)
@@ -1374,9 +1374,9 @@ SPEC CHECKSUMS:
DoubleConversion: 76ab83afb40bddeeee456813d9c04f67f78771b5
FBLazyVector: 4bc164e5b5e6cfc288d2b5ff28643ea15fa1a589
fmt: 4c2741a687cc09f0634a2e2c72a838b99f1ff120
glog: fdfdfe5479092de0c4bdbebedd9056951f092c4f
glog: c5d68082e772fa1c511173d6b30a9de2c05a69a2
hermes-engine: 01d3e052018c2a13937aca1860fbedbccd4a41b7
RCT-Folly: 02617c592a293bd6d418e0a88ff4ee1f88329b47
RCT-Folly: 045d6ecaa59d826c5736dfba0b2f4083ff8d79df
RCTDeprecation: b03c35057846b685b3ccadc9bfe43e349989cdb2
RCTRequired: 194626909cfa8d39ca6663138c417bc6c431648c
RCTTypeSafety: 552aff5b8e8341660594db00e53ac889682bc120
@@ -1424,7 +1424,7 @@ SPEC CHECKSUMS:
React-utils: 4476b7fcbbd95cfd002f3e778616155241d86e31
ReactCommon: ecad995f26e0d1e24061f60f4e5d74782f003f12
RNReanimated: 9c213184c27dc4a2ed7e9ff41a4b0b9258bb54f0
RNSVG: a48668fd382115bc89761ce291a81c4ca5f2fd2e
RNSVG: b986585e367f4a49d8aa43065066cc9c290b3d9b
SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d
Yoga: 2f71ecf38d934aecb366e686278102a51679c308

View File

@@ -1,3 +0,0 @@
import App from '../apps/examples';
export default App;

View File

@@ -3,7 +3,7 @@
*/
import { AppRegistry } from 'react-native';
import App from './App';
import App from '../apps';
import { name as appName } from './app.json';
AppRegistry.registerComponent(appName, () => App);

View File

@@ -1184,7 +1184,7 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- RNSVG (15.3.0):
- RNSVG (15.5.0):
- DoubleConversion
- glog
- hermes-engine
@@ -1204,9 +1204,9 @@ PODS:
- React-utils
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- RNSVG/common (= 15.3.0)
- RNSVG/common (= 15.5.0)
- Yoga
- RNSVG/common (15.3.0):
- RNSVG/common (15.5.0):
- DoubleConversion
- glog
- hermes-engine
@@ -1464,7 +1464,7 @@ SPEC CHECKSUMS:
React-utils: f013537c3371270d2095bff1d594d00d4bc9261b
ReactCommon: 2cde697fd80bd31da1d6448d25a5803088585219
RNReanimated: 065c74f1b5674571be918adf7f67b8689708a7cb
RNSVG: 7b44aa4df2587946e28496adf2e10a16f08c1250
RNSVG: e4a3617143570f08952abc711088ad215be46892
SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d
Yoga: ff1d575b119f510a5de23c22a794872562078ccf

View File

@@ -1,3 +0,0 @@
import App from '../apps/examples';
export default App;

View File

@@ -3,7 +3,7 @@
*/
import {AppRegistry} from 'react-native';
import App from './App';
import App from '../apps';
import {name as appName} from './app.json';
AppRegistry.registerComponent(appName, () => App);

View File

@@ -1066,6 +1066,45 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- RNSVG (15.5.0):
- glog
- RCT-Folly (= 2022.05.16.00)
- RCTRequired
- RCTTypeSafety
- React-Codegen
- React-Core
- React-debug
- React-Fabric
- React-graphics
- React-ImageManager
- React-jsi
- React-NativeModulesApple
- React-RCTFabric
- React-rendererdebug
- React-utils
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- RNSVG/common (= 15.5.0)
- Yoga
- RNSVG/common (15.5.0):
- glog
- RCT-Folly (= 2022.05.16.00)
- RCTRequired
- RCTTypeSafety
- React-Codegen
- React-Core
- React-debug
- React-Fabric
- React-graphics
- React-ImageManager
- React-jsi
- React-NativeModulesApple
- React-RCTFabric
- React-rendererdebug
- React-utils
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- SocketRocket (0.7.0)
- Yoga (1.14.0)
@@ -1123,6 +1162,7 @@ DEPENDENCIES:
- React-utils (from `../node_modules/react-native-macos/ReactCommon/react/utils`)
- ReactCommon/turbomodule/core (from `../node_modules/react-native-macos/ReactCommon`)
- RNReanimated (from `../node_modules/react-native-reanimated`)
- RNSVG (from `../node_modules/react-native-svg`)
- SocketRocket (from `../node_modules/react-native-macos/third-party-podspecs/SocketRocket.podspec`)
- Yoga (from `../node_modules/react-native-macos/ReactCommon/yoga`)
@@ -1227,6 +1267,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native-macos/ReactCommon"
RNReanimated:
:path: "../node_modules/react-native-reanimated"
RNSVG:
:path: "../node_modules/react-native-svg"
SocketRocket:
:podspec: "../node_modules/react-native-macos/third-party-podspecs/SocketRocket.podspec"
Yoga:
@@ -1283,6 +1325,7 @@ SPEC CHECKSUMS:
React-utils: f0bb613a2b0a7f8011bdafb8ac098e30d4825256
ReactCommon: 4afd22a8615d591e925c67434b6d947b9ae24ca8
RNReanimated: 096c06ec3b073d0bb04f6dd1c99e40fad2d2fb31
RNSVG: d0638e8b3bff721b712b4c128af78cda17b6165c
SocketRocket: f6c6249082c011e6de2de60ed641ef8bbe0cfac9
Yoga: 35603207c576afc16e93625844f6d469ae6d5f03

File diff suppressed because it is too large Load Diff

View File

@@ -1,3 +0,0 @@
import App from '../apps/examples';
export default App;

View File

@@ -3,7 +3,7 @@
*/
import {AppRegistry} from 'react-native';
import App from './App';
import App from '../apps';
import {name as appName} from './app.json';
AppRegistry.registerComponent(appName, () => App);

View File

@@ -1070,7 +1070,7 @@ PODS:
- RCT-Folly (= 2022.05.16.00)
- React-Core
- ReactCommon/turbomodule/core
- RNSVG (15.4.0):
- RNSVG (15.5.0):
- React-Core
- SocketRocket (0.7.0)
- Yoga (1.14.0)
@@ -1294,7 +1294,7 @@ SPEC CHECKSUMS:
React-utils: f0bb613a2b0a7f8011bdafb8ac098e30d4825256
ReactCommon: cd9602a38f340d44b1cca3ad06d6f13106a46dd0
RNReanimated: ba95f6d26ca4b8a8f7f2b15f62a3513750762f6b
RNSVG: cb24fb322de8c1ebf59904e7aca0447bb8dbed5a
RNSVG: b986585e367f4a49d8aa43065066cc9c290b3d9b
SocketRocket: f6c6249082c011e6de2de60ed641ef8bbe0cfac9
Yoga: 35603207c576afc16e93625844f6d469ae6d5f03

View File

@@ -1,3 +0,0 @@
import App from '../apps/test-examples';
export default App;

View File

@@ -2,8 +2,8 @@
* @format
*/
import {AppRegistry} from 'react-native';
import App from './App';
import {name as appName} from './app.json';
import { AppRegistry } from 'react-native';
import App from '../apps/test-examples';
import { name as appName } from './app.json';
AppRegistry.registerComponent(appName, () => App);

View File

@@ -6752,6 +6752,11 @@ walker@^1.0.7, walker@^1.0.8:
dependencies:
makeerror "1.0.12"
warn-once@0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/warn-once/-/warn-once-0.1.1.tgz#952088f4fb56896e73fd4e6a3767272a3fccce43"
integrity sha512-VkQZJbO8zVImzYFteBXvBOZEl1qL175WH8VmZcxF2fZAoudNhNDvHi+doCaAEdU2l2vtcIwa2zn0QK5+I1HQ3Q==
wcwidth@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8"

View File

@@ -1,3 +0,0 @@
import App from '../apps/examples';
export default App;

View File

@@ -2,7 +2,7 @@ import '@expo/metro-runtime';
import { registerRootComponent } from 'expo';
import App from './App';
import App from '../apps';
// registerRootComponent calls AppRegistry.registerComponent('main', () => App);
// It also ensures that whether you load the app in Expo Go or in a native build,