This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| build_nonprod_ios_local: | |
| executor: macos_executor | |
| steps: | |
| - checkout_and_attach | |
| - run: | |
| name: 'Run expo fingerprint' | |
| command: | | |
| npx @expo/fingerprint@latest . > fingerprint.json | |
| - restore_cache: | |
| keys: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - persist_to_workspace: | |
| root: . | |
| paths: | |
| - ios/build/Build/Products/Release-iphonesimulator/MyApp.app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - run: | |
| name: 'Replace js bundle' | |
| command: | | |
| npx expo export:embed --platform ios --dev false --entry-file node_modules/expo-router/entry.js --bundle-output ios/build/Build/Products/Release-iphonesimulator/MyApp.app/main.jsbundle --assets-dest ios/build/Build/Products/Release-iphonesimulator/MyApp.app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - save_cache: | |
| key: 1-ios-build-{{ checksum "fingerprint.json" }} | |
| paths: | |
| - ios/build/Build/Products/Release-iphonesimulator/MyApp.app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - run: | |
| name: 'Build nonprod app locally' | |
| command: | | |
| if [ ! -d "ios/build/Build/Products/Release-iphonesimulator/MyApp.app" ]; then | |
| xcodebuild -workspace ios/MyApp.xcworkspace -scheme MyApp -configuration Release -sdk iphonesimulator -derivedDataPath ios/build | |
| else | |
| echo "Cached ios build already exists" | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - restore_cache: | |
| keys: | |
| - 1-ios-build-{{ checksum "fingerprint.json" }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - run: | |
| name: 'Run expo fingerprint' | |
| command: npx @expo/fingerprint@latest . > fingerprint.json | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const items = [ | |
| { | |
| text: 'item1', | |
| data: { | |
| onPress: () => new Promise.resolve() | |
| }, | |
| }, | |
| ]; | |
| const UsingMyList: React.FC = () => ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const MyList = <T extends unknown>({items, onItemSelected}: MyListProps<t>): JSX.Element => ( | |
| <FlatList | |
| data={items} | |
| renderItem={({item}: {item: MyListItemProps<T>}) => ( | |
| <TouchableOpacity onPress={() => onItemSelected(item)}> | |
| <Text>{item.text}</Text> | |
| </TouchableOpacity> | |
| )} | |
| /> | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type MyListItemProps<T> = { | |
| text: string; | |
| data: T; | |
| }; | |
| type MyListProps<T> = { | |
| items: MyListItemProps<T>[]; | |
| onItemSelected: (item: MyListItemProps<T>) => void; | |
| }; |
NewerOlder