2022-06-08 00:50:05 +02:00
# Social App
In-progress social app.
Uses:
- [React Native ](https://reactnative.dev )
2022-06-08 22:52:12 +02:00
- [React Native for Web ](https://necolas.github.io/react-native-web/ )
2022-06-08 01:56:31 +02:00
- [React Navigation ](https://reactnative.dev/docs/navigation#react-navigation )
2022-07-19 22:37:24 +02:00
- [MobX ](https://mobx.js.org/README.html )
2022-06-09 20:03:25 +02:00
- [Async Storage ](https://github.com/react-native-async-storage/async-storage )
2022-06-08 00:50:05 +02:00
## Build instructions
- Setup your environment [using the react native instructions ](https://reactnative.dev/docs/environment-setup ).
2022-06-08 01:56:31 +02:00
- After initial setup:
2022-06-14 21:29:47 +02:00
- `cd ios ; pod install`
- Start the dev servers
2023-01-16 22:40:34 +01:00
- `git clone git@github.com:bluesky-social/atproto.git`
- `cd atproto`
- `yarn`
- `cd packages/dev-env && yarn start`
2022-06-14 21:29:47 +02:00
- Run the dev app
- iOS: `yarn ios`
- Android: `yarn android`
- Web: `yarn web`
2022-06-08 00:50:05 +02:00
- Tips
- `npx react-native info` Checks what has been installed.
2022-07-19 23:04:45 +02:00
- On M1 macs, [you need to exclude "arm64" from the target architectures ](https://stackoverflow.com/a/65399525 )
2022-06-16 00:40:18 +02:00
- Annoyingly this must be re-set via XCode after every pod install
2022-06-16 05:12:08 +02:00
- The android simulator won't be able to access localhost services unless you run `adb reverse tcp:{PORT} tcp:{PORT}`
- For instance, the localhosted dev-wallet will need `adb reverse tcp:3001 tcp:3001`
2022-06-16 05:33:16 +02:00
- For some reason, the typescript compiler chokes on platform-specific files (e.g. `foo.native.ts` ) but only when compiling for Web thus far. Therefore we always have one version of the file which doesn't use a platform specifier, and that should bee the Web version. ([More info](https://stackoverflow.com/questions/44001050/platform-specific-import-component-in-react-native-with-typescript).)
2022-06-14 05:12:43 +02:00
## Various notes
2022-06-16 02:52:47 +02:00
### Polyfills
`./platform/polyfills.*.ts` adds polyfills to the environment. Currently this includes:
2022-06-16 03:26:41 +02:00
- TextEncoder / TextDecoder